baseport/src/cedar/generic/base/syborg/specific/syborg_priv.h
changeset 0 ffa851df0825
equal deleted inserted replaced
-1:000000000000 0:ffa851df0825
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __SYBORG_PRIV_H__
       
    19 #define __SYBORG_PRIV_H__
       
    20 
       
    21 #include <e32const.h>
       
    22 #include <arm.h>
       
    23 #include <assp.h>
       
    24 #include <syborg.h>
       
    25 
       
    26 #define	_LOCK		TInt irq=NKern::DisableAllInterrupts();
       
    27 #define	_UNLOCK		NKern::RestoreInterrupts(irq);
       
    28 
       
    29 const TUint32 K1000HzTickMatchLoad = 1000;
       
    30 const TInt KNumSyborgInts = 64;
       
    31 
       
    32 class SyborgInterrupt : public Interrupt
       
    33 {
       
    34 public:
       
    35 	static void IrqDispatch();
       
    36 	static void FiqDispatch();
       
    37 	static void DisableAndClearAll();
       
    38 	static void Init1();
       
    39 	static void Init3();
       
    40 	static void Spurious(TAny* anId);
       
    41     static void MsTimerTick(TAny* aPtr);
       
    42 
       
    43 	static SInterruptHandler Handlers[KNumSyborgInts];
       
    44 };
       
    45 
       
    46 class Syborg : public Asic
       
    47 {
       
    48 public:
       
    49 	IMPORT_C Syborg();
       
    50 
       
    51 public:
       
    52 	// Initialisation
       
    53 	IMPORT_C virtual TMachineStartupType StartupReason();
       
    54 	IMPORT_C virtual void Init1();
       
    55 	IMPORT_C virtual void Init3();
       
    56 
       
    57 	// Power management
       
    58 	IMPORT_C virtual void Idle();
       
    59 
       
    60 	IMPORT_C void DebugInit();
       
    61 	IMPORT_C virtual void DebugOutput(TUint aChar);
       
    62 
       
    63 	// Timing
       
    64 	IMPORT_C virtual TInt MsTickPeriod();
       
    65 	IMPORT_C virtual TInt SystemTimeInSecondsFrom2000(TInt& aTime);
       
    66 	IMPORT_C virtual TInt SetSystemTimeInSecondsFrom2000(TInt aTime);
       
    67 	IMPORT_C virtual TUint32 NanoWaitCalibration();
       
    68 
       
    69 	// HAL
       
    70 	virtual TInt VariantHal(TInt aFunction, TAny* a1, TAny* a2);
       
    71 
       
    72 	// Machine configuration
       
    73 	virtual TPtr8 MachineConfiguration();
       
    74 
       
    75 	TUint32 iDebugPortBase;
       
    76 
       
    77 	static Syborg* Variant;
       
    78 	static TPhysAddr VideoRamPhys;
       
    79 	static TPhysAddr VideoRamPhysSecure;
       
    80 	NTimerQ* iTimerQ;
       
    81 };
       
    82 
       
    83 GLREF_D Syborg TheVariant;
       
    84 
       
    85 #endif  // __SYBORG_PRIV_H__
       
    86