[PATCH 2/3] pcmcia: pxa2xx: remove empty socket_init / socket_resume functions.
Now the are optional, let us get rid of the ones that don't have any content. Signed-off-by: Jonathan Cameron ji...@cam.ac.uk --- drivers/pcmcia/pxa2xx_balloon3.c | 10 -- drivers/pcmcia/pxa2xx_cm_x255.c | 11 --- drivers/pcmcia/pxa2xx_cm_x270.c | 11 --- drivers/pcmcia/pxa2xx_colibri.c | 11 --- drivers/pcmcia/pxa2xx_mainstone.c | 10 -- drivers/pcmcia/pxa2xx_palmld.c| 11 --- drivers/pcmcia/pxa2xx_palmtc.c| 11 --- drivers/pcmcia/pxa2xx_palmtx.c| 11 --- drivers/pcmcia/pxa2xx_viper.c | 10 -- 9 files changed, 0 insertions(+), 96 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c index 4c3e94c..f56d7de 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/drivers/pcmcia/pxa2xx_balloon3.c @@ -103,22 +103,12 @@ static int balloon3_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void balloon3_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void balloon3_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level balloon3_pcmcia_ops = { .owner = THIS_MODULE, .hw_init= balloon3_pcmcia_hw_init, .hw_shutdown= balloon3_pcmcia_hw_shutdown, .socket_state = balloon3_pcmcia_socket_state, .configure_socket = balloon3_pcmcia_configure_socket, - .socket_init= balloon3_pcmcia_socket_init, - .socket_suspend = balloon3_pcmcia_socket_suspend, .first = 0, .nr = 1, }; diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c index 05913d0..63f4d52 100644 --- a/drivers/pcmcia/pxa2xx_cm_x255.c +++ b/drivers/pcmcia/pxa2xx_cm_x255.c @@ -102,23 +102,12 @@ static int cmx255_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void cmx255_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void cmx255_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - - static struct pcmcia_low_level cmx255_pcmcia_ops __initdata = { .owner = THIS_MODULE, .hw_init= cmx255_pcmcia_hw_init, .hw_shutdown= cmx255_pcmcia_shutdown, .socket_state = cmx255_pcmcia_socket_state, .configure_socket = cmx255_pcmcia_configure_socket, - .socket_init= cmx255_pcmcia_socket_init, - .socket_suspend = cmx255_pcmcia_socket_suspend, .nr = 1, }; diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index 5662646..6ee42b4 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c @@ -82,23 +82,12 @@ static int cmx270_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void cmx270_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void cmx270_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - - static struct pcmcia_low_level cmx270_pcmcia_ops __initdata = { .owner = THIS_MODULE, .hw_init= cmx270_pcmcia_hw_init, .hw_shutdown= cmx270_pcmcia_shutdown, .socket_state = cmx270_pcmcia_socket_state, .configure_socket = cmx270_pcmcia_configure_socket, - .socket_init= cmx270_pcmcia_socket_init, - .socket_suspend = cmx270_pcmcia_socket_suspend, .nr = 1, }; diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c index 443cb7f..c6dec57 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/drivers/pcmcia/pxa2xx_colibri.c @@ -116,14 +116,6 @@ colibri_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return 0; } -static void colibri_pcmcia_socket_init(struct soc_pcmcia_socket *skt) -{ -} - -static void colibri_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ -} - static struct pcmcia_low_level colibri_pcmcia_ops = { .owner = THIS_MODULE, @@ -135,9 +127,6 @@ static struct pcmcia_low_level colibri_pcmcia_ops = { .socket_state = colibri_pcmcia_socket_state, .configure_socket = colibri_pcmcia_configure_socket, - - .socket_init= colibri_pcmcia_socket_init, - .socket_suspend = colibri_pcmcia_socket_suspend, }; static struct platform_device *colibri_pcmcia_device; diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c index 92016fe..aded706c 100644 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ b/drivers/pcmcia/pxa2xx_mainstone.c @@ -128,22 +128,12 @@ static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, return ret; } -static void mst_pcmcia_socket_init(struct
[PATCH 3/3] pxa2xx pcmcia - stargate 2 use gpio array.
Kill off the buff gpio as not used anywhere. Signed-off-by: Jonathan Cameron ji...@cam.ac.uk --- drivers/pcmcia/pxa2xx_stargate2.c | 34 +++--- 1 files changed, 11 insertions(+), 23 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c index d08802f..9396222 100644 --- a/drivers/pcmcia/pxa2xx_stargate2.c +++ b/drivers/pcmcia/pxa2xx_stargate2.c @@ -28,7 +28,6 @@ #include soc_common.h -#define SG2_S0_BUFF_CTL120 #define SG2_S0_POWER_CTL 108 #define SG2_S0_GPIO_RESET 82 #define SG2_S0_GPIO_DETECT 53 @@ -38,6 +37,11 @@ static struct pcmcia_irqs irqs[] = { { 0, IRQ_GPIO(SG2_S0_GPIO_DETECT), PCMCIA0 CD }, }; +static struct gpio sg2_pcmcia_gpios[] = { + { SG2_S0_GPIO_RESET, GPIOF_OUT_INIT_HIGH, PCMCIA Reset }, + { SG2_S0_POWER_CTL, GPIOF_OUT_INIT_HIGH, PCMCIA Power Ctrl }, +}; + static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { skt-socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); @@ -122,37 +126,23 @@ static int __init sg2_pcmcia_init(void) if (!sg2_pcmcia_device) return -ENOMEM; - ret = gpio_request(SG2_S0_BUFF_CTL, SG2 CF buff ctl); + ret = gpio_request_array(sg2_pcmcia_gpios, ARRAY_SIZE(sg2_pcmcia_gpios)); if (ret) goto error_put_platform_device; - ret = gpio_request(SG2_S0_POWER_CTL, SG2 CF power ctl); - if (ret) - goto error_free_gpio_buff_ctl; - ret = gpio_request(SG2_S0_GPIO_RESET, SG2 CF reset); - if (ret) - goto error_free_gpio_power_ctl; - /* Set gpio directions */ - gpio_direction_output(SG2_S0_BUFF_CTL, 0); - gpio_direction_output(SG2_S0_POWER_CTL, 1); - gpio_direction_output(SG2_S0_GPIO_RESET, 1); ret = platform_device_add_data(sg2_pcmcia_device, sg2_pcmcia_ops, sizeof(sg2_pcmcia_ops)); if (ret) - goto error_free_gpio_reset; + goto error_free_gpios; ret = platform_device_add(sg2_pcmcia_device); if (ret) - goto error_free_gpio_reset; + goto error_free_gpios; return 0; -error_free_gpio_reset: - gpio_free(SG2_S0_GPIO_RESET); -error_free_gpio_power_ctl: - gpio_free(SG2_S0_POWER_CTL); -error_free_gpio_buff_ctl: - gpio_free(SG2_S0_BUFF_CTL); +error_free_gpios: + gpio_free_array(sg2_pcmcia_gpios, ARRAY_SIZE(sg2_pcmcia_gpios)); error_put_platform_device: platform_device_put(sg2_pcmcia_device); @@ -162,9 +152,7 @@ error_put_platform_device: static void __exit sg2_pcmcia_exit(void) { platform_device_unregister(sg2_pcmcia_device); - gpio_free(SG2_S0_BUFF_CTL); - gpio_free(SG2_S0_POWER_CTL); - gpio_free(SG2_S0_GPIO_RESET); + gpio_free_array(sg2_pcmcia_gpios, ARRAY_SIZE(sg2_pcmcia_gpios)); } fs_initcall(sg2_pcmcia_init); -- 1.7.3.4 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
RFC pcmcia soc_common/pcmcia_low_level: Making socket_init and socket_suspend optional
Hi All, Whilst looking at tidying up some of the glue code in pcmcia/pxa2xx_* I noticed a lot of boards (10) define empty versions of socket_init and socket_suspend. This seems to me to indicate that these two functions should be optional. Does anyone have any objection to making them so? (couple of ifs in socket_common.c should do the job). Thanks, Jonathan ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: RFC pcmcia soc_common/pcmcia_low_level: Making socket_init and socket_suspend optional
Sorry, sent this to the long dead old arm list. Hi All, Whilst looking at tidying up some of the glue code in pcmcia/pxa2xx_* I noticed a lot of boards (10) define empty versions of socket_init and socket_suspend. This seems to me to indicate that these two functions should be optional. Does anyone have any objection to making them so? (couple of ifs in socket_common.c should do the job). Thanks, Jonathan ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH] pcmcia: Fix additional platforms after removal of skt-irq in 66024db57d5b9011e274b314affad68f370c0d6f
Signed-off-by: Jonathan Cameron ji...@cam.ac.uk --- Russell's original patch is currently in linux-next (and hence I'm guessing heading for the merge window?). In the intervening time, 2 platforms have been added using the now nonexistent skt-irq. This patch fixes them as per the other platforms. drivers/pcmcia/pxa2xx_palmtc.c|2 +- drivers/pcmcia/pxa2xx_stargate2.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c index 3a8993e..459a232 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/drivers/pcmcia/pxa2xx_palmtc.c @@ -67,7 +67,7 @@ static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) if (ret) goto err7; - skt-irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); + skt-socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); return 0; err7: diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c index 490749e..d08802f 100644 --- a/drivers/pcmcia/pxa2xx_stargate2.c +++ b/drivers/pcmcia/pxa2xx_stargate2.c @@ -40,7 +40,7 @@ static struct pcmcia_irqs irqs[] = { static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { - skt-irq = IRQ_GPIO(SG2_S0_GPIO_READY); + skt-socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); } -- 1.6.4.4 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
Re: [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
Hi Russell, This one is causing me some build problems. As things currently stand I can't build the pxa2xx support for pcmcia with a stargate2 as a module. It's fine if built in. Note by this I meant building with the whole pcmcia subsytem as modules. As module get a load of undefined symbols: ERROR: soc_pcmcia_request_irqs [drivers/pcmcia/pxa2xx_stargate2.ko] undefined! ERROR: soc_pcmcia_free_irqs [drivers/pcmcia/pxa2xx_stargate2.ko] undefined! ERROR: soc_pcmcia_enable_irqs [drivers/pcmcia/pxa2xx_stargate2.ko] undefined! ERROR: soc_pcmcia_disable_irqs [drivers/pcmcia/pxa2xx_stargate2.ko] undefined! ERROR: soc_pcmcia_add_one [drivers/pcmcia/pxa2xx_base.ko] undefined! ERROR: soc_common_pcmcia_get_timing [drivers/pcmcia/pxa2xx_base.ko] undefined! ERROR: soc_pcmcia_remove_one [drivers/pcmcia/pxa2xx_base.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Relevant bits of .config # Bus support # # CONFIG_PCI_SYSCALL is not set # CONFIG_ARCH_SUPPORTS_MSI is not set CONFIG_PCCARD=m CONFIG_PCMCIA=m CONFIG_PCMCIA_LOAD_CIS=y CONFIG_PCMCIA_IOCTL=y # # PC-card bridges # CONFIG_PCMCIA_SOC_COMMON=y CONFIG_PCMCIA_PXA2XX=m # CONFIG_PCMCIA_DEBUG is not set I think the fix is: diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 518b5ef..a02a135 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -200,7 +200,7 @@ config PCMCIA_BCM63XX depends on BCM63XX PCMCIA config PCMCIA_SOC_COMMON - bool + tristate config PCMCIA_SA1100 tristate SA1100 support Convert soc_common.c to be a stand alone module, rather than wrapping it up into the individual SoC specific base modules. In doing this, we need to add init/exit functions for soc_common to register/remove the cpufreq notifier. Signed-off-by: Russell King rmk+ker...@arm.linux.org.uk --- drivers/pcmcia/Kconfig |6 ++ drivers/pcmcia/Makefile | 10 -- drivers/pcmcia/soc_common.c | 16 +++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 17f38a7..0b82493 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -196,9 +196,13 @@ config PCMCIA_BCM63XX tristate bcm63xx pcmcia support depends on BCM63XX PCMCIA +config PCMCIA_SOC_COMMON + bool + config PCMCIA_SA1100 tristate SA1100 support depends on ARM ARCH_SA1100 PCMCIA + select PCMCIA_SOC_COMMON help Say Y here to include support for SA11x0-based PCMCIA or CF sockets, found on HP iPAQs, Yopy, and other StrongARM(R)/ @@ -209,6 +213,7 @@ config PCMCIA_SA1100 config PCMCIA_SA tristate SA support depends on ARM ARCH_SA1100 SA PCMCIA + select PCMCIA_SOC_COMMON help Say Y here to include support for SA-based PCMCIA or CF sockets, found on the Jornada 720, Graphicsmaster and other @@ -222,6 +227,7 @@ config PCMCIA_PXA2XX depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ || ARCH_VIPER || ARCH_PXA_ESERIES || MACH_STARGATE2) + select PCMCIA_SOC_COMMON help Say Y here to include support for the PXA2xx PCMCIA controller diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index a03a38a..3829383 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -22,8 +22,9 @@ obj-$(CONFIG_I82365)+= i82365.o obj-$(CONFIG_I82092) += i82092.o obj-$(CONFIG_TCIC) += tcic.o obj-$(CONFIG_PCMCIA_M8XX)+= m8xx_pcmcia.o -obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_core.o sa1100_cs.o -obj-$(CONFIG_PCMCIA_SA) += sa11xx_core.o sa_cs.o +obj-$(CONFIG_PCMCIA_SOC_COMMON) += soc_common.o +obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_base.o sa1100_cs.o +obj-$(CONFIG_PCMCIA_SA) += sa11xx_base.o sa_cs.o obj-$(CONFIG_M32R_PCC) += m32r_pcc.o obj-$(CONFIG_M32R_CFC) += m32r_cfc.o obj-$(CONFIG_PCMCIA_AU1X00) += au1x00_ss.o @@ -35,9 +36,6 @@ obj-$(CONFIG_BFIN_CFPCMCIA) += bfin_cf_pcmcia.o obj-$(CONFIG_AT91_CF)+= at91_cf.o obj-$(CONFIG_ELECTRA_CF) += electra_cf.o -sa11xx_core-y+= soc_common.o sa11xx_base.o -pxa2xx_core-y+= soc_common.o pxa2xx_base.o - au1x00_ss-y += au1000_generic.o au1x00_ss-$(CONFIG_MIPS_PB1000) += au1000_pb1x00.o au1x00_ss-$(CONFIG_MIPS_PB1100) += au1000_pb1x00.o @@ -77,4 +75,4 @@