diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
commit | bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch) | |
tree | 427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /arch/arm/mach-pxa | |
parent | 3d29cdff999c37b3876082278a8134a0642a02cd (diff) | |
parent | dc87c3985e9b442c60994308a96f887579addc39 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/Makefile
drivers/usb/input/gtco.c
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/corgi_pm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pm.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-pxa/sharpsl_pm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz_pm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 3 |
6 files changed, 58 insertions, 10 deletions
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c index 165017de8d0d..392c38717362 100644 --- a/arch/arm/mach-pxa/corgi_pm.c +++ b/arch/arm/mach-pxa/corgi_pm.c | |||
@@ -16,7 +16,8 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <asm/apm-emulation.h> | 19 | #include <linux/apm-emulation.h> |
20 | |||
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 9de1278d234f..b8cb79f899d5 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | 37 | ||
38 | #include <asm/arch/pxa-regs.h> | 38 | #include <asm/arch/pxa-regs.h> |
39 | #include <asm/arch/gpio.h> | ||
39 | #include <asm/arch/udc.h> | 40 | #include <asm/arch/udc.h> |
40 | #include <asm/arch/pxafb.h> | 41 | #include <asm/arch/pxafb.h> |
41 | #include <asm/arch/mmc.h> | 42 | #include <asm/arch/mmc.h> |
@@ -106,13 +107,16 @@ unsigned long long sched_clock(void) | |||
106 | * Handy function to set GPIO alternate functions | 107 | * Handy function to set GPIO alternate functions |
107 | */ | 108 | */ |
108 | 109 | ||
109 | void pxa_gpio_mode(int gpio_mode) | 110 | int pxa_gpio_mode(int gpio_mode) |
110 | { | 111 | { |
111 | unsigned long flags; | 112 | unsigned long flags; |
112 | int gpio = gpio_mode & GPIO_MD_MASK_NR; | 113 | int gpio = gpio_mode & GPIO_MD_MASK_NR; |
113 | int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; | 114 | int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8; |
114 | int gafr; | 115 | int gafr; |
115 | 116 | ||
117 | if (gpio > PXA_LAST_GPIO) | ||
118 | return -EINVAL; | ||
119 | |||
116 | local_irq_save(flags); | 120 | local_irq_save(flags); |
117 | if (gpio_mode & GPIO_DFLT_LOW) | 121 | if (gpio_mode & GPIO_DFLT_LOW) |
118 | GPCR(gpio) = GPIO_bit(gpio); | 122 | GPCR(gpio) = GPIO_bit(gpio); |
@@ -125,11 +129,33 @@ void pxa_gpio_mode(int gpio_mode) | |||
125 | gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); | 129 | gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); |
126 | GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); | 130 | GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); |
127 | local_irq_restore(flags); | 131 | local_irq_restore(flags); |
132 | |||
133 | return 0; | ||
128 | } | 134 | } |
129 | 135 | ||
130 | EXPORT_SYMBOL(pxa_gpio_mode); | 136 | EXPORT_SYMBOL(pxa_gpio_mode); |
131 | 137 | ||
132 | /* | 138 | /* |
139 | * Return GPIO level | ||
140 | */ | ||
141 | int pxa_gpio_get_value(unsigned gpio) | ||
142 | { | ||
143 | return __gpio_get_value(gpio); | ||
144 | } | ||
145 | |||
146 | EXPORT_SYMBOL(pxa_gpio_get_value); | ||
147 | |||
148 | /* | ||
149 | * Set output GPIO level | ||
150 | */ | ||
151 | void pxa_gpio_set_value(unsigned gpio, int value) | ||
152 | { | ||
153 | __gpio_set_value(gpio, value); | ||
154 | } | ||
155 | |||
156 | EXPORT_SYMBOL(pxa_gpio_set_value); | ||
157 | |||
158 | /* | ||
133 | * Routine to safely enable or disable a clock in the CKEN | 159 | * Routine to safely enable or disable a clock in the CKEN |
134 | */ | 160 | */ |
135 | void pxa_set_cken(int clock, int enable) | 161 | void pxa_set_cken(int clock, int enable) |
@@ -338,6 +364,27 @@ static struct platform_device i2c_device = { | |||
338 | .num_resources = ARRAY_SIZE(i2c_resources), | 364 | .num_resources = ARRAY_SIZE(i2c_resources), |
339 | }; | 365 | }; |
340 | 366 | ||
367 | #ifdef CONFIG_PXA27x | ||
368 | static struct resource i2c_power_resources[] = { | ||
369 | { | ||
370 | .start = 0x40f00180, | ||
371 | .end = 0x40f001a3, | ||
372 | .flags = IORESOURCE_MEM, | ||
373 | }, { | ||
374 | .start = IRQ_PWRI2C, | ||
375 | .end = IRQ_PWRI2C, | ||
376 | .flags = IORESOURCE_IRQ, | ||
377 | }, | ||
378 | }; | ||
379 | |||
380 | static struct platform_device i2c_power_device = { | ||
381 | .name = "pxa2xx-i2c", | ||
382 | .id = 1, | ||
383 | .resource = i2c_power_resources, | ||
384 | .num_resources = ARRAY_SIZE(i2c_resources), | ||
385 | }; | ||
386 | #endif | ||
387 | |||
341 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | 388 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) |
342 | { | 389 | { |
343 | i2c_device.dev.platform_data = info; | 390 | i2c_device.dev.platform_data = info; |
@@ -392,6 +439,9 @@ static struct platform_device *devices[] __initdata = { | |||
392 | &stuart_device, | 439 | &stuart_device, |
393 | &pxaficp_device, | 440 | &pxaficp_device, |
394 | &i2c_device, | 441 | &i2c_device, |
442 | #ifdef CONFIG_PXA27x | ||
443 | &i2c_power_device, | ||
444 | #endif | ||
395 | &i2s_device, | 445 | &i2s_device, |
396 | &pxartc_device, | 446 | &pxartc_device, |
397 | }; | 447 | }; |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index b4d8276d6050..6bf15ae73848 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -223,14 +223,11 @@ int pxa_pm_finish(suspend_state_t state) | |||
223 | 223 | ||
224 | EXPORT_SYMBOL_GPL(pxa_pm_finish); | 224 | EXPORT_SYMBOL_GPL(pxa_pm_finish); |
225 | 225 | ||
226 | /* | ||
227 | * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk. | ||
228 | */ | ||
229 | static struct pm_ops pxa_pm_ops = { | 226 | static struct pm_ops pxa_pm_ops = { |
230 | .pm_disk_mode = PM_DISK_FIRMWARE, | ||
231 | .prepare = pxa_pm_prepare, | 227 | .prepare = pxa_pm_prepare, |
232 | .enter = pxa_pm_enter, | 228 | .enter = pxa_pm_enter, |
233 | .finish = pxa_pm_finish, | 229 | .finish = pxa_pm_finish, |
230 | .valid = pm_valid_only_mem, | ||
234 | }; | 231 | }; |
235 | 232 | ||
236 | static int __init pxa_pm_init(void) | 233 | static int __init pxa_pm_init(void) |
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index b1d8cfca245a..f9d1b61e1185 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
@@ -20,10 +20,10 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/apm-emulation.h> | ||
23 | 24 | ||
24 | #include <asm/hardware.h> | 25 | #include <asm/hardware.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | #include <asm/apm-emulation.h> | ||
27 | #include <asm/arch/pm.h> | 27 | #include <asm/arch/pm.h> |
28 | #include <asm/arch/pxa-regs.h> | 28 | #include <asm/arch/pxa-regs.h> |
29 | #include <asm/arch/sharpsl.h> | 29 | #include <asm/arch/sharpsl.h> |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index b97d543d9364..745a4dc7acdd 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -16,7 +16,8 @@ | |||
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <asm/apm-emulation.h> | 19 | #include <linux/apm-emulation.h> |
20 | |||
20 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 7915a5a22865..72738771fb57 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <asm/arch/pxa-regs.h> | ||
31 | #include <asm/arch/irda.h> | 32 | #include <asm/arch/irda.h> |
32 | #include <asm/arch/mmc.h> | 33 | #include <asm/arch/mmc.h> |
33 | #include <asm/arch/udc.h> | 34 | #include <asm/arch/udc.h> |
@@ -35,8 +36,6 @@ | |||
35 | #include <asm/mach/arch.h> | 36 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/map.h> | 37 | #include <asm/mach/map.h> |
37 | #include <asm/mach/irq.h> | 38 | #include <asm/mach/irq.h> |
38 | |||
39 | #include <asm/arch/pxa-regs.h> | ||
40 | #include <asm/arch/tosa.h> | 39 | #include <asm/arch/tosa.h> |
41 | 40 | ||
42 | #include <asm/hardware/scoop.h> | 41 | #include <asm/hardware/scoop.h> |