diff options
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 9732d5d9466b..ddd05bf78e02 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -111,21 +111,27 @@ static const struct clkops clk_pxa25x_lcd_ops = { | |||
111 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz | 111 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz |
112 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) | 112 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) |
113 | */ | 113 | */ |
114 | static struct clk pxa25x_hwuart_clk = | ||
115 | INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev) | ||
116 | ; | ||
117 | |||
114 | static struct clk pxa25x_clks[] = { | 118 | static struct clk pxa25x_clks[] = { |
115 | INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev), | 119 | INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev), |
116 | INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), | 120 | INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), |
117 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), | 121 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), |
118 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), | ||
119 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), | 122 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), |
120 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev), | 123 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev), |
121 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), | 124 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), |
122 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), | 125 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), |
126 | |||
127 | INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev), | ||
128 | INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev), | ||
129 | INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev), | ||
130 | |||
123 | /* | 131 | /* |
124 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL), | 132 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL), |
125 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL), | 133 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL), |
126 | INIT_CKEN("SSPCLK", SSP, 3686400, 0, NULL), | ||
127 | INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL), | 134 | INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL), |
128 | INIT_CKEN("NSSPCLK", NSSP, 3686400, 0, NULL), | ||
129 | */ | 135 | */ |
130 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), | 136 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), |
131 | }; | 137 | }; |
@@ -213,8 +219,6 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) | |||
213 | 219 | ||
214 | static void pxa25x_cpu_pm_enter(suspend_state_t state) | 220 | static void pxa25x_cpu_pm_enter(suspend_state_t state) |
215 | { | 221 | { |
216 | CKEN = 0; | ||
217 | |||
218 | switch (state) { | 222 | switch (state) { |
219 | case PM_SUSPEND_MEM: | 223 | case PM_SUSPEND_MEM: |
220 | /* set resume return address */ | 224 | /* set resume return address */ |
@@ -236,6 +240,8 @@ static void __init pxa25x_init_pm(void) | |||
236 | { | 240 | { |
237 | pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns; | 241 | pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns; |
238 | } | 242 | } |
243 | #else | ||
244 | static inline void pxa25x_init_pm(void) {} | ||
239 | #endif | 245 | #endif |
240 | 246 | ||
241 | /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm | 247 | /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm |
@@ -287,30 +293,33 @@ void __init pxa25x_init_irq(void) | |||
287 | } | 293 | } |
288 | 294 | ||
289 | static struct platform_device *pxa25x_devices[] __initdata = { | 295 | static struct platform_device *pxa25x_devices[] __initdata = { |
290 | &pxa_device_mci, | ||
291 | &pxa_device_udc, | 296 | &pxa_device_udc, |
292 | &pxa_device_fb, | ||
293 | &pxa_device_ffuart, | 297 | &pxa_device_ffuart, |
294 | &pxa_device_btuart, | 298 | &pxa_device_btuart, |
295 | &pxa_device_stuart, | 299 | &pxa_device_stuart, |
296 | &pxa_device_i2c, | ||
297 | &pxa_device_i2s, | 300 | &pxa_device_i2s, |
298 | &pxa_device_ficp, | ||
299 | &pxa_device_rtc, | 301 | &pxa_device_rtc, |
302 | &pxa25x_device_ssp, | ||
303 | &pxa25x_device_nssp, | ||
304 | &pxa25x_device_assp, | ||
300 | }; | 305 | }; |
301 | 306 | ||
302 | static int __init pxa25x_init(void) | 307 | static int __init pxa25x_init(void) |
303 | { | 308 | { |
304 | int ret = 0; | 309 | int ret = 0; |
305 | 310 | ||
311 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | ||
312 | if (cpu_is_pxa25x()) | ||
313 | clks_register(&pxa25x_hwuart_clk, 1); | ||
314 | |||
306 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) { | 315 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) { |
307 | clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks)); | 316 | clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks)); |
308 | 317 | ||
309 | if ((ret = pxa_init_dma(16))) | 318 | if ((ret = pxa_init_dma(16))) |
310 | return ret; | 319 | return ret; |
311 | #ifdef CONFIG_PM | 320 | |
312 | pxa25x_init_pm(); | 321 | pxa25x_init_pm(); |
313 | #endif | 322 | |
314 | ret = platform_add_devices(pxa25x_devices, | 323 | ret = platform_add_devices(pxa25x_devices, |
315 | ARRAY_SIZE(pxa25x_devices)); | 324 | ARRAY_SIZE(pxa25x_devices)); |
316 | } | 325 | } |