aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa27x.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-01-28 08:21:38 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-28 08:21:38 -0500
commit0ff66f0c7a5f1f4f5a0d91341b6f71fd2a49f0fa (patch)
tree7c4d74a76bf4f49e87d769c236fdd2db77fb241d /arch/arm/mach-pxa/pxa27x.c
parentc00d4ffdbace1bdc9fdd888e4ba6d207ffa3b679 (diff)
parent4e4fc05a2b6e7bd2e0facd96e0c18dceb34d9349 (diff)
Merge branch 'pxa-plat' into devel
* pxa-plat: (53 commits) [ARM] 4762/1: Basic support for Toradex Colibri module [ARM] pxa: fix mci_init functions returning -1 [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix [ARM] 4747/1: pcm027: support for pcm990 baseboard for phyCORE-PXA270 [ARM] 4746/1: pcm027: network support for phyCORE-PXA270 [ARM] 4745/1: pcm027: default configuration [ARM] 4744/1: pcm027: add support for phyCORE-PXA270 CPU module [NET] smc91x: Make smc91x use IRQ resource trigger flags [ARM] pxa: add default config for littleton [ARM] pxa: add basic support for Littleton (PXA3xx Form Factor Platform) [ARM] 4664/1: Add basic support for HTC Magician PDA phones [ARM] 4649/1: Base support for pxa-based Toshiba e-series PDAs. [ARM] pxa: skip registers saving/restoring if entering standby mode [ARM] pxa: fix PXA27x resume [ARM] pxa: Avoid fiddling with CKEN register on suspend [ARM] pxa: Add PXA3 standby code hooked into the IRQ wake scheme [ARM] pxa: Add zylonite MFP wakeup configurations [ARM] pxa: program MFPs for low power mode when suspending [ARM] pxa: make MFP configuration processor independent [ARM] pxa: remove un-used pxa3xx_mfp_set_xxx() functions ... Conflicts: arch/arm/mach-pxa/ssp.c Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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;