diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-10-03 16:12:03 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-10-03 16:12:03 +0000 |
commit | 899077ffa5c24ae2af4273dd7a053ee27c7d1b17 (patch) | |
tree | 5097d7b872b92c5605e0b46bae8492ac95e7cebf /target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch | |
parent | f004690f1a9a4c5b67c10f0b1c32c1caaeed837d (diff) | |
download | master-187ad058-899077ffa5c24ae2af4273dd7a053ee27c7d1b17.tar.gz master-187ad058-899077ffa5c24ae2af4273dd7a053ee27c7d1b17.tar.bz2 master-187ad058-899077ffa5c24ae2af4273dd7a053ee27c7d1b17.zip |
[pxa] fix build with latest gpiolib changes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33605 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch')
-rw-r--r-- | target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch b/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch index 04d8a2f88e..9d1c0c2321 100644 --- a/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch +++ b/target/linux/pxa/patches-3.3/001-gumstix_verdex_pro_arch_support.patch @@ -75,7 +75,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> obj-$(CONFIG_MACH_INTELMOTE2) += stargate2.o --- /dev/null +++ b/arch/arm/mach-pxa/gumstix-verdex.c -@@ -0,0 +1,793 @@ +@@ -0,0 +1,794 @@ +/* + * linux/arch/arm/mach-pxa/gumstix-verdex.c + * @@ -103,6 +103,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#include <linux/i2c/tsc2007.h> +#include <linux/i2c/pxa-i2c.h> +#include <linux/gpio.h> ++#include <linux/gpio-pxa.h> + +#include <asm/setup.h> +#include <asm/memory.h> @@ -371,8 +372,8 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + +inline void __init gumstix_pcmcia_cpld_clk(void) +{ -+ GPCR(GPIO_GUMSTIX_nPOE) = GPIO_bit(GPIO_GUMSTIX_nPOE); -+ GPSR(GPIO_GUMSTIX_nPOE) = GPIO_bit(GPIO_GUMSTIX_nPOE); ++ gpio_set_value(GPIO_GUMSTIX_nPOE, 0); ++ gpio_set_value(GPIO_GUMSTIX_nPOE, 1); +} + +inline unsigned char __init gumstix_pcmcia_cpld_read_bits(int bits) @@ -381,7 +382,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + unsigned int shift = 0; + while(bits--) + { -+ result |= !!(GPLR(GPIO_GUMSTIX_nCD_0) & GPIO_bit(GPIO_GUMSTIX_nCD_0)) << shift; ++ result |= !!(gpio_get_value(GPIO_GUMSTIX_nCD_0) & GPIO_bit(GPIO_GUMSTIX_nCD_0)) << shift; + shift ++; + gumstix_pcmcia_cpld_clk(); + } @@ -438,15 +439,15 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + } + + // Setup the shift register -+ GPSR(GPIO_GUMSTIX_nPCE_1) = GPIO_bit(GPIO_GUMSTIX_nPCE_1); -+ GPCR(GPIO_GUMSTIX_nPCE_2) = GPIO_bit(GPIO_GUMSTIX_nPCE_2); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_1, 1); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_2, 0); + + // Tick the clock to program the shift register + gumstix_pcmcia_cpld_clk(); + + // Now set shift register into read mode -+ GPCR(GPIO_GUMSTIX_nPCE_1) = GPIO_bit(GPIO_GUMSTIX_nPCE_1); -+ GPSR(GPIO_GUMSTIX_nPCE_2) = GPIO_bit(GPIO_GUMSTIX_nPCE_2); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_1, 0); ++ gpio_set_value(GPIO_GUMSTIX_nPCE_2, 1); + + // We can read the bits now -- 0xC2 means "Dual compact flash" + if(gumstix_pcmcia_cpld_read_bits(8) != 0xC2) @@ -574,9 +575,9 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + if(on_or_off) { + gpio_direction_input(17); + } else { -+ GPCR(17) = GPIO_bit(17); ++ gpio_set_value(17, 0); + gpio_direction_output(17, 0); -+ GPCR(17) = GPIO_bit(17); ++ gpio_set_value(17, 0); + } + + return; @@ -843,7 +844,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#ifdef CONFIG_FB_PXA_SHARP_LQ043_PSP + /* DISP must be always high while screen is on */ + gpio_direction_output(GPIO77, 0); -+ GPSR(GPIO77) = GPIO_bit(GPIO77); ++ gpio_set_value(GPIO77, 1); +#endif + verdex_udc_init(); + verdex_mmc_init(); |