Debug Agent timer lib for OMAP 35xx.\r
\r
Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
- \r
+\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
Bank = gVector / 32;\r
Bit = 1UL << (gVector % 32);\r
- \r
+\r
MmioWrite32 (INTCPS_MIR_CLEAR(Bank), Bit);\r
}\r
\r
{\r
UINTN Bank;\r
UINTN Bit;\r
- \r
+\r
Bank = gVector / 32;\r
- Bit = 1UL << (gVector % 32); \r
+ Bit = 1UL << (gVector % 32);\r
\r
MmioWrite32 (INTCPS_MIR_SET(Bank), Bit);\r
}\r
CpuDeadLoop ();\r
}\r
// Set source clock for GPT2 - GPT9 to SYS_CLK\r
- MmioOr32 (CM_CLKSEL_PER, 1 << (TimerNumber - 2)); \r
+ MmioOr32 (CM_CLKSEL_PER, 1 << (TimerNumber - 2));\r
\r
}\r
- \r
- \r
+\r
+\r
/**\r
Set the period for the debug agent timer. Zero means disable the timer.\r
\r
@param[in] TimerPeriodMilliseconds Frequency of the debug agent timer.\r
\r
-**/ \r
+**/\r
VOID\r
EFIAPI\r
DebugAgentTimerSetPeriod (\r
{\r
UINT64 TimerCount;\r
INT32 LoadValue;\r
- \r
+\r
if (TimerPeriodMilliseconds == 0) {\r
// Turn off GPTIMER3\r
MmioWrite32 (gTCLR, TCLR_ST_OFF);\r
- \r
+\r
DisableInterruptSource ();\r
- } else { \r
+ } else {\r
// Calculate required timer count\r
TimerCount = DivU64x32(TimerPeriodMilliseconds * 1000000, PcdGet32(PcdDebugAgentTimerFreqNanoSeconds));\r
\r
EnableInterruptSource ();\r
}\r
}\r
- \r
+\r
\r
/**\r
- Perform End Of Interrupt for the debug agent timer. This is called in the \r
- interrupt handler after the interrupt has been processed. \r
+ Perform End Of Interrupt for the debug agent timer. This is called in the\r
+ interrupt handler after the interrupt has been processed.\r
\r
-**/ \r
+**/\r
VOID\r
EFIAPI\r
DebugAgentTimerEndOfInterrupt (\r
)\r
{\r
// Clear all timer interrupts\r
- MmioWrite32 (gTISR, TISR_CLEAR_ALL); \r
+ MmioWrite32 (gTISR, TISR_CLEAR_ALL);\r
\r
// Poll interrupt status bits to ensure clearing\r
while ((MmioRead32 (gTISR) & TISR_ALL_INTERRUPT_MASK) != TISR_NO_INTERRUPTS_PENDING);\r
\r
}\r
\r
- \r
\ No newline at end of file