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/005-verdex_pcmcia_support.patch | |
parent | f004690f1a9a4c5b67c10f0b1c32c1caaeed837d (diff) | |
download | upstream-899077ffa5c24ae2af4273dd7a053ee27c7d1b17.tar.gz upstream-899077ffa5c24ae2af4273dd7a053ee27c7d1b17.tar.bz2 upstream-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/005-verdex_pcmcia_support.patch')
-rw-r--r-- | target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch b/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch index f2a53d35c6..f369cf21d3 100644 --- a/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch +++ b/target/linux/pxa/patches-3.3/005-verdex_pcmcia_support.patch @@ -38,7 +38,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> obj-$(CONFIG_PCMCIA_XXS1500) += xxs1500_ss.o --- /dev/null +++ b/drivers/pcmcia/pxa2xx_gumstix.c -@@ -0,0 +1,194 @@ +@@ -0,0 +1,195 @@ +/* + * linux/drivers/pcmcia/pxa2xx_gumstix.c + * @@ -62,16 +62,14 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +#include <linux/delay.h> +#include <linux/platform_device.h> + ++#include <linux/gpio-pxa.h> ++ +#include <pcmcia/ss.h> + +#include <mach/hardware.h> +#include <asm/mach-types.h> + -+#ifdef CONFIG_MACH_GUMSTIX_VERDEX -+#include <mach/pxa27x.h> -+#else +#include <mach/pxa27x.h> -+#endif + +#include <asm/io.h> +#include <mach/gpio.h> @@ -80,6 +78,9 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + +#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) + ++#define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) ++#define GPLR(x) __REG2(0x40E00000, BANK_OFF((x) >> 5)) ++ +static struct pcmcia_irqs gumstix_pcmcia_irqs0[] = { + { 0, GUMSTIX_S0_nCD_IRQ, "CF0 nCD" }, + { 0, GUMSTIX_S0_nSTSCHG_IRQ, "CF0 nSTSCHG" }, @@ -98,7 +99,7 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> +/* Note: The verdex_pcmcia_pin_config is moved to gumstix_verdex.c in order to use mfp_pxa2xx_config + for board-specific pin configuration instead of the old deprecated pxa_gpio_mode function. Thus, + only the IRQ init is still needed to be done here. */ -+ skt->irq = (skt->nr == 0) ? ((net_cf_vx_mode == 0) ? GUMSTIX_S0_PRDY_nBSY_IRQ : GUMSTIX_S0_PRDY_nBSY_OLD_IRQ) : GUMSTIX_S1_PRDY_nBSY_IRQ; ++ skt->socket.pci_irq = (skt->nr == 0) ? ((net_cf_vx_mode == 0) ? GUMSTIX_S0_PRDY_nBSY_IRQ : GUMSTIX_S0_PRDY_nBSY_OLD_IRQ) : GUMSTIX_S1_PRDY_nBSY_IRQ; + + return (skt->nr == 0) ? soc_pcmcia_request_irqs(skt, gumstix_pcmcia_irqs0, ARRAY_SIZE(gumstix_pcmcia_irqs0)) : + soc_pcmcia_request_irqs(skt, gumstix_pcmcia_irqs1, ARRAY_SIZE(gumstix_pcmcia_irqs1)); @@ -138,9 +139,9 @@ Signed-off-by: Bobby Powers <bobbypowers@gmail.com> + prdy_nbsy = GPIO_GUMSTIX_PRDY_nBSY_1; + nbvd1 = GPIO_GUMSTIX_nBVD1_1; + } -+ state->detect = !(GPLR(cd) & GPIO_bit(cd)); -+ state->ready = !!(GPLR(prdy_nbsy) & GPIO_bit(prdy_nbsy)); -+ state->bvd1 = !!(GPLR(nbvd1) & GPIO_bit(nbvd1)); ++ state->detect = !!gpio_get_value(cd); ++ state->ready = !!gpio_get_value(prdy_nbsy); ++ state->bvd1 = !!gpio_get_value(nbvd1); + state->bvd2 = 1; + state->vs_3v = 0; + state->vs_Xv = 0; |