aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa27x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r--arch/arm/mach-pxa/pxa27x.c59
1 files changed, 12 insertions, 47 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 57efebdc4324..96cf274ec7cb 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -21,6 +21,7 @@
21#include <asm/irq.h> 21#include <asm/irq.h>
22#include <asm/arch/irqs.h> 22#include <asm/arch/irqs.h>
23#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
24#include <asm/arch/pxa2xx-regs.h>
24#include <asm/arch/ohci.h> 25#include <asm/arch/ohci.h>
25#include <asm/arch/pm.h> 26#include <asm/arch/pm.h>
26#include <asm/arch/dma.h> 27#include <asm/arch/dma.h>
@@ -151,11 +152,12 @@ static struct clk pxa27x_clks[] = {
151 INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev), 152 INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
152 INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL), 153 INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
153 154
155 INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
156 INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
157 INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
158
154 /* 159 /*
155 INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL), 160 INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
156 INIT_CKEN("SSPCLK", SSP1, 13000000, 0, NULL),
157 INIT_CKEN("SSPCLK", SSP2, 13000000, 0, NULL),
158 INIT_CKEN("SSPCLK", SSP3, 13000000, 0, NULL),
159 INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL), 161 INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
160 INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL), 162 INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL),
161 INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL), 163 INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL),
@@ -264,12 +266,6 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
264{ 266{
265 extern void pxa_cpu_standby(void); 267 extern void pxa_cpu_standby(void);
266 268
267 if (state == PM_SUSPEND_STANDBY)
268 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER) |
269 (1 << CKEN_LCD) | (1 << CKEN_PWM0);
270 else
271 CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER);
272
273 /* ensure voltage-change sequencer not initiated, which hangs */ 269 /* ensure voltage-change sequencer not initiated, which hangs */
274 PCFR &= ~PCFR_FVC; 270 PCFR &= ~PCFR_FVC;
275 271
@@ -305,6 +301,8 @@ static void __init pxa27x_init_pm(void)
305{ 301{
306 pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns; 302 pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns;
307} 303}
304#else
305static inline void pxa27x_init_pm(void) {}
308#endif 306#endif
309 307
310/* PXA27x: Various gpios can issue wakeup events. This logic only 308/* PXA27x: Various gpios can issue wakeup events. This logic only
@@ -374,37 +372,6 @@ void __init pxa27x_init_irq(void)
374 * device registration specific to PXA27x. 372 * device registration specific to PXA27x.
375 */ 373 */
376 374
377static u64 pxa27x_dmamask = 0xffffffffUL;
378
379static struct resource pxa27x_ohci_resources[] = {
380 [0] = {
381 .start = 0x4C000000,
382 .end = 0x4C00ff6f,
383 .flags = IORESOURCE_MEM,
384 },
385 [1] = {
386 .start = IRQ_USBH1,
387 .end = IRQ_USBH1,
388 .flags = IORESOURCE_IRQ,
389 },
390};
391
392struct platform_device pxa27x_device_ohci = {
393 .name = "pxa27x-ohci",
394 .id = -1,
395 .dev = {
396 .dma_mask = &pxa27x_dmamask,
397 .coherent_dma_mask = 0xffffffff,
398 },
399 .num_resources = ARRAY_SIZE(pxa27x_ohci_resources),
400 .resource = pxa27x_ohci_resources,
401};
402
403void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
404{
405 pxa27x_device_ohci.dev.platform_data = info;
406}
407
408static struct resource i2c_power_resources[] = { 375static struct resource i2c_power_resources[] = {
409 { 376 {
410 .start = 0x40f00180, 377 .start = 0x40f00180,
@@ -430,18 +397,16 @@ void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
430} 397}
431 398
432static struct platform_device *devices[] __initdata = { 399static struct platform_device *devices[] __initdata = {
433 &pxa_device_mci,
434 &pxa_device_udc, 400 &pxa_device_udc,
435 &pxa_device_fb,
436 &pxa_device_ffuart, 401 &pxa_device_ffuart,
437 &pxa_device_btuart, 402 &pxa_device_btuart,
438 &pxa_device_stuart, 403 &pxa_device_stuart,
439 &pxa_device_i2c,
440 &pxa_device_i2s, 404 &pxa_device_i2s,
441 &pxa_device_ficp,
442 &pxa_device_rtc, 405 &pxa_device_rtc,
443 &pxa27x_device_i2c_power, 406 &pxa27x_device_i2c_power,
444 &pxa27x_device_ohci, 407 &pxa27x_device_ssp1,
408 &pxa27x_device_ssp2,
409 &pxa27x_device_ssp3,
445}; 410};
446 411
447static int __init pxa27x_init(void) 412static int __init pxa27x_init(void)
@@ -452,9 +417,9 @@ static int __init pxa27x_init(void)
452 417
453 if ((ret = pxa_init_dma(32))) 418 if ((ret = pxa_init_dma(32)))
454 return ret; 419 return ret;
455#ifdef CONFIG_PM 420
456 pxa27x_init_pm(); 421 pxa27x_init_pm();
457#endif 422
458 ret = platform_add_devices(devices, ARRAY_SIZE(devices)); 423 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
459 } 424 }
460 return ret; 425 return ret;