diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-04-28 16:41:01 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-04-28 16:41:01 -0400 |
commit | 10993374f84cc1c4100aea9eca7fa154518ffc5e (patch) | |
tree | 0694a5c1119368b3bca4c17c5bc3a14a5bfa77e8 | |
parent | a133e775d533c0035af627693dec288f1b1d4ffc (diff) | |
parent | fc76132b1e72efe45b5a5a693caadd54c3037f55 (diff) |
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
-rw-r--r-- | arch/arm/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/configs/viper_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-pxa/littleton.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-pxa/zylonite_pxa300.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-pxa/zylonite_pxa320.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-pxa/gpio.c | 23 |
8 files changed, 54 insertions, 13 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cfd99649ad85..99875dd06f50 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -486,8 +486,6 @@ config ARCH_PXA | |||
486 | select HAVE_CLK | 486 | select HAVE_CLK |
487 | select COMMON_CLKDEV | 487 | select COMMON_CLKDEV |
488 | select ARCH_REQUIRE_GPIOLIB | 488 | select ARCH_REQUIRE_GPIOLIB |
489 | select HAVE_CLK | ||
490 | select COMMON_CLKDEV | ||
491 | select GENERIC_TIME | 489 | select GENERIC_TIME |
492 | select GENERIC_CLOCKEVENTS | 490 | select GENERIC_CLOCKEVENTS |
493 | select TICK_ONESHOT | 491 | select TICK_ONESHOT |
@@ -1173,12 +1171,6 @@ config CPU_FREQ_IMX | |||
1173 | 1171 | ||
1174 | If in doubt, say N. | 1172 | If in doubt, say N. |
1175 | 1173 | ||
1176 | config CPU_FREQ_PXA | ||
1177 | bool | ||
1178 | depends on CPU_FREQ && ARCH_PXA && PXA25x | ||
1179 | default y | ||
1180 | select CPU_FREQ_DEFAULT_GOV_USERSPACE | ||
1181 | |||
1182 | endif | 1174 | endif |
1183 | 1175 | ||
1184 | source "drivers/cpuidle/Kconfig" | 1176 | source "drivers/cpuidle/Kconfig" |
diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig index 30f463d2fa8a..6ab5dd5868de 100644 --- a/arch/arm/configs/viper_defconfig +++ b/arch/arm/configs/viper_defconfig | |||
@@ -298,7 +298,6 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=m | |||
298 | CONFIG_CPU_FREQ_GOV_USERSPACE=m | 298 | CONFIG_CPU_FREQ_GOV_USERSPACE=m |
299 | CONFIG_CPU_FREQ_GOV_ONDEMAND=m | 299 | CONFIG_CPU_FREQ_GOV_ONDEMAND=m |
300 | CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m | 300 | CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m |
301 | CONFIG_CPU_FREQ_PXA=y | ||
302 | 301 | ||
303 | # | 302 | # |
304 | # Floating point emulation | 303 | # Floating point emulation |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index cdf21dd135b4..930e364ccde9 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -427,12 +427,22 @@ static struct pxa2xx_spi_master corgi_spi_info = { | |||
427 | .num_chipselect = 3, | 427 | .num_chipselect = 3, |
428 | }; | 428 | }; |
429 | 429 | ||
430 | static void corgi_wait_for_hsync(void) | ||
431 | { | ||
432 | while (gpio_get_value(CORGI_GPIO_HSYNC)) | ||
433 | cpu_relax(); | ||
434 | |||
435 | while (!gpio_get_value(CORGI_GPIO_HSYNC)) | ||
436 | cpu_relax(); | ||
437 | } | ||
438 | |||
430 | static struct ads7846_platform_data corgi_ads7846_info = { | 439 | static struct ads7846_platform_data corgi_ads7846_info = { |
431 | .model = 7846, | 440 | .model = 7846, |
432 | .vref_delay_usecs = 100, | 441 | .vref_delay_usecs = 100, |
433 | .x_plate_ohms = 419, | 442 | .x_plate_ohms = 419, |
434 | .y_plate_ohms = 486, | 443 | .y_plate_ohms = 486, |
435 | .gpio_pendown = CORGI_GPIO_TP_INT, | 444 | .gpio_pendown = CORGI_GPIO_TP_INT, |
445 | .wait_for_sync = corgi_wait_for_hsync, | ||
436 | }; | 446 | }; |
437 | 447 | ||
438 | static void corgi_ads7846_cs(u32 command) | 448 | static void corgi_ads7846_cs(u32 command) |
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index e13f6a81c223..c872b9feb4d4 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -334,6 +334,11 @@ static struct led_info littleton_da9034_leds[] = { | |||
334 | }, | 334 | }, |
335 | }; | 335 | }; |
336 | 336 | ||
337 | static struct da9034_touch_pdata littleton_da9034_touch = { | ||
338 | .x_inverted = 1, | ||
339 | .interval_ms = 20, | ||
340 | }; | ||
341 | |||
337 | static struct da903x_subdev_info littleton_da9034_subdevs[] = { | 342 | static struct da903x_subdev_info littleton_da9034_subdevs[] = { |
338 | { | 343 | { |
339 | .name = "da903x-led", | 344 | .name = "da903x-led", |
@@ -350,6 +355,10 @@ static struct da903x_subdev_info littleton_da9034_subdevs[] = { | |||
350 | }, { | 355 | }, { |
351 | .name = "da903x-backlight", | 356 | .name = "da903x-backlight", |
352 | .id = DA9034_ID_WLED, | 357 | .id = DA9034_ID_WLED, |
358 | }, { | ||
359 | .name = "da9034-touch", | ||
360 | .id = DA9034_ID_TOUCH, | ||
361 | .platform_data = &littleton_da9034_touch, | ||
353 | }, | 362 | }, |
354 | }; | 363 | }; |
355 | 364 | ||
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 8c61ddac119e..c18e34acafcb 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -299,12 +299,22 @@ static struct pxa2xx_spi_master spitz_spi_info = { | |||
299 | .num_chipselect = 3, | 299 | .num_chipselect = 3, |
300 | }; | 300 | }; |
301 | 301 | ||
302 | static void spitz_wait_for_hsync(void) | ||
303 | { | ||
304 | while (gpio_get_value(SPITZ_GPIO_HSYNC)) | ||
305 | cpu_relax(); | ||
306 | |||
307 | while (!gpio_get_value(SPITZ_GPIO_HSYNC)) | ||
308 | cpu_relax(); | ||
309 | } | ||
310 | |||
302 | static struct ads7846_platform_data spitz_ads7846_info = { | 311 | static struct ads7846_platform_data spitz_ads7846_info = { |
303 | .model = 7846, | 312 | .model = 7846, |
304 | .vref_delay_usecs = 100, | 313 | .vref_delay_usecs = 100, |
305 | .x_plate_ohms = 419, | 314 | .x_plate_ohms = 419, |
306 | .y_plate_ohms = 486, | 315 | .y_plate_ohms = 486, |
307 | .gpio_pendown = SPITZ_GPIO_TP_INT, | 316 | .gpio_pendown = SPITZ_GPIO_TP_INT, |
317 | .wait_for_sync = spitz_wait_for_hsync, | ||
308 | }; | 318 | }; |
309 | 319 | ||
310 | static void spitz_ads7846_cs(u32 command) | 320 | static void spitz_ads7846_cs(u32 command) |
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c index c1f73205d078..c256c57642c0 100644 --- a/arch/arm/mach-pxa/zylonite_pxa300.c +++ b/arch/arm/mach-pxa/zylonite_pxa300.c | |||
@@ -72,6 +72,7 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = { | |||
72 | GPIO25_AC97_SDATA_IN_0, | 72 | GPIO25_AC97_SDATA_IN_0, |
73 | GPIO27_AC97_SDATA_OUT, | 73 | GPIO27_AC97_SDATA_OUT, |
74 | GPIO28_AC97_SYNC, | 74 | GPIO28_AC97_SYNC, |
75 | GPIO17_GPIO, /* SDATA_IN_1 but unused - configure to GPIO */ | ||
75 | 76 | ||
76 | /* SSP3 */ | 77 | /* SSP3 */ |
77 | GPIO91_SSP3_SCLK, | 78 | GPIO91_SSP3_SCLK, |
@@ -126,6 +127,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = { | |||
126 | /* Standard I2C */ | 127 | /* Standard I2C */ |
127 | GPIO21_I2C_SCL, | 128 | GPIO21_I2C_SCL, |
128 | GPIO22_I2C_SDA, | 129 | GPIO22_I2C_SDA, |
130 | |||
131 | /* GPIO */ | ||
132 | GPIO18_GPIO, /* GPIO Expander #0 INT_N */ | ||
133 | GPIO19_GPIO, /* GPIO Expander #1 INT_N */ | ||
129 | }; | 134 | }; |
130 | 135 | ||
131 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { | 136 | static mfp_cfg_t pxa300_mfp_cfg[] __initdata = { |
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c index 4e1c488c6906..cc5a22833605 100644 --- a/arch/arm/mach-pxa/zylonite_pxa320.c +++ b/arch/arm/mach-pxa/zylonite_pxa320.c | |||
@@ -68,6 +68,7 @@ static mfp_cfg_t mfp_cfg[] __initdata = { | |||
68 | GPIO38_AC97_SYNC, | 68 | GPIO38_AC97_SYNC, |
69 | GPIO39_AC97_BITCLK, | 69 | GPIO39_AC97_BITCLK, |
70 | GPIO40_AC97_nACRESET, | 70 | GPIO40_AC97_nACRESET, |
71 | GPIO36_GPIO, /* SDATA_IN_1 but unused - configure to GPIO */ | ||
71 | 72 | ||
72 | /* SSP3 */ | 73 | /* SSP3 */ |
73 | GPIO89_SSP3_SCLK, | 74 | GPIO89_SSP3_SCLK, |
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c index af819bf21b63..abc79d44acaa 100644 --- a/arch/arm/plat-pxa/gpio.c +++ b/arch/arm/plat-pxa/gpio.c | |||
@@ -121,6 +121,8 @@ static int __init pxa_init_gpio_chip(int gpio_end) | |||
121 | return -ENOMEM; | 121 | return -ENOMEM; |
122 | } | 122 | } |
123 | 123 | ||
124 | memset(chips, 0, nbanks * sizeof(struct pxa_gpio_chip)); | ||
125 | |||
124 | for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) { | 126 | for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) { |
125 | struct gpio_chip *c = &chips[i].chip; | 127 | struct gpio_chip *c = &chips[i].chip; |
126 | 128 | ||
@@ -143,6 +145,21 @@ static int __init pxa_init_gpio_chip(int gpio_end) | |||
143 | return 0; | 145 | return 0; |
144 | } | 146 | } |
145 | 147 | ||
148 | /* Update only those GRERx and GFERx edge detection register bits if those | ||
149 | * bits are set in c->irq_mask | ||
150 | */ | ||
151 | static inline void update_edge_detect(struct pxa_gpio_chip *c) | ||
152 | { | ||
153 | uint32_t grer, gfer; | ||
154 | |||
155 | grer = __raw_readl(c->regbase + GRER_OFFSET) & ~c->irq_mask; | ||
156 | gfer = __raw_readl(c->regbase + GFER_OFFSET) & ~c->irq_mask; | ||
157 | grer |= c->irq_edge_rise & c->irq_mask; | ||
158 | gfer |= c->irq_edge_fall & c->irq_mask; | ||
159 | __raw_writel(grer, c->regbase + GRER_OFFSET); | ||
160 | __raw_writel(gfer, c->regbase + GFER_OFFSET); | ||
161 | } | ||
162 | |||
146 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | 163 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) |
147 | { | 164 | { |
148 | struct pxa_gpio_chip *c; | 165 | struct pxa_gpio_chip *c; |
@@ -181,8 +198,7 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | |||
181 | else | 198 | else |
182 | c->irq_edge_fall &= ~mask; | 199 | c->irq_edge_fall &= ~mask; |
183 | 200 | ||
184 | __raw_writel(c->irq_edge_rise & c->irq_mask, c->regbase + GRER_OFFSET); | 201 | update_edge_detect(c); |
185 | __raw_writel(c->irq_edge_fall & c->irq_mask, c->regbase + GFER_OFFSET); | ||
186 | 202 | ||
187 | pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio, | 203 | pr_debug("%s: IRQ%d (GPIO%d) - edge%s%s\n", __func__, irq, gpio, |
188 | ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""), | 204 | ((type & IRQ_TYPE_EDGE_RISING) ? " rising" : ""), |
@@ -244,8 +260,7 @@ static void pxa_unmask_muxed_gpio(unsigned int irq) | |||
244 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 260 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); |
245 | 261 | ||
246 | c->irq_mask |= GPIO_bit(gpio); | 262 | c->irq_mask |= GPIO_bit(gpio); |
247 | __raw_writel(c->irq_edge_rise & c->irq_mask, c->regbase + GRER_OFFSET); | 263 | update_edge_detect(c); |
248 | __raw_writel(c->irq_edge_fall & c->irq_mask, c->regbase + GFER_OFFSET); | ||
249 | } | 264 | } |
250 | 265 | ||
251 | static struct irq_chip pxa_muxed_gpio_chip = { | 266 | static struct irq_chip pxa_muxed_gpio_chip = { |