1 From ee8ca5742e0000dd2369ef4d328c2c1117276a3b Mon Sep 17 00:00:00 2001
2 From: Dmitry Baryshkov <dbaryshkov@gmail.com>
3 Date: Mon, 4 Feb 2008 02:56:28 +0300
4 Subject: [PATCH 20/64] Provide dew device/clock backports from 2.6.24-git
6 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
9 arch/arm/mach-pxa/devices.h | 12 ++++++++++++
10 arch/arm/mach-pxa/pxa25x.c | 18 ++++++++++++------
11 arch/arm/mach-pxa/pxa27x.c | 22 ++++++++++++++++------
12 arch/arm/mach-pxa/pxa3xx.c | 30 ++++++++++++++++++++++++++++++
14 6 files changed, 72 insertions(+), 12 deletions(-)
16 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
17 index 1be7182..10faf9c 100644
18 --- a/arch/arm/Kconfig
19 +++ b/arch/arm/Kconfig
20 @@ -367,6 +367,7 @@ config ARCH_SA1100
21 select ARCH_DISCONTIGMEM_ENABLE
26 Support for StrongARM 11x0 based boards.
28 diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
29 index 94c8d5c..96c7c89 100644
30 --- a/arch/arm/mach-pxa/devices.h
31 +++ b/arch/arm/mach-pxa/devices.h
33 extern struct platform_device pxa_device_mci;
34 +extern struct platform_device pxa3xx_device_mci2;
35 +extern struct platform_device pxa3xx_device_mci3;
36 extern struct platform_device pxa_device_udc;
37 extern struct platform_device pxa_device_fb;
38 extern struct platform_device pxa_device_ffuart;
39 @@ -12,3 +14,13 @@ extern struct platform_device pxa_device_rtc;
41 extern struct platform_device pxa27x_device_i2c_power;
42 extern struct platform_device pxa27x_device_ohci;
44 +extern struct platform_device pxa25x_device_ssp;
45 +extern struct platform_device pxa25x_device_nssp;
46 +extern struct platform_device pxa25x_device_assp;
47 +extern struct platform_device pxa27x_device_ssp1;
48 +extern struct platform_device pxa27x_device_ssp2;
49 +extern struct platform_device pxa27x_device_ssp3;
50 +extern struct platform_device pxa3xx_device_ssp4;
52 +void __init pxa_register_device(struct platform_device *dev, void *data);
53 diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
54 index 006a6e0..5988d99 100644
55 --- a/arch/arm/mach-pxa/pxa25x.c
56 +++ b/arch/arm/mach-pxa/pxa25x.c
57 @@ -123,12 +123,15 @@ static struct clk pxa25x_clks[] = {
58 INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
59 INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
60 INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
62 + INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev),
63 + INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev),
64 + INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev),
67 INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
68 INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
69 - INIT_CKEN("SSPCLK", SSP, 3686400, 0, NULL),
70 INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL),
71 - INIT_CKEN("NSSPCLK", NSSP, 3686400, 0, NULL),
73 INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
75 @@ -216,8 +219,6 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
77 static void pxa25x_cpu_pm_enter(suspend_state_t state)
83 /* set resume return address */
84 @@ -239,6 +240,8 @@ static void __init pxa25x_init_pm(void)
86 pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns;
89 +static inline void pxa25x_init_pm(void) {}
92 /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm
93 @@ -300,6 +303,9 @@ static struct platform_device *pxa25x_devices[] __initdata = {
98 + &pxa25x_device_nssp,
99 + &pxa25x_device_assp,
102 static int __init pxa25x_init(void)
103 @@ -315,9 +321,9 @@ static int __init pxa25x_init(void)
105 if ((ret = pxa_init_dma(16)))
112 ret = platform_add_devices(pxa25x_devices,
113 ARRAY_SIZE(pxa25x_devices));
115 diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
116 index 8e126e6..30ca4fd 100644
117 --- a/arch/arm/mach-pxa/pxa27x.c
118 +++ b/arch/arm/mach-pxa/pxa27x.c
119 @@ -150,11 +150,12 @@ static struct clk pxa27x_clks[] = {
120 INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
121 INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
123 + INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
124 + INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
125 + INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
128 INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
129 - INIT_CKEN("SSPCLK", SSP1, 13000000, 0, NULL),
130 - INIT_CKEN("SSPCLK", SSP2, 13000000, 0, NULL),
131 - INIT_CKEN("SSPCLK", SSP3, 13000000, 0, NULL),
132 INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
133 INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL),
134 INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL),
135 @@ -304,6 +305,8 @@ static void __init pxa27x_init_pm(void)
137 pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns;
140 +static inline void pxa27x_init_pm(void) {}
143 /* PXA27x: Various gpios can issue wakeup events. This logic only
144 @@ -423,6 +426,11 @@ struct platform_device pxa27x_device_i2c_power = {
145 .num_resources = ARRAY_SIZE(i2c_power_resources),
148 +void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
150 + pxa27x_device_i2c_power.dev.platform_data = info;
153 static struct platform_device *devices[] __initdata = {
156 @@ -435,7 +443,9 @@ static struct platform_device *devices[] __initdata = {
159 &pxa27x_device_i2c_power,
160 - &pxa27x_device_ohci,
161 + &pxa27x_device_ssp1,
162 + &pxa27x_device_ssp2,
163 + &pxa27x_device_ssp3,
166 static int __init pxa27x_init(void)
167 @@ -446,9 +456,9 @@ static int __init pxa27x_init(void)
169 if ((ret = pxa_init_dma(32)))
176 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
179 diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
180 index 61d9c9d..ccab9da 100644
181 --- a/arch/arm/mach-pxa/pxa3xx.c
182 +++ b/arch/arm/mach-pxa/pxa3xx.c
183 @@ -189,8 +189,31 @@ static struct clk pxa3xx_clks[] = {
185 PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
186 PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
187 + PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
189 + PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
190 + PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
191 + PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
192 + PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
194 + PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
195 + PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
196 + PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
200 +#define SLEEP_SAVE_SIZE 4
202 +#define ISRAM_START 0x5c000000
203 +#define ISRAM_SIZE SZ_256K
205 +static inline void pxa3xx_init_pm(void) {}
206 +static inline void pxa3xx_init_irq_pm(void) {}
208 +static inline void pxa3xx_init_pm(void) {}
209 +static inline void pxa3xx_init_irq_pm(void) {}
212 void __init pxa3xx_init_irq(void)
214 /* enable CP6 access */
215 @@ -202,6 +225,7 @@ void __init pxa3xx_init_irq(void)
218 pxa_init_irq_gpio(128);
219 + pxa3xx_init_irq_pm();
223 @@ -219,6 +243,10 @@ static struct platform_device *devices[] __initdata = {
227 + &pxa27x_device_ssp1,
228 + &pxa27x_device_ssp2,
229 + &pxa27x_device_ssp3,
230 + &pxa3xx_device_ssp4,
233 static int __init pxa3xx_init(void)
234 @@ -231,6 +259,8 @@ static int __init pxa3xx_init(void)
235 if ((ret = pxa_init_dma(32)))
240 return platform_add_devices(devices, ARRAY_SIZE(devices));
243 diff --git a/kernel/Makefile b/kernel/Makefile
244 index dfa9695..6d9a87c 100644
245 --- a/kernel/Makefile
246 +++ b/kernel/Makefile
247 @@ -57,6 +57,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
248 obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
249 obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
250 obj-$(CONFIG_MARKERS) += marker.o
251 +obj-$(CONFIG_LATENCYTOP) += latencytop.o
253 ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
254 # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is