diff options
author | Roland Stigge <stigge@antcom.de> | 2012-02-27 11:31:24 -0500 |
---|---|---|
committer | Roland Stigge <stigge@antcom.de> | 2012-02-27 11:31:24 -0500 |
commit | cfac337b0fbcad5181096ab72bb24a05bd444562 (patch) | |
tree | fce7d84f4fe0cd77779c603cf060288ba5929f6e /arch/arm/mach-lpc32xx/timer.c | |
parent | 6b21d18ed50c7d145220b0724ea7f2613abf0f95 (diff) |
ARM: LPC32xx: Fix missing and bad LPC32XX macros
Some of the LPC32XX_* macros were typed ("LCP32XX_*"), which is fixed by this
patch. (Besides another LCP doc typo.)
Further, the LPC32XX_GPIO_P2_MUX_SET/CLR/STATE macros were missing.
Signed-off-by: Roland Stigge <stigge@antcom.de>
Diffstat (limited to 'arch/arm/mach-lpc32xx/timer.c')
-rw-r--r-- | arch/arm/mach-lpc32xx/timer.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c index b42c909bbeeb..c40667c33161 100644 --- a/arch/arm/mach-lpc32xx/timer.c +++ b/arch/arm/mach-lpc32xx/timer.c | |||
@@ -34,11 +34,11 @@ | |||
34 | static int lpc32xx_clkevt_next_event(unsigned long delta, | 34 | static int lpc32xx_clkevt_next_event(unsigned long delta, |
35 | struct clock_event_device *dev) | 35 | struct clock_event_device *dev) |
36 | { | 36 | { |
37 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_RESET, | 37 | __raw_writel(LPC32XX_TIMER_CNTR_TCR_RESET, |
38 | LCP32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); | 38 | LPC32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); |
39 | __raw_writel(delta, LCP32XX_TIMER_PR(LPC32XX_TIMER0_BASE)); | 39 | __raw_writel(delta, LPC32XX_TIMER_PR(LPC32XX_TIMER0_BASE)); |
40 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_EN, | 40 | __raw_writel(LPC32XX_TIMER_CNTR_TCR_EN, |
41 | LCP32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); | 41 | LPC32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); |
42 | 42 | ||
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
@@ -58,7 +58,7 @@ static void lpc32xx_clkevt_mode(enum clock_event_mode mode, | |||
58 | * disable the timer to wait for the first call to | 58 | * disable the timer to wait for the first call to |
59 | * set_next_event(). | 59 | * set_next_event(). |
60 | */ | 60 | */ |
61 | __raw_writel(0, LCP32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); | 61 | __raw_writel(0, LPC32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); |
62 | break; | 62 | break; |
63 | 63 | ||
64 | case CLOCK_EVT_MODE_UNUSED: | 64 | case CLOCK_EVT_MODE_UNUSED: |
@@ -81,8 +81,8 @@ static irqreturn_t lpc32xx_timer_interrupt(int irq, void *dev_id) | |||
81 | struct clock_event_device *evt = &lpc32xx_clkevt; | 81 | struct clock_event_device *evt = &lpc32xx_clkevt; |
82 | 82 | ||
83 | /* Clear match */ | 83 | /* Clear match */ |
84 | __raw_writel(LCP32XX_TIMER_CNTR_MTCH_BIT(0), | 84 | __raw_writel(LPC32XX_TIMER_CNTR_MTCH_BIT(0), |
85 | LCP32XX_TIMER_IR(LPC32XX_TIMER0_BASE)); | 85 | LPC32XX_TIMER_IR(LPC32XX_TIMER0_BASE)); |
86 | 86 | ||
87 | evt->event_handler(evt); | 87 | evt->event_handler(evt); |
88 | 88 | ||
@@ -128,14 +128,14 @@ static void __init lpc32xx_timer_init(void) | |||
128 | clkrate = clkrate / clk_get_pclk_div(); | 128 | clkrate = clkrate / clk_get_pclk_div(); |
129 | 129 | ||
130 | /* Initial timer setup */ | 130 | /* Initial timer setup */ |
131 | __raw_writel(0, LCP32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); | 131 | __raw_writel(0, LPC32XX_TIMER_TCR(LPC32XX_TIMER0_BASE)); |
132 | __raw_writel(LCP32XX_TIMER_CNTR_MTCH_BIT(0), | 132 | __raw_writel(LPC32XX_TIMER_CNTR_MTCH_BIT(0), |
133 | LCP32XX_TIMER_IR(LPC32XX_TIMER0_BASE)); | 133 | LPC32XX_TIMER_IR(LPC32XX_TIMER0_BASE)); |
134 | __raw_writel(1, LCP32XX_TIMER_MR0(LPC32XX_TIMER0_BASE)); | 134 | __raw_writel(1, LPC32XX_TIMER_MR0(LPC32XX_TIMER0_BASE)); |
135 | __raw_writel(LCP32XX_TIMER_CNTR_MCR_MTCH(0) | | 135 | __raw_writel(LPC32XX_TIMER_CNTR_MCR_MTCH(0) | |
136 | LCP32XX_TIMER_CNTR_MCR_STOP(0) | | 136 | LPC32XX_TIMER_CNTR_MCR_STOP(0) | |
137 | LCP32XX_TIMER_CNTR_MCR_RESET(0), | 137 | LPC32XX_TIMER_CNTR_MCR_RESET(0), |
138 | LCP32XX_TIMER_MCR(LPC32XX_TIMER0_BASE)); | 138 | LPC32XX_TIMER_MCR(LPC32XX_TIMER0_BASE)); |
139 | 139 | ||
140 | /* Setup tick interrupt */ | 140 | /* Setup tick interrupt */ |
141 | setup_irq(IRQ_LPC32XX_TIMER0, &lpc32xx_timer_irq); | 141 | setup_irq(IRQ_LPC32XX_TIMER0, &lpc32xx_timer_irq); |
@@ -151,14 +151,14 @@ static void __init lpc32xx_timer_init(void) | |||
151 | clockevents_register_device(&lpc32xx_clkevt); | 151 | clockevents_register_device(&lpc32xx_clkevt); |
152 | 152 | ||
153 | /* Use timer1 as clock source. */ | 153 | /* Use timer1 as clock source. */ |
154 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_RESET, | 154 | __raw_writel(LPC32XX_TIMER_CNTR_TCR_RESET, |
155 | LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); | 155 | LPC32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); |
156 | __raw_writel(0, LCP32XX_TIMER_PR(LPC32XX_TIMER1_BASE)); | 156 | __raw_writel(0, LPC32XX_TIMER_PR(LPC32XX_TIMER1_BASE)); |
157 | __raw_writel(0, LCP32XX_TIMER_MCR(LPC32XX_TIMER1_BASE)); | 157 | __raw_writel(0, LPC32XX_TIMER_MCR(LPC32XX_TIMER1_BASE)); |
158 | __raw_writel(LCP32XX_TIMER_CNTR_TCR_EN, | 158 | __raw_writel(LPC32XX_TIMER_CNTR_TCR_EN, |
159 | LCP32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); | 159 | LPC32XX_TIMER_TCR(LPC32XX_TIMER1_BASE)); |
160 | 160 | ||
161 | clocksource_mmio_init(LCP32XX_TIMER_TC(LPC32XX_TIMER1_BASE), | 161 | clocksource_mmio_init(LPC32XX_TIMER_TC(LPC32XX_TIMER1_BASE), |
162 | "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); | 162 | "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); |
163 | } | 163 | } |
164 | 164 | ||