diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/at91_cf.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/omap_cf.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_base.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_cm_x270.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_lubbock.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_mainstone.c | 6 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_palmtx.c | 53 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_sharpsl.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/rsrc_nonstatic.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_assabet.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_badge4.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_cerf.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_h3600.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_jornada720.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_neponset.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_shannon.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_simpad.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/sa1111_generic.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/sa11xx_base.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/soc_common.c | 10 |
20 files changed, 91 insertions, 42 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 684968558c19..a0ffb8ebfe00 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c @@ -18,13 +18,13 @@ #include <pcmcia/ss.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/sizes.h> #include <asm/gpio.h> -#include <asm/arch/board.h> -#include <asm/arch/at91rm9200_mc.h> +#include <mach/board.h> +#include <mach/at91rm9200_mc.h> /* diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c index 569b746b5731..f3736398900e 100644 --- a/drivers/pcmcia/omap_cf.c +++ b/drivers/pcmcia/omap_cf.c @@ -19,12 +19,12 @@ #include <pcmcia/ss.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/sizes.h> -#include <asm/arch/mux.h> -#include <asm/arch/tc.h> +#include <mach/mux.h> +#include <mach/tc.h> /* NOTE: don't expect this to support many I/O cards. The 16xx chips have diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index ccfdf1969a7f..1b07af5a2ed3 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -24,12 +24,12 @@ #include <linux/spinlock.h> #include <linux/platform_device.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/system.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/pxa2xx-regs.h> +#include <mach/pxa-regs.h> +#include <mach/pxa2xx-regs.h> #include <pcmcia/cs_types.h> #include <pcmcia/ss.h> diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index bb95db7d2b76..bcff5cfed051 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c @@ -16,7 +16,7 @@ #include <linux/gpio.h> #include <asm/mach-types.h> -#include <asm/arch/pxa-regs.h> +#include <mach/pxa-regs.h> #include "soc_common.h" diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c index 881ec8a8e389..37ec55df086e 100644 --- a/drivers/pcmcia/pxa2xx_lubbock.c +++ b/drivers/pcmcia/pxa2xx_lubbock.c @@ -21,11 +21,11 @@ #include <linux/init.h> #include <linux/delay.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/hardware/sa1111.h> #include <asm/mach-types.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/lubbock.h> +#include <mach/pxa-regs.h> +#include <mach/lubbock.h> #include "sa1111_generic.h" diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c index 92d1cc33808c..877001db4916 100644 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ b/drivers/pcmcia/pxa2xx_mainstone.c @@ -21,12 +21,12 @@ #include <pcmcia/ss.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/irq.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/mainstone.h> +#include <mach/pxa-regs.h> +#include <mach/mainstone.h> #include "soc_common.h" diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/drivers/pcmcia/pxa2xx_palmtx.c index 4abde190c1f5..e07b5c51ec5b 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/drivers/pcmcia/pxa2xx_palmtx.c @@ -16,19 +16,64 @@ #include <asm/mach-types.h> -#include <asm/arch/gpio.h> -#include <asm/arch/palmtx.h> +#include <mach/gpio.h> +#include <mach/palmtx.h> #include "soc_common.h" static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { - skt->irq = IRQ_GPIO(GPIO_NR_PALMTX_PCMCIA_READY); + int ret; + + ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_POWER1, "PCMCIA PWR1"); + if (ret) + goto err1; + ret = gpio_direction_output(GPIO_NR_PALMTX_PCMCIA_POWER1, 0); + if (ret) + goto err2; + + ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_POWER2, "PCMCIA PWR2"); + if (ret) + goto err2; + ret = gpio_direction_output(GPIO_NR_PALMTX_PCMCIA_POWER2, 0); + if (ret) + goto err3; + + ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_RESET, "PCMCIA RST"); + if (ret) + goto err3; + ret = gpio_direction_output(GPIO_NR_PALMTX_PCMCIA_RESET, 1); + if (ret) + goto err4; + + ret = gpio_request(GPIO_NR_PALMTX_PCMCIA_READY, "PCMCIA RDY"); + if (ret) + goto err4; + ret = gpio_direction_input(GPIO_NR_PALMTX_PCMCIA_READY); + if (ret) + goto err5; + + skt->irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY); return 0; + +err5: + gpio_free(GPIO_NR_PALMTX_PCMCIA_READY); +err4: + gpio_free(GPIO_NR_PALMTX_PCMCIA_RESET); +err3: + gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER2); +err2: + gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER1); +err1: + return ret; } static void palmtx_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) { + gpio_free(GPIO_NR_PALMTX_PCMCIA_READY); + gpio_free(GPIO_NR_PALMTX_PCMCIA_RESET); + gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER2); + gpio_free(GPIO_NR_PALMTX_PCMCIA_POWER1); } static void palmtx_pcmcia_socket_state(struct soc_pcmcia_socket *skt, @@ -109,7 +154,7 @@ static void __exit palmtx_pcmcia_exit(void) platform_device_unregister(palmtx_pcmcia_device); } -fs_initcall(palmtx_pcmcia_init); +module_init(palmtx_pcmcia_init); module_exit(palmtx_pcmcia_exit); MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index d71f93d45833..1cd02f5a23a0 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -19,7 +19,7 @@ #include <linux/platform_device.h> #include <asm/mach-types.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/irq.h> #include <asm/hardware/scoop.h> diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c index d0c1d63d1891..203e579ebbd2 100644 --- a/drivers/pcmcia/rsrc_nonstatic.c +++ b/drivers/pcmcia/rsrc_nonstatic.c @@ -275,7 +275,7 @@ static int readable(struct pcmcia_socket *s, struct resource *res, destroy_cis_cache(s); } s->cis_mem.res = NULL; - if ((ret != 0) || (count == 0)) + if ((ret != 0) || (*count == 0)) return 0; return 1; } diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c index ce133ce81c10..f424146a2bc9 100644 --- a/drivers/pcmcia/sa1100_assabet.c +++ b/drivers/pcmcia/sa1100_assabet.c @@ -11,11 +11,11 @@ #include <linux/device.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/irq.h> #include <asm/signal.h> -#include <asm/arch/assabet.h> +#include <mach/assabet.h> #include "sa1100_generic.h" diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c index 607c3f326eca..1ca9737ea79e 100644 --- a/drivers/pcmcia/sa1100_badge4.c +++ b/drivers/pcmcia/sa1100_badge4.c @@ -18,9 +18,9 @@ #include <linux/errno.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> -#include <asm/arch/badge4.h> +#include <mach/badge4.h> #include <asm/hardware/sa1111.h> #include "sa1111_generic.h" diff --git a/drivers/pcmcia/sa1100_cerf.c b/drivers/pcmcia/sa1100_cerf.c index 7c3951a2675d..63e6bc431a0d 100644 --- a/drivers/pcmcia/sa1100_cerf.c +++ b/drivers/pcmcia/sa1100_cerf.c @@ -11,10 +11,10 @@ #include <linux/init.h> #include <linux/delay.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/irq.h> -#include <asm/arch/cerf.h> +#include <mach/cerf.h> #include "sa1100_generic.h" #define CERF_SOCKET 1 diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c index e5491879acd9..6de4e1b41d60 100644 --- a/drivers/pcmcia/sa1100_h3600.c +++ b/drivers/pcmcia/sa1100_h3600.c @@ -11,10 +11,10 @@ #include <linux/init.h> #include <linux/delay.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/irq.h> #include <asm/mach-types.h> -#include <asm/arch/h3600.h> +#include <mach/h3600.h> #include "sa1100_generic.h" diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c index 2167e6714d2d..57ca085473d5 100644 --- a/drivers/pcmcia/sa1100_jornada720.c +++ b/drivers/pcmcia/sa1100_jornada720.c @@ -10,7 +10,7 @@ #include <linux/errno.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/hardware/sa1111.h> #include <asm/mach-types.h> diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c index 687492fcd5b4..4c41e86ccff9 100644 --- a/drivers/pcmcia/sa1100_neponset.c +++ b/drivers/pcmcia/sa1100_neponset.c @@ -9,9 +9,9 @@ #include <linux/errno.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> -#include <asm/arch/neponset.h> +#include <mach/neponset.h> #include <asm/hardware/sa1111.h> #include "sa1111_generic.h" diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c index 494912fccc0d..46d8c1977c2a 100644 --- a/drivers/pcmcia/sa1100_shannon.c +++ b/drivers/pcmcia/sa1100_shannon.c @@ -9,9 +9,9 @@ #include <linux/device.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> -#include <asm/arch/shannon.h> +#include <mach/shannon.h> #include <asm/irq.h> #include "sa1100_generic.h" diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c index 42567de894b9..33a08ae09fdf 100644 --- a/drivers/pcmcia/sa1100_simpad.c +++ b/drivers/pcmcia/sa1100_simpad.c @@ -9,10 +9,10 @@ #include <linux/device.h> #include <linux/init.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/mach-types.h> #include <asm/irq.h> -#include <asm/arch/simpad.h> +#include <mach/simpad.h> #include "sa1100_generic.h" extern long get_cs3_shadow(void); diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index 658cddfbcf29..6924d0ea8d32 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c @@ -14,7 +14,7 @@ #include <pcmcia/ss.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/hardware/sa1111.h> #include <asm/io.h> #include <asm/irq.h> diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index 31a7abc55b23..7cb1273202cc 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c @@ -37,7 +37,7 @@ #include <linux/kernel.h> #include <linux/spinlock.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/system.h> diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 8c21446996f2..da3972153226 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -43,7 +43,7 @@ #include <linux/spinlock.h> #include <linux/cpufreq.h> -#include <asm/hardware.h> +#include <mach/hardware.h> #include <asm/io.h> #include <asm/system.h> @@ -51,7 +51,7 @@ /* FIXME: platform dependent resource declaration has to move out of this file */ #ifdef CONFIG_ARCH_PXA -#include <asm/arch/pxa-regs.h> +#include <mach/pxa-regs.h> #endif #ifdef DEBUG @@ -748,7 +748,9 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops add_timer(&skt->poll_timer); - device_create_file(&skt->socket.dev, &dev_attr_status); + ret = device_create_file(&skt->socket.dev, &dev_attr_status); + if (ret) + goto out_err_8; } dev_set_drvdata(dev, sinfo); @@ -758,6 +760,8 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops do { skt = &sinfo->skt[i]; + device_remove_file(&skt->socket.dev, &dev_attr_status); + out_err_8: del_timer_sync(&skt->poll_timer); pcmcia_unregister_socket(&skt->socket); |