diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2010-10-20 23:19:03 +0000 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-10-22 11:09:32 -0700 |
commit | cb74f0223fcf9b2db8f57d9ee5fa4738c066f3c6 (patch) | |
tree | b07e4ad0b0a18e8e59afa705d18e9597c0a1beb7 | |
parent | 2a12400eed8be0d5790108cba3908a71d6bb9cae (diff) |
omap: UART: fix wakeup registers for OMAP24xx UART2
On OMAP24xx, UART2 WKEN and WKST registers are in PM_WKEN2_CORE and
PM_WKST2_CORE respecitvely. Fix the OMAP2 register init to use the
correct registers on OMAP24xx.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index ba8a5cc8eae..becf0e38ef7 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -515,14 +515,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) uart->padconf = padconf; } else if (cpu_is_omap24xx()) { u32 wk_mask = 0; + u32 wk_en = PM_WKEN1, wk_st = PM_WKST1; - if (cpu_is_omap2430()) { - uart->wk_en = OMAP2430_PRM_REGADDR(CORE_MOD, PM_WKEN1); - uart->wk_st = OMAP2430_PRM_REGADDR(CORE_MOD, PM_WKST1); - } else if (cpu_is_omap2420()) { - uart->wk_en = OMAP2420_PRM_REGADDR(CORE_MOD, PM_WKEN1); - uart->wk_st = OMAP2420_PRM_REGADDR(CORE_MOD, PM_WKST1); - } switch (uart->num) { case 0: wk_mask = OMAP24XX_ST_UART1_MASK; @@ -531,10 +525,19 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) wk_mask = OMAP24XX_ST_UART2_MASK; break; case 2: + wk_en = OMAP24XX_PM_WKEN2; + wk_st = OMAP24XX_PM_WKST2; wk_mask = OMAP24XX_ST_UART3_MASK; break; } uart->wk_mask = wk_mask; + if (cpu_is_omap2430()) { + uart->wk_en = OMAP2430_PRM_REGADDR(CORE_MOD, wk_en); + uart->wk_st = OMAP2430_PRM_REGADDR(CORE_MOD, wk_st); + } else if (cpu_is_omap2420()) { + uart->wk_en = OMAP2420_PRM_REGADDR(CORE_MOD, wk_en); + uart->wk_st = OMAP2420_PRM_REGADDR(CORE_MOD, wk_st); + } } else { uart->wk_en = NULL; uart->wk_st = NULL; |