kernel/eka/include/nkernsmp/arm/arm_tmr.h
changeset 90 947f0dc9f7a8
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
52:2d65c2f76d7b 90:947f0dc9f7a8
    78 	E_ArmTmrWDD_1				=0x12345678u,	// to disable watchdog, write this ...
    78 	E_ArmTmrWDD_1				=0x12345678u,	// to disable watchdog, write this ...
    79 	E_ArmTmrWDD_2				=0x87654321u,	// ... then this with no intervening writes
    79 	E_ArmTmrWDD_2				=0x87654321u,	// ... then this with no intervening writes
    80 	};
    80 	};
    81 
    81 
    82 
    82 
       
    83 #ifdef	__CPU_ARM_HAS_GLOBAL_TIMER_BLOCK
       
    84 
       
    85 // r1p0 and later A9s have an additional Global Timer
       
    86 struct ArmGlobalTimer
       
    87 	{
       
    88 	volatile TUint32	iTimerCountLow;			// 00 Timer counter low word
       
    89 	volatile TUint32	iTimerCountHigh;		// 04 Timer counter high word
       
    90 	volatile TUint32	iTimerCtrl;				// 08 Timer control register
       
    91 	volatile TUint32	iTimerStatus;			// 0C Timer status register
       
    92 	volatile TUint32	iComparatorLow;			// 10 Comparator value low word (per-CPU register)
       
    93 	volatile TUint32	iComparatorHigh;		// 14 Comparator value high word (per-CPU register)
       
    94 	volatile TUint32	iComparatorInc;			// 18 Comparator autoincrement value (per-CPU register)
       
    95 	volatile TUint32	i_Spare2[57];			// 1C unused
       
    96 	};
       
    97 
       
    98 __ASSERT_COMPILE(sizeof(ArmGlobalTimer)==0x100);
       
    99 
       
   100 // Global Timer Control Register Bits
       
   101 enum TArmGlobalTimerCtrl
       
   102 	{
       
   103 	E_ArmGTmrCtrl_TmrEnb		=1u,			// when set, timer counts up
       
   104 	E_ArmGTmrCtrl_CmpEnb		=2u,			// when set, comparator matching is enabled (per-CPU)
       
   105 	E_ArmGTmrCtrl_IntEn			=4u,			// when set enables comparator match interrupt (per-CPU)
       
   106 	E_ArmGTmrCtrl_AutoInc		=8u,			// when set enables comparator auto increment (per-CPU)
       
   107 	E_ArmGTmrCtrl_PrescaleShift	=8u,
       
   108 	E_ArmGTmrCtrl_PrescaleMask	=0xff00u,		// bits 8-15 = prescale value - divides by (P+1)
       
   109 												// input to prescaler is PERIPHCLK (=CPUCLK/2 on NE1, CPUCLK/N in general, N>=2)
       
   110 	};
       
   111 
       
   112 enum TArmGlobalTimerStatus
       
   113 	{
       
   114 	E_ArmGTmrStatus_Event		=1u				// set when timer count value matches comparator value (per-CPU)
       
   115 	};
       
   116 
       
   117 #endif
       
   118 
       
   119 
       
   120 
    83 
   121 
    84 #endif	// 	__ARM_TMR_H__
   122 #endif	// 	__ARM_TMR_H__