From 03f5b2cee6cabd0400b9f89956c373a0b5d3802a Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 8 Nov 2007 11:17:19 +0000 Subject: [ARM] pxa: avoid always registering MMC, I2C, IrDA and framebuffer devices Only register the MMC, framebuffer, I2C and FICP devices when the platform supplies the necessary platform data structures for the devices. Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa27x.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'arch/arm/mach-pxa/pxa27x.c') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 8e126e6b74c..e7151dba668 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -401,7 +401,7 @@ struct platform_device pxa27x_device_ohci = { void __init pxa_set_ohci_info(struct pxaohci_platform_data *info) { - pxa27x_device_ohci.dev.platform_data = info; + pxa_register_device(&pxa27x_device_ohci, info); } static struct resource i2c_power_resources[] = { @@ -424,18 +424,13 @@ struct platform_device pxa27x_device_i2c_power = { }; static struct platform_device *devices[] __initdata = { - &pxa_device_mci, &pxa_device_udc, - &pxa_device_fb, &pxa_device_ffuart, &pxa_device_btuart, &pxa_device_stuart, - &pxa_device_i2c, &pxa_device_i2s, - &pxa_device_ficp, &pxa_device_rtc, &pxa27x_device_i2c_power, - &pxa27x_device_ohci, }; static int __init pxa27x_init(void) -- cgit v1.2.3 From d8e0db1111b51558456466f66c9115d71b68e8b9 Mon Sep 17 00:00:00 2001 From: eric miao Date: Mon, 10 Dec 2007 17:54:36 +0800 Subject: [ARM] pxa: add ssp devices and clk support for pxa25x/pxa27x/pxa3xx Signed-off-by: eric miao Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa27x.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-pxa/pxa27x.c') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index e7151dba668..12dd2b0629b 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -150,11 +150,12 @@ static struct clk pxa27x_clks[] = { INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev), INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL), + INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), + INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), + INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), + /* INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL), - INIT_CKEN("SSPCLK", SSP1, 13000000, 0, NULL), - INIT_CKEN("SSPCLK", SSP2, 13000000, 0, NULL), - INIT_CKEN("SSPCLK", SSP3, 13000000, 0, NULL), INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL), INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL), INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL), @@ -431,6 +432,9 @@ static struct platform_device *devices[] __initdata = { &pxa_device_i2s, &pxa_device_rtc, &pxa27x_device_i2c_power, + &pxa27x_device_ssp1, + &pxa27x_device_ssp2, + &pxa27x_device_ssp3, }; static int __init pxa27x_init(void) -- cgit v1.2.3 From ec68e45b75adab3a78dea4ecf0e645127deee8ae Mon Sep 17 00:00:00 2001 From: eric miao Date: Wed, 12 Dec 2007 09:29:33 +0800 Subject: [ARM] pxa: move pxa27x_device_ohci out of pxa27x.c for use with pxa3xx Signed-off-by: eric miao Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa27x.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'arch/arm/mach-pxa/pxa27x.c') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 12dd2b0629b..ec7597b1cb5 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -374,37 +374,6 @@ void __init pxa27x_init_irq(void) * device registration specific to PXA27x. */ -static u64 pxa27x_dmamask = 0xffffffffUL; - -static struct resource pxa27x_ohci_resources[] = { - [0] = { - .start = 0x4C000000, - .end = 0x4C00ff6f, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = IRQ_USBH1, - .end = IRQ_USBH1, - .flags = IORESOURCE_IRQ, - }, -}; - -struct platform_device pxa27x_device_ohci = { - .name = "pxa27x-ohci", - .id = -1, - .dev = { - .dma_mask = &pxa27x_dmamask, - .coherent_dma_mask = 0xffffffff, - }, - .num_resources = ARRAY_SIZE(pxa27x_ohci_resources), - .resource = pxa27x_ohci_resources, -}; - -void __init pxa_set_ohci_info(struct pxaohci_platform_data *info) -{ - pxa_register_device(&pxa27x_device_ohci, info); -} - static struct resource i2c_power_resources[] = { { .start = 0x40f00180, -- cgit v1.2.3 From 8785a8fbd5a1624dbabd7c782524450e902b722e Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 14 Jan 2008 17:02:33 +0000 Subject: [ARM] pxa: move memory controller registers into pxa2xx-regs.h PXA3 has a different memory controller from PXA2 platforms. Avoid clashing definitions by moving the PXA2 definitions to pxa2xx-regs.h Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa27x.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-pxa/pxa27x.c') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index ec7597b1cb5..b9fa5ec0a95 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From f79299ca85f6f8c8817bc38494f7caa0a7043c3b Mon Sep 17 00:00:00 2001 From: eric miao Date: Wed, 2 Jan 2008 08:24:49 +0800 Subject: [ARM] pxa: clean up pxa{27x,25x}_init_pm() to empty if CONFIG_PM not defined Signed-off-by: eric miao Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa27x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-pxa/pxa27x.c') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index b9fa5ec0a95..f33c9d7ff87 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -306,6 +306,8 @@ static void __init pxa27x_init_pm(void) { pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns; } +#else +static inline void pxa27x_init_pm(void) {} #endif /* PXA27x: Various gpios can issue wakeup events. This logic only @@ -415,9 +417,9 @@ static int __init pxa27x_init(void) if ((ret = pxa_init_dma(32))) return ret; -#ifdef CONFIG_PM + pxa27x_init_pm(); -#endif + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); } return ret; -- cgit v1.2.3 From fd8e7af8d0fd3febc87607214d5dd545089edc71 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 23 Jan 2008 12:33:31 +0000 Subject: [ARM] pxa: Avoid fiddling with CKEN register on suspend The PXA manuals indicate that when in standby or sleep modes, clocks to peripherals are shut off by the processor itself. Eg: PXA270 standby: "In standby mode, all clocks are disabled except those for the power manager and the RTC." PXA270 sleep: "In sleep mode, all clocks are disabled to the processor and to all peripherals except the RTC." PXA255 sleep: "In Sleep Mode, all processor and peripheral clocks are disabled, except the RTC." Therefore, it should be safe to leave the clock enable register alone prior to entering low power modes for these SoCs. Signed-off-by: Russell King --- arch/arm/mach-pxa/pxa27x.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/arm/mach-pxa/pxa27x.c') diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index f33c9d7ff87..db0c4c6fea9 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c @@ -265,12 +265,6 @@ void pxa27x_cpu_pm_enter(suspend_state_t state) { extern void pxa_cpu_standby(void); - if (state == PM_SUSPEND_STANDBY) - CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER) | - (1 << CKEN_LCD) | (1 << CKEN_PWM0); - else - CKEN = (1 << CKEN_MEMC) | (1 << CKEN_OSTIMER); - /* ensure voltage-change sequencer not initiated, which hangs */ PCFR &= ~PCFR_FVC; -- cgit v1.2.3