* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
@ 2009-10-27 23:11 Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 02/10] PCMCIA: soc_common: provide single socket add/remove functionality Russell King - ARM Linux
` (10 more replies)
0 siblings, 11 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:11 UTC (permalink / raw)
To: linux-arm-kernel
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+kernel@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_SA1111
tristate "SA1111 support"
depends on ARM && ARCH_SA1100 && SA1111 && PCMCIA
+ select PCMCIA_SOC_COMMON
help
Say Y here to include support for SA1111-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_SA1111) += sa11xx_core.o sa1111_cs.o
+obj-$(CONFIG_PCMCIA_SOC_COMMON) += soc_common.o
+obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_base.o sa1100_cs.o
+obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_base.o sa1111_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 @@ pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o
pxa2xx-obj-$(CONFIG_MACH_E740) += pxa2xx_e740.o
pxa2xx-obj-$(CONFIG_MACH_STARGATE2) += pxa2xx_stargate2.o
-obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o $(pxa2xx-obj-y)
+obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 163cf98..38c5484 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -608,15 +608,14 @@ static int soc_pcmcia_cpufreq_register(void)
"notifier for PCMCIA (%d)\n", ret);
return ret;
}
+fs_initcall(soc_pcmcia_cpufreq_register);
static void soc_pcmcia_cpufreq_unregister(void)
{
cpufreq_unregister_notifier(&soc_pcmcia_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
}
+module_exit(soc_pcmcia_cpufreq_unregister);
-#else
-static int soc_pcmcia_cpufreq_register(void) { return 0; }
-static void soc_pcmcia_cpufreq_unregister(void) {}
#endif
int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
@@ -667,9 +666,6 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
goto out_err_5;
}
- if (list_empty(&soc_pcmcia_sockets))
- soc_pcmcia_cpufreq_register();
-
list_add(&skt->node, &soc_pcmcia_sockets);
/*
@@ -742,6 +738,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
mutex_unlock(&soc_pcmcia_sockets_lock);
return ret;
}
+EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
int soc_common_drv_pcmcia_remove(struct device *dev)
{
@@ -772,9 +769,6 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
release_resource(&skt->res_io);
release_resource(&skt->res_skt);
}
- if (list_empty(&soc_pcmcia_sockets))
- soc_pcmcia_cpufreq_unregister();
-
mutex_unlock(&soc_pcmcia_sockets_lock);
kfree(sinfo);
@@ -782,3 +776,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
return 0;
}
EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);
+
+MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
+MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support");
+MODULE_LICENSE("Dual MPL/GPL");
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 02/10] PCMCIA: soc_common: provide single socket add/remove functionality
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
@ 2009-10-27 23:11 ` Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 03/10] PCMCIA: soc_common: push socket removal down to SoC specific support Russell King - ARM Linux
` (9 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:11 UTC (permalink / raw)
To: linux-arm-kernel
Factor out the functionality for adding and removing a single
socket, thereby allowing SoCs to individually register each
socket. The advantage of this approach is that SoCs can then
extend soc_pcmcia_socket as they wish.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/soc_common.c | 230 +++++++++++++++++++++++--------------------
drivers/pcmcia/soc_common.h | 3 +-
2 files changed, 125 insertions(+), 108 deletions(-)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 38c5484..8938608 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -573,7 +573,7 @@ void soc_pcmcia_enable_irqs(struct soc_pcmcia_socket *skt,
EXPORT_SYMBOL(soc_pcmcia_enable_irqs);
-LIST_HEAD(soc_pcmcia_sockets);
+static LIST_HEAD(soc_pcmcia_sockets);
static DEFINE_MUTEX(soc_pcmcia_sockets_lock);
#ifdef CONFIG_CPU_FREQ
@@ -618,158 +618,174 @@ module_exit(soc_pcmcia_cpufreq_unregister);
#endif
-int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
- struct skt_dev_info *sinfo)
+void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt)
{
- struct soc_pcmcia_socket *skt;
- int ret, i;
-
mutex_lock(&soc_pcmcia_sockets_lock);
+ del_timer_sync(&skt->poll_timer);
- /*
- * Initialise the per-socket structure.
- */
- for (i = 0; i < sinfo->nskt; i++) {
- skt = &sinfo->skt[i];
+ pcmcia_unregister_socket(&skt->socket);
- skt->socket.ops = &soc_common_pcmcia_operations;
- skt->socket.owner = ops->owner;
- skt->socket.dev.parent = dev;
+ flush_scheduled_work();
- init_timer(&skt->poll_timer);
- skt->poll_timer.function = soc_common_pcmcia_poll_event;
- skt->poll_timer.data = (unsigned long)skt;
- skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD;
+ skt->ops->hw_shutdown(skt);
- skt->dev = dev;
- skt->ops = ops;
+ soc_common_pcmcia_config_skt(skt, &dead_socket);
- ret = request_resource(&iomem_resource, &skt->res_skt);
- if (ret)
- goto out_err_1;
+ list_del(&skt->node);
+ mutex_unlock(&soc_pcmcia_sockets_lock);
- ret = request_resource(&skt->res_skt, &skt->res_io);
- if (ret)
- goto out_err_2;
+ iounmap(skt->virt_io);
+ skt->virt_io = NULL;
+ release_resource(&skt->res_attr);
+ release_resource(&skt->res_mem);
+ release_resource(&skt->res_io);
+ release_resource(&skt->res_skt);
+}
+EXPORT_SYMBOL(soc_pcmcia_remove_one);
- ret = request_resource(&skt->res_skt, &skt->res_mem);
- if (ret)
- goto out_err_3;
+int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
+{
+ int ret;
- ret = request_resource(&skt->res_skt, &skt->res_attr);
- if (ret)
- goto out_err_4;
+ init_timer(&skt->poll_timer);
+ skt->poll_timer.function = soc_common_pcmcia_poll_event;
+ skt->poll_timer.data = (unsigned long)skt;
+ skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD;
- skt->virt_io = ioremap(skt->res_io.start, 0x10000);
- if (skt->virt_io == NULL) {
- ret = -ENOMEM;
- goto out_err_5;
- }
+ ret = request_resource(&iomem_resource, &skt->res_skt);
+ if (ret)
+ goto out_err_1;
- list_add(&skt->node, &soc_pcmcia_sockets);
+ ret = request_resource(&skt->res_skt, &skt->res_io);
+ if (ret)
+ goto out_err_2;
- /*
- * We initialize default socket timing here, because
- * we are not guaranteed to see a SetIOMap operation at
- * runtime.
- */
- ops->set_timing(skt);
+ ret = request_resource(&skt->res_skt, &skt->res_mem);
+ if (ret)
+ goto out_err_3;
- ret = ops->hw_init(skt);
- if (ret)
- goto out_err_6;
+ ret = request_resource(&skt->res_skt, &skt->res_attr);
+ if (ret)
+ goto out_err_4;
- skt->socket.features = SS_CAP_STATIC_MAP|SS_CAP_PCCARD;
- skt->socket.resource_ops = &pccard_static_ops;
- skt->socket.irq_mask = 0;
- skt->socket.map_size = PAGE_SIZE;
- skt->socket.pci_irq = skt->irq;
- skt->socket.io_offset = (unsigned long)skt->virt_io;
+ skt->virt_io = ioremap(skt->res_io.start, 0x10000);
+ if (skt->virt_io == NULL) {
+ ret = -ENOMEM;
+ goto out_err_5;
+ }
- skt->status = soc_common_pcmcia_skt_state(skt);
+ mutex_lock(&soc_pcmcia_sockets_lock);
- ret = pcmcia_register_socket(&skt->socket);
- if (ret)
- goto out_err_7;
+ list_add(&skt->node, &soc_pcmcia_sockets);
- WARN_ON(skt->socket.sock != i);
+ /*
+ * We initialize default socket timing here, because
+ * we are not guaranteed to see a SetIOMap operation at
+ * runtime.
+ */
+ skt->ops->set_timing(skt);
- add_timer(&skt->poll_timer);
+ ret = skt->ops->hw_init(skt);
+ if (ret)
+ goto out_err_6;
- ret = device_create_file(&skt->socket.dev, &dev_attr_status);
- if (ret)
- goto out_err_8;
- }
+ skt->socket.ops = &soc_common_pcmcia_operations;
+ skt->socket.features = SS_CAP_STATIC_MAP|SS_CAP_PCCARD;
+ skt->socket.resource_ops = &pccard_static_ops;
+ skt->socket.irq_mask = 0;
+ skt->socket.map_size = PAGE_SIZE;
+ skt->socket.pci_irq = skt->irq;
+ skt->socket.io_offset = (unsigned long)skt->virt_io;
- dev_set_drvdata(dev, sinfo);
- ret = 0;
- goto out;
+ skt->status = soc_common_pcmcia_skt_state(skt);
- do {
- skt = &sinfo->skt[i];
+ ret = pcmcia_register_socket(&skt->socket);
+ if (ret)
+ goto out_err_7;
+
+ add_timer(&skt->poll_timer);
+
+ mutex_unlock(&soc_pcmcia_sockets_lock);
+
+ ret = device_create_file(&skt->socket.dev, &dev_attr_status);
+ if (ret)
+ goto out_err_8;
+
+ return ret;
- device_remove_file(&skt->socket.dev, &dev_attr_status);
out_err_8:
- del_timer_sync(&skt->poll_timer);
- pcmcia_unregister_socket(&skt->socket);
+ mutex_lock(&soc_pcmcia_sockets_lock);
+ del_timer_sync(&skt->poll_timer);
+ pcmcia_unregister_socket(&skt->socket);
out_err_7:
- flush_scheduled_work();
+ flush_scheduled_work();
- ops->hw_shutdown(skt);
+ skt->ops->hw_shutdown(skt);
out_err_6:
- list_del(&skt->node);
- iounmap(skt->virt_io);
+ list_del(&skt->node);
+ mutex_unlock(&soc_pcmcia_sockets_lock);
+ iounmap(skt->virt_io);
out_err_5:
- release_resource(&skt->res_attr);
+ release_resource(&skt->res_attr);
out_err_4:
- release_resource(&skt->res_mem);
+ release_resource(&skt->res_mem);
out_err_3:
- release_resource(&skt->res_io);
+ release_resource(&skt->res_io);
out_err_2:
- release_resource(&skt->res_skt);
+ release_resource(&skt->res_skt);
out_err_1:
- i--;
- } while (i > 0);
- kfree(sinfo);
-
- out:
- mutex_unlock(&soc_pcmcia_sockets_lock);
return ret;
}
-EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
+EXPORT_SYMBOL(soc_pcmcia_add_one);
-int soc_common_drv_pcmcia_remove(struct device *dev)
+int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
+ struct skt_dev_info *sinfo)
{
- struct skt_dev_info *sinfo = dev_get_drvdata(dev);
- int i;
+ struct soc_pcmcia_socket *skt;
+ int ret, i;
- dev_set_drvdata(dev, NULL);
+ /*
+ * Initialise the per-socket structure.
+ */
+ for (i = ret = 0; i < sinfo->nskt; i++) {
+ skt = &sinfo->skt[i];
- mutex_lock(&soc_pcmcia_sockets_lock);
- for (i = 0; i < sinfo->nskt; i++) {
- struct soc_pcmcia_socket *skt = &sinfo->skt[i];
+ skt->socket.owner = ops->owner;
+ skt->socket.dev.parent = dev;
- del_timer_sync(&skt->poll_timer);
+ skt->dev = dev;
+ skt->ops = ops;
- pcmcia_unregister_socket(&skt->socket);
+ ret = soc_pcmcia_add_one(skt);
+ if (ret)
+ break;
- flush_scheduled_work();
+ WARN_ON(skt->socket.sock != i);
+ }
- skt->ops->hw_shutdown(skt);
+ if (ret) {
+ while (--i >= 0)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+ kfree(sinfo);
+ } else {
+ dev_set_drvdata(dev, sinfo);
+ }
- soc_common_pcmcia_config_skt(skt, &dead_socket);
+ return ret;
+}
+EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
- list_del(&skt->node);
- iounmap(skt->virt_io);
- skt->virt_io = NULL;
- release_resource(&skt->res_attr);
- release_resource(&skt->res_mem);
- release_resource(&skt->res_io);
- release_resource(&skt->res_skt);
- }
- mutex_unlock(&soc_pcmcia_sockets_lock);
+int soc_common_drv_pcmcia_remove(struct device *dev)
+{
+ struct skt_dev_info *sinfo = dev_get_drvdata(dev);
+ int i;
+
+ dev_set_drvdata(dev, NULL);
+
+ for (i = 0; i < sinfo->nskt; i++)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
kfree(sinfo);
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index 290e143..51c72ba 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -135,7 +135,8 @@ extern void soc_pcmcia_enable_irqs(struct soc_pcmcia_socket *skt, struct pcmcia_
extern void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *, struct soc_pcmcia_timing *);
-extern struct list_head soc_pcmcia_sockets;
+void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt);
+int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt);
extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo);
extern int soc_common_drv_pcmcia_remove(struct device *dev);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 03/10] PCMCIA: soc_common: push socket removal down to SoC specific support
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 02/10] PCMCIA: soc_common: provide single socket add/remove functionality Russell King - ARM Linux
@ 2009-10-27 23:11 ` Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 04/10] PCMCIA: soc_common: push socket probe down into " Russell King - ARM Linux
` (8 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:11 UTC (permalink / raw)
To: linux-arm-kernel
Mechanically transplant the removal code from soc_common into each
SoC specific base support file, thereby allowing
soc_common_drv_pcmcia_remove to be removed. No other changes.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/pxa2xx_base.c | 11 ++++++++++-
drivers/pcmcia/sa1100_generic.c | 11 ++++++++++-
drivers/pcmcia/sa1111_generic.c | 10 +++++++++-
drivers/pcmcia/soc_common.c | 16 ----------------
drivers/pcmcia/soc_common.h | 1 -
5 files changed, 29 insertions(+), 20 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 0e35acb..8a91106 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -297,7 +297,16 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
{
- return soc_common_drv_pcmcia_remove(&dev->dev);
+ struct skt_dev_info *sinfo = platform_get_drvdata(dev);
+ int i;
+
+ platform_set_drvdata(dev, NULL);
+
+ for (i = 0; i < sinfo->nskt; i++)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+
+ kfree(sinfo);
+ return 0;
}
static int pxa2xx_drv_pcmcia_suspend(struct device *dev)
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c
index 2d0e997..11cc3ba 100644
--- a/drivers/pcmcia/sa1100_generic.c
+++ b/drivers/pcmcia/sa1100_generic.c
@@ -83,7 +83,16 @@ static int sa11x0_drv_pcmcia_probe(struct platform_device *dev)
static int sa11x0_drv_pcmcia_remove(struct platform_device *dev)
{
- return soc_common_drv_pcmcia_remove(&dev->dev);
+ struct skt_dev_info *sinfo = platform_get_drvdata(dev);
+ int i;
+
+ platform_set_drvdata(dev, NULL);
+
+ for (i = 0; i < sinfo->nskt; i++)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+
+ kfree(sinfo);
+ return 0;
}
static int sa11x0_drv_pcmcia_suspend(struct platform_device *dev,
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 4be4e17..a6793e3 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -152,7 +152,15 @@ static int pcmcia_probe(struct sa1111_dev *dev)
static int __devexit pcmcia_remove(struct sa1111_dev *dev)
{
- soc_common_drv_pcmcia_remove(&dev->dev);
+ struct skt_dev_info *sinfo = dev_get_drvdata(&dev->dev);
+ int i;
+
+ dev_set_drvdata(&dev->dev, NULL);
+
+ for (i = 0; i < sinfo->nskt; i++)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+
+ kfree(sinfo);
release_mem_region(dev->res.start, 512);
return 0;
}
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 8938608..c42b651 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -777,22 +777,6 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
}
EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
-int soc_common_drv_pcmcia_remove(struct device *dev)
-{
- struct skt_dev_info *sinfo = dev_get_drvdata(dev);
- int i;
-
- dev_set_drvdata(dev, NULL);
-
- for (i = 0; i < sinfo->nskt; i++)
- soc_pcmcia_remove_one(&sinfo->skt[i]);
-
- kfree(sinfo);
-
- return 0;
-}
-EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);
-
MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support");
MODULE_LICENSE("Dual MPL/GPL");
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index 51c72ba..c33b8c3 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -139,7 +139,6 @@ void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt);
int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt);
extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo);
-extern int soc_common_drv_pcmcia_remove(struct device *dev);
#ifdef CONFIG_PCMCIA_DEBUG
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 04/10] PCMCIA: soc_common: push socket probe down into SoC specific support
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 02/10] PCMCIA: soc_common: provide single socket add/remove functionality Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 03/10] PCMCIA: soc_common: push socket removal down to SoC specific support Russell King - ARM Linux
@ 2009-10-27 23:12 ` Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 05/10] PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data Russell King - ARM Linux
` (7 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:12 UTC (permalink / raw)
To: linux-arm-kernel
Move the individual socket probing and initialization down into the
SoC specific support files, thereby allowing soc_common_drv_pcmcia_probe
to be eliminated. soc_common.c now no longer deals with distinct groups
of sockets.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/pxa2xx_base.c | 77 +++++++++++++++++++++--------------
drivers/pcmcia/sa11xx_base.c | 91 ++++++++++++++++++++++++++----------------
drivers/pcmcia/soc_common.c | 37 -----------------
drivers/pcmcia/soc_common.h | 2 -
4 files changed, 103 insertions(+), 104 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 8a91106..3cb4fd2 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -228,6 +228,31 @@ static const char *skt_names[] = {
#define SKT_DEV_INFO_SIZE(n) \
(sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
+static int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
+{
+ skt->res_skt.start = _PCMCIA(skt->nr);
+ skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
+ skt->res_skt.name = skt_names[skt->nr];
+ skt->res_skt.flags = IORESOURCE_MEM;
+
+ skt->res_io.start = _PCMCIAIO(skt->nr);
+ skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
+ skt->res_io.name = "io";
+ skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+
+ skt->res_mem.start = _PCMCIAMem(skt->nr);
+ skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
+ skt->res_mem.name = "memory";
+ skt->res_mem.flags = IORESOURCE_MEM;
+
+ skt->res_attr.start = _PCMCIAAttr(skt->nr);
+ skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
+ skt->res_attr.name = "attribute";
+ skt->res_attr.flags = IORESOURCE_MEM;
+
+ return soc_pcmcia_add_one(skt);
+}
+
int __pxa2xx_drv_pcmcia_probe(struct device *dev)
{
int i, ret;
@@ -240,6 +265,12 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
ops = (struct pcmcia_low_level *)dev->platform_data;
+ /* Provide our PXA2xx specific timing routines. */
+ ops->set_timing = pxa2xx_pcmcia_set_timing;
+#ifdef CONFIG_CPU_FREQ
+ ops->frequency_change = pxa2xx_pcmcia_frequency_change;
+#endif
+
sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
if (!sinfo)
return -ENOMEM;
@@ -250,40 +281,26 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
for (i = 0; i < ops->nr; i++) {
skt = &sinfo->skt[i];
- skt->nr = ops->first + i;
- skt->irq = NO_IRQ;
-
- skt->res_skt.start = _PCMCIA(skt->nr);
- skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
- skt->res_skt.name = skt_names[skt->nr];
- skt->res_skt.flags = IORESOURCE_MEM;
+ skt->nr = ops->first + i;
+ skt->irq = NO_IRQ;
+ skt->dev = dev;
+ skt->ops = ops;
+ skt->socket.owner = ops->owner;
+ skt->socket.dev.parent = dev;
- skt->res_io.start = _PCMCIAIO(skt->nr);
- skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
- skt->res_io.name = "io";
- skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-
- skt->res_mem.start = _PCMCIAMem(skt->nr);
- skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
- skt->res_mem.name = "memory";
- skt->res_mem.flags = IORESOURCE_MEM;
-
- skt->res_attr.start = _PCMCIAAttr(skt->nr);
- skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
- skt->res_attr.name = "attribute";
- skt->res_attr.flags = IORESOURCE_MEM;
+ ret = pxa2xx_drv_pcmcia_add_one(skt);
+ if (ret)
+ break;
}
- /* Provide our PXA2xx specific timing routines. */
- ops->set_timing = pxa2xx_pcmcia_set_timing;
-#ifdef CONFIG_CPU_FREQ
- ops->frequency_change = pxa2xx_pcmcia_frequency_change;
-#endif
-
- ret = soc_common_drv_pcmcia_probe(dev, ops, sinfo);
-
- if (!ret)
+ if (ret) {
+ while (--i >= 0)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+ kfree(sinfo);
+ } else {
pxa2xx_configure_sockets(dev);
+ dev_set_drvdata(dev, sinfo);
+ }
return ret;
}
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index e15d59f..92a4348 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -171,6 +171,31 @@ static const char *skt_names[] = {
#define SKT_DEV_INFO_SIZE(n) \
(sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
+static int sa11xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
+{
+ skt->res_skt.start = _PCMCIA(skt->nr);
+ skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
+ skt->res_skt.name = skt_names[skt->nr];
+ skt->res_skt.flags = IORESOURCE_MEM;
+
+ skt->res_io.start = _PCMCIAIO(skt->nr);
+ skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
+ skt->res_io.name = "io";
+ skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+
+ skt->res_mem.start = _PCMCIAMem(skt->nr);
+ skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
+ skt->res_mem.name = "memory";
+ skt->res_mem.flags = IORESOURCE_MEM;
+
+ skt->res_attr.start = _PCMCIAAttr(skt->nr);
+ skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
+ skt->res_attr.name = "attribute";
+ skt->res_attr.flags = IORESOURCE_MEM;
+
+ return soc_pcmcia_add_one(skt);
+}
+
int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
int first, int nr)
{
@@ -178,40 +203,6 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
struct soc_pcmcia_socket *skt;
int i;
- sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL);
- if (!sinfo)
- return -ENOMEM;
-
- sinfo->nskt = nr;
-
- /* Initiliaze processor specific parameters */
- for (i = 0; i < nr; i++) {
- skt = &sinfo->skt[i];
-
- skt->nr = first + i;
- skt->irq = NO_IRQ;
-
- skt->res_skt.start = _PCMCIA(skt->nr);
- skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
- skt->res_skt.name = skt_names[skt->nr];
- skt->res_skt.flags = IORESOURCE_MEM;
-
- skt->res_io.start = _PCMCIAIO(skt->nr);
- skt->res_io.end = _PCMCIAIO(skt->nr) + PCMCIAIOSp - 1;
- skt->res_io.name = "io";
- skt->res_io.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-
- skt->res_mem.start = _PCMCIAMem(skt->nr);
- skt->res_mem.end = _PCMCIAMem(skt->nr) + PCMCIAMemSp - 1;
- skt->res_mem.name = "memory";
- skt->res_mem.flags = IORESOURCE_MEM;
-
- skt->res_attr.start = _PCMCIAAttr(skt->nr);
- skt->res_attr.end = _PCMCIAAttr(skt->nr) + PCMCIAAttrSp - 1;
- skt->res_attr.name = "attribute";
- skt->res_attr.flags = IORESOURCE_MEM;
- }
-
/*
* set default MECR calculation if the board specific
* code did not specify one...
@@ -226,7 +217,37 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
ops->frequency_change = sa1100_pcmcia_frequency_change;
#endif
- return soc_common_drv_pcmcia_probe(dev, ops, sinfo);
+ sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL);
+ if (!sinfo)
+ return -ENOMEM;
+
+ sinfo->nskt = nr;
+
+ /* Initiliaze processor specific parameters */
+ for (i = 0; i < nr; i++) {
+ skt = &sinfo->skt[i];
+
+ skt->nr = first + i;
+ skt->irq = NO_IRQ;
+ skt->dev = dev;
+ skt->ops = ops;
+ skt->socket.owner = ops->owner;
+ skt->socket.dev.parent = dev;
+
+ ret = sa11xx_drv_pcmcia_add_one(skt);
+ if (ret)
+ break;
+ }
+
+ if (ret) {
+ while (--i >= 0)
+ soc_pcmcia_remove_one(&sinfo->skt[i]);
+ kfree(sinfo);
+ } else {
+ dev_set_drvdata(dev, sinfo);
+ }
+
+ return ret;
}
EXPORT_SYMBOL(sa11xx_drv_pcmcia_probe);
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index c42b651..8e262a4 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -740,43 +740,6 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
}
EXPORT_SYMBOL(soc_pcmcia_add_one);
-int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
- struct skt_dev_info *sinfo)
-{
- struct soc_pcmcia_socket *skt;
- int ret, i;
-
- /*
- * Initialise the per-socket structure.
- */
- for (i = ret = 0; i < sinfo->nskt; i++) {
- skt = &sinfo->skt[i];
-
- skt->socket.owner = ops->owner;
- skt->socket.dev.parent = dev;
-
- skt->dev = dev;
- skt->ops = ops;
-
- ret = soc_pcmcia_add_one(skt);
- if (ret)
- break;
-
- WARN_ON(skt->socket.sock != i);
- }
-
- if (ret) {
- while (--i >= 0)
- soc_pcmcia_remove_one(&sinfo->skt[i]);
- kfree(sinfo);
- } else {
- dev_set_drvdata(dev, sinfo);
- }
-
- return ret;
-}
-EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
-
MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support");
MODULE_LICENSE("Dual MPL/GPL");
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index c33b8c3..8a755c1 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -138,8 +138,6 @@ extern void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *, struct soc_
void soc_pcmcia_remove_one(struct soc_pcmcia_socket *skt);
int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt);
-extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, struct skt_dev_info *sinfo);
-
#ifdef CONFIG_PCMCIA_DEBUG
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 05/10] PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (2 preceding siblings ...)
2009-10-27 23:12 ` [RFC PATCH 04/10] PCMCIA: soc_common: push socket probe down into " Russell King - ARM Linux
@ 2009-10-27 23:12 ` Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 06/10] PCMCIA: sa1111: remove duplicated initializers Russell King - ARM Linux
` (6 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:12 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/pxa2xx_base.c | 19 +++++++----
drivers/pcmcia/pxa2xx_base.h | 3 ++
drivers/pcmcia/pxa2xx_lubbock.c | 10 ++++--
drivers/pcmcia/sa1100_badge4.c | 7 ++++-
drivers/pcmcia/sa1100_jornada720.c | 20 ++++++++----
drivers/pcmcia/sa1100_neponset.c | 9 ++++-
drivers/pcmcia/sa1111_generic.c | 58 ++++++++++++++++++++++++++++--------
drivers/pcmcia/sa1111_generic.h | 14 ++++++++
drivers/pcmcia/sa11xx_base.c | 21 ++++++++----
drivers/pcmcia/sa11xx_base.h | 2 +
10 files changed, 123 insertions(+), 40 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 3cb4fd2..c9c104b 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -228,7 +228,7 @@ static const char *skt_names[] = {
#define SKT_DEV_INFO_SIZE(n) \
(sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
-static int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
+int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
{
skt->res_skt.start = _PCMCIA(skt->nr);
skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
@@ -253,9 +253,18 @@ static int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
return soc_pcmcia_add_one(skt);
}
+void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops)
+{
+ /* Provide our PXA2xx specific timing routines. */
+ ops->set_timing = pxa2xx_pcmcia_set_timing;
+#ifdef CONFIG_CPU_FREQ
+ ops->frequency_change = pxa2xx_pcmcia_frequency_change;
+#endif
+}
+
int __pxa2xx_drv_pcmcia_probe(struct device *dev)
{
- int i, ret;
+ int i, ret = 0;
struct pcmcia_low_level *ops;
struct skt_dev_info *sinfo;
struct soc_pcmcia_socket *skt;
@@ -265,11 +274,7 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
ops = (struct pcmcia_low_level *)dev->platform_data;
- /* Provide our PXA2xx specific timing routines. */
- ops->set_timing = pxa2xx_pcmcia_set_timing;
-#ifdef CONFIG_CPU_FREQ
- ops->frequency_change = pxa2xx_pcmcia_frequency_change;
-#endif
+ pxa2xx_drv_pcmcia_ops(ops);
sinfo = kzalloc(SKT_DEV_INFO_SIZE(ops->nr), GFP_KERNEL);
if (!sinfo)
diff --git a/drivers/pcmcia/pxa2xx_base.h b/drivers/pcmcia/pxa2xx_base.h
index 235d681..cb5efae 100644
--- a/drivers/pcmcia/pxa2xx_base.h
+++ b/drivers/pcmcia/pxa2xx_base.h
@@ -1,3 +1,6 @@
/* temporary measure */
extern int __pxa2xx_drv_pcmcia_probe(struct device *);
+int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt);
+void pxa2xx_drv_pcmcia_ops(struct pcmcia_low_level *ops);
+
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c
index 6cbb1b1..35d5280 100644
--- a/drivers/pcmcia/pxa2xx_lubbock.c
+++ b/drivers/pcmcia/pxa2xx_lubbock.c
@@ -32,6 +32,7 @@ static int
lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
const socket_state_t *state)
{
+ struct sa1111_pcmcia_socket *s = to_skt(skt);
unsigned int pa_dwr_mask, pa_dwr_set, misc_mask, misc_set;
int ret = 0;
@@ -149,7 +150,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
if (ret == 0) {
lubbock_set_misc_wr(misc_mask, misc_set);
- sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, pa_dwr_set);
+ sa1111_set_io(s->dev, pa_dwr_mask, pa_dwr_set);
}
#if 1
@@ -175,7 +176,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
* Switch to 5V, Configure socket with 5V voltage
*/
lubbock_set_misc_wr(misc_mask, 0);
- sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, 0);
+ sa1111_set_io(s->dev, pa_dwr_mask, 0);
/*
* It takes about 100ms to turn off Vcc.
@@ -228,8 +229,9 @@ int pcmcia_lubbock_init(struct sa1111_dev *sadev)
/* Set CF Socket 1 power to standby mode. */
lubbock_set_misc_wr((1 << 15) | (1 << 14), 0);
- sadev->dev.platform_data = &lubbock_pcmcia_ops;
- ret = __pxa2xx_drv_pcmcia_probe(&sadev->dev);
+ pxa2xx_drv_pcmcia_ops(&lubbock_pcmcia_ops);
+ ret = sa1111_pcmcia_add(sadev, &lubbock_pcmcia_ops,
+ pxa2xx_drv_pcmcia_add_one);
}
return ret;
diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c
index 1ca9737..6399314 100644
--- a/drivers/pcmcia/sa1100_badge4.c
+++ b/drivers/pcmcia/sa1100_badge4.c
@@ -134,6 +134,9 @@ static struct pcmcia_low_level badge4_pcmcia_ops = {
.socket_init = sa1111_pcmcia_socket_init,
.socket_suspend = sa1111_pcmcia_socket_suspend,
+
+ .first = 0,
+ .nr = 2,
};
int pcmcia_badge4_init(struct device *dev)
@@ -146,7 +149,9 @@ int pcmcia_badge4_init(struct device *dev)
__func__,
badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc);
- ret = sa11xx_drv_pcmcia_probe(dev, &badge4_pcmcia_ops, 0, 2);
+ sa11xx_drv_pcmcia_ops(&badge4_pcmcia_ops);
+ ret = sa1111_pcmcia_add(dev, &badge4_pcmcia_ops,
+ sa11xx_drv_pcmcia_add_one);
}
return ret;
diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c
index 7eedb42..4a32f4f 100644
--- a/drivers/pcmcia/sa1100_jornada720.c
+++ b/drivers/pcmcia/sa1100_jornada720.c
@@ -24,6 +24,7 @@
static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
+ struct sa1111_pcmcia_socket *s = to_skt(skt);
unsigned int pin = GPIO_A0 | GPIO_A1 | GPIO_A2 | GPIO_A3;
/*
@@ -31,9 +32,9 @@ static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
*/
GRER |= 0x00000002;
/* Set GPIO_A<3:1> to be outputs for PCMCIA/CF power controller: */
- sa1111_set_io_dir(SA1111_DEV(skt->dev), pin, 0, 0);
- sa1111_set_io(SA1111_DEV(skt->dev), pin, 0);
- sa1111_set_sleep_io(SA1111_DEV(skt->dev), pin, 0);
+ sa1111_set_io_dir(s->dev, pin, 0, 0);
+ sa1111_set_io(s->dev, pin, 0);
+ sa1111_set_sleep_io(s->dev, pin, 0);
return sa1111_pcmcia_hw_init(skt);
}
@@ -41,6 +42,7 @@ static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
static int
jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state)
{
+ struct sa1111_pcmcia_socket *s = to_skt(skt);
unsigned int pa_dwr_mask, pa_dwr_set;
int ret;
@@ -97,7 +99,7 @@ jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s
unsigned long flags;
local_irq_save(flags);
- sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, pa_dwr_set);
+ sa1111_set_io(s->dev, pa_dwr_mask, pa_dwr_set);
local_irq_restore(flags);
}
@@ -113,14 +115,20 @@ static struct pcmcia_low_level jornada720_pcmcia_ops = {
.socket_init = sa1111_pcmcia_socket_init,
.socket_suspend = sa1111_pcmcia_socket_suspend,
+
+ .first = 0,
+ .nr = 2,
};
int __devinit pcmcia_jornada720_init(struct device *dev)
{
int ret = -ENODEV;
- if (machine_is_jornada720())
- ret = sa11xx_drv_pcmcia_probe(dev, &jornada720_pcmcia_ops, 0, 2);
+ if (machine_is_jornada720()) {
+ sa11xx_drv_pcmcia_ops(&jornada720_pcmcia_ops);
+ ret = sa1111_pcmcia_add(dev, &jornada720_pcmcia_ops,
+ sa11xx_drv_pcmcia_add_one);
+ }
return ret;
}
diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c
index 0c76d33..e39c65a 100644
--- a/drivers/pcmcia/sa1100_neponset.c
+++ b/drivers/pcmcia/sa1100_neponset.c
@@ -43,6 +43,7 @@
static int
neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state)
{
+ struct sa1111_pcmcia_socket *s = to_skt(skt);
unsigned int ncr_mask, ncr_set, pa_dwr_mask, pa_dwr_set;
int ret;
@@ -99,7 +100,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta
NCR_0 = (NCR_0 & ~ncr_mask) | ncr_set;
local_irq_restore(flags);
- sa1111_set_io(SA1111_DEV(skt->dev), pa_dwr_mask, pa_dwr_set);
+ sa1111_set_io(s->dev, pa_dwr_mask, pa_dwr_set);
}
return 0;
@@ -121,6 +122,8 @@ static struct pcmcia_low_level neponset_pcmcia_ops = {
.configure_socket = neponset_pcmcia_configure_socket,
.socket_init = neponset_pcmcia_socket_init,
.socket_suspend = sa1111_pcmcia_socket_suspend,
+ .first = 0,
+ .nr = 2,
};
int pcmcia_neponset_init(struct sa1111_dev *sadev)
@@ -135,7 +138,9 @@ int pcmcia_neponset_init(struct sa1111_dev *sadev)
sa1111_set_io_dir(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0, 0);
sa1111_set_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
sa1111_set_sleep_io(sadev, GPIO_A0|GPIO_A1|GPIO_A2|GPIO_A3, 0);
- ret = sa11xx_drv_pcmcia_probe(&sadev->dev, &neponset_pcmcia_ops, 0, 2);
+ sa11xx_drv_pcmcia_ops(&neponset_pcmcia_ops);
+ ret = sa1111_pcmcia_add(sadev, &neponset_pcmcia_ops,
+ sa11xx_drv_pcmcia_add_one);
}
return ret;
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index a6793e3..98c7915 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -30,9 +30,6 @@ static struct pcmcia_irqs irqs[] = {
int sa1111_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
- if (skt->irq == NO_IRQ)
- skt->irq = skt->nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
-
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
@@ -43,8 +40,8 @@ void sa1111_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_state *state)
{
- struct sa1111_dev *sadev = SA1111_DEV(skt->dev);
- unsigned long status = sa1111_readl(sadev->mapbase + SA1111_PCSR);
+ struct sa1111_pcmcia_socket *s = to_skt(skt);
+ unsigned long status = sa1111_readl(s->dev->mapbase + SA1111_PCSR);
switch (skt->nr) {
case 0:
@@ -71,7 +68,7 @@ void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *skt, struct pcmcia_sta
int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state)
{
- struct sa1111_dev *sadev = SA1111_DEV(skt->dev);
+ struct sa1111_pcmcia_socket *s = to_skt(skt);
unsigned int pccr_skt_mask, pccr_set_mask, val;
unsigned long flags;
@@ -100,10 +97,10 @@ int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s
pccr_set_mask |= PCCR_S0_FLT|PCCR_S1_FLT;
local_irq_save(flags);
- val = sa1111_readl(sadev->mapbase + SA1111_PCCR);
+ val = sa1111_readl(s->dev->mapbase + SA1111_PCCR);
val &= ~pccr_skt_mask;
val |= pccr_set_mask & pccr_skt_mask;
- sa1111_writel(val, sadev->mapbase + SA1111_PCCR);
+ sa1111_writel(val, s->dev->mapbase + SA1111_PCCR);
local_irq_restore(flags);
return 0;
@@ -119,10 +116,45 @@ void sa1111_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
+int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
+ int (*add)(struct soc_pcmcia_socket *))
+{
+ struct sa1111_pcmcia_socket *s;
+ int i, ret = 0;
+
+ s = kzalloc(sizeof(*s) * ops->nr, GFP_KERNEL);
+ if (!s)
+ return -ENODEV;
+
+ for (i = 0; i < ops->nr; i++) {
+ s = kzalloc(sizeof(*s), GFP_KERNEL);
+ if (!s)
+ return -ENOMEM;
+
+ s->soc.nr = ops->first + i;
+ s->soc.irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
+ s->soc.ops = ops;
+ s->soc.socket.owner = ops->owner;
+ s->soc.socket.dev.parent = &dev->dev;
+ s->dev = dev;
+
+ ret = add(&s->soc);
+ if (ret == 0) {
+ s->next = dev_get_drvdata(&dev->dev);
+ dev_set_drvdata(&dev->dev, s);
+ } else
+ kfree(s);
+ }
+
+ return ret;
+}
+
static int pcmcia_probe(struct sa1111_dev *dev)
{
void __iomem *base;
+ dev_set_drvdata(&dev->dev, NULL);
+
if (!request_mem_region(dev->res.start, 512,
SA1111_DRIVER_NAME(dev)))
return -EBUSY;
@@ -152,15 +184,15 @@ static int pcmcia_probe(struct sa1111_dev *dev)
static int __devexit pcmcia_remove(struct sa1111_dev *dev)
{
- struct skt_dev_info *sinfo = dev_get_drvdata(&dev->dev);
- int i;
+ struct sa1111_pcmcia_socket *next, *s = dev_get_drvdata(&dev->dev);
dev_set_drvdata(&dev->dev, NULL);
- for (i = 0; i < sinfo->nskt; i++)
- soc_pcmcia_remove_one(&sinfo->skt[i]);
+ for (; next = s->next, s; s = next) {
+ soc_pcmcia_remove_one(&s->soc);
+ kfree(s);
+ }
- kfree(sinfo);
release_mem_region(dev->res.start, 512);
return 0;
}
diff --git a/drivers/pcmcia/sa1111_generic.h b/drivers/pcmcia/sa1111_generic.h
index 10ced4a..536fe15 100644
--- a/drivers/pcmcia/sa1111_generic.h
+++ b/drivers/pcmcia/sa1111_generic.h
@@ -1,6 +1,20 @@
#include "soc_common.h"
#include "sa11xx_base.h"
+struct sa1111_pcmcia_socket {
+ struct soc_pcmcia_socket soc;
+ struct sa1111_dev *dev;
+ struct sa1111_pcmcia_socket *next;
+};
+
+static inline struct sa1111_pcmcia_socket *to_skt(struct soc_pcmcia_socket *s)
+{
+ return container_of(s, struct sa1111_pcmcia_socket, soc);
+}
+
+int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
+ int (*add)(struct soc_pcmcia_socket *));
+
extern int sa1111_pcmcia_hw_init(struct soc_pcmcia_socket *);
extern void sa1111_pcmcia_hw_shutdown(struct soc_pcmcia_socket *);
extern void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *, struct pcmcia_state *);
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index 92a4348..4db8149 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -171,7 +171,7 @@ static const char *skt_names[] = {
#define SKT_DEV_INFO_SIZE(n) \
(sizeof(struct skt_dev_info) + (n)*sizeof(struct soc_pcmcia_socket))
-static int sa11xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
+int sa11xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
{
skt->res_skt.start = _PCMCIA(skt->nr);
skt->res_skt.end = _PCMCIA(skt->nr) + PCMCIASp - 1;
@@ -195,14 +195,10 @@ static int sa11xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt)
return soc_pcmcia_add_one(skt);
}
+EXPORT_SYMBOL(sa11xx_drv_pcmcia_add_one);
-int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
- int first, int nr)
+void sa11xx_drv_pcmcia_ops(struct pcmcia_low_level *ops)
{
- struct skt_dev_info *sinfo;
- struct soc_pcmcia_socket *skt;
- int i;
-
/*
* set default MECR calculation if the board specific
* code did not specify one...
@@ -216,6 +212,17 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
#ifdef CONFIG_CPU_FREQ
ops->frequency_change = sa1100_pcmcia_frequency_change;
#endif
+}
+EXPORT_SYMBOL(sa11xx_drv_pcmcia_ops);
+
+int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
+ int first, int nr)
+{
+ struct skt_dev_info *sinfo;
+ struct soc_pcmcia_socket *skt;
+ int i, ret = 0;
+
+ sa11xx_drv_pcmcia_ops(ops);
sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL);
if (!sinfo)
diff --git a/drivers/pcmcia/sa11xx_base.h b/drivers/pcmcia/sa11xx_base.h
index 7bc2082..3d76d72 100644
--- a/drivers/pcmcia/sa11xx_base.h
+++ b/drivers/pcmcia/sa11xx_base.h
@@ -118,6 +118,8 @@ static inline unsigned int sa1100_pcmcia_cmd_time(unsigned int cpu_clock_khz,
}
+int sa11xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt);
+void sa11xx_drv_pcmcia_ops(struct pcmcia_low_level *ops);
extern int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr);
#endif /* !defined(_PCMCIA_SA1100_H) */
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 06/10] PCMCIA: sa1111: remove duplicated initializers
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (3 preceding siblings ...)
2009-10-27 23:12 ` [RFC PATCH 05/10] PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data Russell King - ARM Linux
@ 2009-10-27 23:12 ` Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 07/10] PCMCIA: soc_common: constify soc_pcmcia_socket ops member Russell King - ARM Linux
` (5 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:12 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/pxa2xx_lubbock.c | 4 ----
drivers/pcmcia/sa1100_badge4.c | 6 ------
drivers/pcmcia/sa1100_jornada720.c | 32 +++++++++-----------------------
drivers/pcmcia/sa1100_neponset.c | 4 ----
drivers/pcmcia/sa1111_generic.c | 11 ++++++++---
drivers/pcmcia/sa1111_generic.h | 3 ---
6 files changed, 17 insertions(+), 43 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c
index 35d5280..b9f8c8f 100644
--- a/drivers/pcmcia/pxa2xx_lubbock.c
+++ b/drivers/pcmcia/pxa2xx_lubbock.c
@@ -201,12 +201,8 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
static struct pcmcia_low_level lubbock_pcmcia_ops = {
.owner = THIS_MODULE,
- .hw_init = sa1111_pcmcia_hw_init,
- .hw_shutdown = sa1111_pcmcia_hw_shutdown,
- .socket_state = sa1111_pcmcia_socket_state,
.configure_socket = lubbock_pcmcia_configure_socket,
.socket_init = sa1111_pcmcia_socket_init,
- .socket_suspend = sa1111_pcmcia_socket_suspend,
.first = 0,
.nr = 2,
};
diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c
index 6399314..1ce53f4 100644
--- a/drivers/pcmcia/sa1100_badge4.c
+++ b/drivers/pcmcia/sa1100_badge4.c
@@ -127,14 +127,8 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state
static struct pcmcia_low_level badge4_pcmcia_ops = {
.owner = THIS_MODULE,
- .hw_init = sa1111_pcmcia_hw_init,
- .hw_shutdown = sa1111_pcmcia_hw_shutdown,
- .socket_state = sa1111_pcmcia_socket_state,
.configure_socket = badge4_pcmcia_configure_socket,
-
.socket_init = sa1111_pcmcia_socket_init,
- .socket_suspend = sa1111_pcmcia_socket_suspend,
-
.first = 0,
.nr = 2,
};
diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c
index 4a32f4f..6bcabee 100644
--- a/drivers/pcmcia/sa1100_jornada720.c
+++ b/drivers/pcmcia/sa1100_jornada720.c
@@ -22,23 +22,6 @@
#define SOCKET1_POWER (GPIO_GPIO1 | GPIO_GPIO3)
#define SOCKET1_3V GPIO_GPIO3
-static int jornada720_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
-{
- struct sa1111_pcmcia_socket *s = to_skt(skt);
- unsigned int pin = GPIO_A0 | GPIO_A1 | GPIO_A2 | GPIO_A3;
-
- /*
- * What is all this crap for?
- */
- GRER |= 0x00000002;
- /* Set GPIO_A<3:1> to be outputs for PCMCIA/CF power controller: */
- sa1111_set_io_dir(s->dev, pin, 0, 0);
- sa1111_set_io(s->dev, pin, 0);
- sa1111_set_sleep_io(s->dev, pin, 0);
-
- return sa1111_pcmcia_hw_init(skt);
-}
-
static int
jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state)
{
@@ -108,14 +91,8 @@ jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s
static struct pcmcia_low_level jornada720_pcmcia_ops = {
.owner = THIS_MODULE,
- .hw_init = jornada720_pcmcia_hw_init,
- .hw_shutdown = sa1111_pcmcia_hw_shutdown,
- .socket_state = sa1111_pcmcia_socket_state,
.configure_socket = jornada720_pcmcia_configure_socket,
-
.socket_init = sa1111_pcmcia_socket_init,
- .socket_suspend = sa1111_pcmcia_socket_suspend,
-
.first = 0,
.nr = 2,
};
@@ -125,6 +102,15 @@ int __devinit pcmcia_jornada720_init(struct device *dev)
int ret = -ENODEV;
if (machine_is_jornada720()) {
+ unsigned int pin = GPIO_A0 | GPIO_A1 | GPIO_A2 | GPIO_A3;
+
+ GRER |= 0x00000002;
+
+ /* Set GPIO_A<3:1> to be outputs for PCMCIA/CF power controller: */
+ sa1111_set_io_dir(dev, pin, 0, 0);
+ sa1111_set_io(dev, pin, 0);
+ sa1111_set_sleep_io(dev, pin, 0);
+
sa11xx_drv_pcmcia_ops(&jornada720_pcmcia_ops);
ret = sa1111_pcmcia_add(dev, &jornada720_pcmcia_ops,
sa11xx_drv_pcmcia_add_one);
diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c
index e39c65a..c95639b 100644
--- a/drivers/pcmcia/sa1100_neponset.c
+++ b/drivers/pcmcia/sa1100_neponset.c
@@ -116,12 +116,8 @@ static void neponset_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
static struct pcmcia_low_level neponset_pcmcia_ops = {
.owner = THIS_MODULE,
- .hw_init = sa1111_pcmcia_hw_init,
- .hw_shutdown = sa1111_pcmcia_hw_shutdown,
- .socket_state = sa1111_pcmcia_socket_state,
.configure_socket = neponset_pcmcia_configure_socket,
.socket_init = neponset_pcmcia_socket_init,
- .socket_suspend = sa1111_pcmcia_socket_suspend,
.first = 0,
.nr = 2,
};
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 98c7915..219860a 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -28,12 +28,12 @@ static struct pcmcia_irqs irqs[] = {
{ 1, IRQ_S1_BVD1_STSCHG, "SA1111 CF BVD1" },
};
-int sa1111_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
+static int sa1111_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
-void sa1111_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
+static void sa1111_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
{
soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
@@ -111,7 +111,7 @@ void sa1111_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
soc_pcmcia_enable_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
-void sa1111_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
+static void sa1111_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
{
soc_pcmcia_disable_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
@@ -122,6 +122,11 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
struct sa1111_pcmcia_socket *s;
int i, ret = 0;
+ ops->hw_init = sa1111_pcmcia_hw_init;
+ ops->hw_shutdown = sa1111_pcmcia_hw_shutdown;
+ ops->socket_state = sa1111_pcmcia_socket_state;
+ ops->socket_suspend = sa1111_pcmcia_socket_suspend;
+
s = kzalloc(sizeof(*s) * ops->nr, GFP_KERNEL);
if (!s)
return -ENODEV;
diff --git a/drivers/pcmcia/sa1111_generic.h b/drivers/pcmcia/sa1111_generic.h
index 536fe15..02dc857 100644
--- a/drivers/pcmcia/sa1111_generic.h
+++ b/drivers/pcmcia/sa1111_generic.h
@@ -15,12 +15,9 @@ static inline struct sa1111_pcmcia_socket *to_skt(struct soc_pcmcia_socket *s)
int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
int (*add)(struct soc_pcmcia_socket *));
-extern int sa1111_pcmcia_hw_init(struct soc_pcmcia_socket *);
-extern void sa1111_pcmcia_hw_shutdown(struct soc_pcmcia_socket *);
extern void sa1111_pcmcia_socket_state(struct soc_pcmcia_socket *, struct pcmcia_state *);
extern int sa1111_pcmcia_configure_socket(struct soc_pcmcia_socket *, const socket_state_t *);
extern void sa1111_pcmcia_socket_init(struct soc_pcmcia_socket *);
-extern void sa1111_pcmcia_socket_suspend(struct soc_pcmcia_socket *);
extern int pcmcia_badge4_init(struct device *);
extern int pcmcia_jornada720_init(struct device *);
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 07/10] PCMCIA: soc_common: constify soc_pcmcia_socket ops member
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (4 preceding siblings ...)
2009-10-27 23:12 ` [RFC PATCH 06/10] PCMCIA: sa1111: remove duplicated initializers Russell King - ARM Linux
@ 2009-10-27 23:12 ` Russell King - ARM Linux
2009-10-27 23:13 ` [RFC PATCH 08/10] PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket Russell King - ARM Linux
` (4 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:12 UTC (permalink / raw)
To: linux-arm-kernel
No one should modify the ops structure supplied to soc_pcmcia_socket
so make it const.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/soc_common.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index 8a755c1..f7533dc 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -37,7 +37,7 @@ struct soc_pcmcia_socket {
/*
* Core PCMCIA state
*/
- struct pcmcia_low_level *ops;
+ const struct pcmcia_low_level *ops;
unsigned int status;
socket_state_t cs_state;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 08/10] PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (5 preceding siblings ...)
2009-10-27 23:12 ` [RFC PATCH 07/10] PCMCIA: soc_common: constify soc_pcmcia_socket ops member Russell King - ARM Linux
@ 2009-10-27 23:13 ` Russell King - ARM Linux
2009-10-27 23:13 ` [RFC PATCH 09/10] PCMCIA: ss: allow PCI IRQs > 255 Russell King - ARM Linux
` (3 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:13 UTC (permalink / raw)
To: linux-arm-kernel
The 'dev' member is now only ever written, so we can safely remove it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/pxa2xx_base.c | 1 -
drivers/pcmcia/sa11xx_base.c | 1 -
drivers/pcmcia/soc_common.h | 1 -
3 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index c9c104b..7f61b62 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -288,7 +288,6 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
skt->nr = ops->first + i;
skt->irq = NO_IRQ;
- skt->dev = dev;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev;
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index 4db8149..ac99872 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -236,7 +236,6 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
skt->nr = first + i;
skt->irq = NO_IRQ;
- skt->dev = dev;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev;
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index f7533dc..4fb06f7 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -30,7 +30,6 @@ struct soc_pcmcia_socket {
/*
* Info from low level handler
*/
- struct device *dev;
unsigned int nr;
unsigned int irq;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 09/10] PCMCIA: ss: allow PCI IRQs > 255
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (6 preceding siblings ...)
2009-10-27 23:13 ` [RFC PATCH 08/10] PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket Russell King - ARM Linux
@ 2009-10-27 23:13 ` Russell King - ARM Linux
2009-10-27 23:13 ` [RFC PATCH 10/10] PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket Russell King - ARM Linux
` (2 subsequent siblings)
10 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:13 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
include/pcmcia/ss.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index d696a69..753da9b 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -172,7 +172,7 @@ struct pcmcia_socket {
u_int irq_mask;
u_int map_size;
u_int io_offset;
- u_char pci_irq;
+ u_int pci_irq;
struct pci_dev * cb_dev;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 10/10] PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (7 preceding siblings ...)
2009-10-27 23:13 ` [RFC PATCH 09/10] PCMCIA: ss: allow PCI IRQs > 255 Russell King - ARM Linux
@ 2009-10-27 23:13 ` Russell King - ARM Linux
2009-12-04 16:27 ` [PATCH] pcmcia: Fix additional platforms after removal of skt->irq in 66024db57d5b9011e274b314affad68f370c0d6f Jonathan Cameron
2009-10-27 23:18 ` [RFC PATCH 00/10] PCMCIA soc_common re-factorization Russell King - ARM Linux
2009-12-04 17:18 ` [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Jonathan Cameron
10 siblings, 1 reply; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:13 UTC (permalink / raw)
To: linux-arm-kernel
skt->irq is a mere duplication of pcmcia_socket's pci_irq member.
Get rid of it.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
drivers/pcmcia/pxa2xx_base.c | 2 +-
drivers/pcmcia/pxa2xx_cm_x255.c | 2 +-
drivers/pcmcia/pxa2xx_cm_x270.c | 2 +-
drivers/pcmcia/pxa2xx_e740.c | 2 +-
drivers/pcmcia/pxa2xx_mainstone.c | 2 +-
drivers/pcmcia/pxa2xx_palmld.c | 2 +-
drivers/pcmcia/pxa2xx_palmtx.c | 2 +-
drivers/pcmcia/pxa2xx_sharpsl.c | 2 +-
drivers/pcmcia/pxa2xx_trizeps4.c | 4 ++--
drivers/pcmcia/pxa2xx_viper.c | 2 +-
drivers/pcmcia/sa1100_assabet.c | 2 +-
drivers/pcmcia/sa1100_cerf.c | 2 +-
drivers/pcmcia/sa1100_h3600.c | 4 ++--
drivers/pcmcia/sa1100_shannon.c | 2 +-
drivers/pcmcia/sa1100_simpad.c | 2 +-
drivers/pcmcia/sa1111_generic.c | 2 +-
drivers/pcmcia/sa11xx_base.c | 2 +-
drivers/pcmcia/soc_common.c | 8 ++++----
drivers/pcmcia/soc_common.h | 1 -
19 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 7f61b62..84dde77 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -287,10 +287,10 @@ int __pxa2xx_drv_pcmcia_probe(struct device *dev)
skt = &sinfo->skt[i];
skt->nr = ops->first + i;
- skt->irq = NO_IRQ;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev;
+ skt->socket.pci_irq = NO_IRQ;
ret = pxa2xx_drv_pcmcia_add_one(skt);
if (ret)
diff --git a/drivers/pcmcia/pxa2xx_cm_x255.c b/drivers/pcmcia/pxa2xx_cm_x255.c
index 5143a76..05913d0 100644
--- a/drivers/pcmcia/pxa2xx_cm_x255.c
+++ b/drivers/pcmcia/pxa2xx_cm_x255.c
@@ -44,7 +44,7 @@ static int cmx255_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
return ret;
gpio_direction_output(GPIO_PCMCIA_RESET, 0);
- skt->irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
+ skt->socket.pci_irq = skt->nr == 0 ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret)
gpio_free(GPIO_PCMCIA_RESET);
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c
index a7b943d..5662646 100644
--- a/drivers/pcmcia/pxa2xx_cm_x270.c
+++ b/drivers/pcmcia/pxa2xx_cm_x270.c
@@ -38,7 +38,7 @@ static int cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
return ret;
gpio_direction_output(GPIO_PCMCIA_RESET, 0);
- skt->irq = PCMCIA_S0_RDYINT;
+ skt->socket.pci_irq = PCMCIA_S0_RDYINT;
ret = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
if (!ret)
gpio_free(GPIO_PCMCIA_RESET);
diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c
index d09c0dc..8bfbd4d 100644
--- a/drivers/pcmcia/pxa2xx_e740.c
+++ b/drivers/pcmcia/pxa2xx_e740.c
@@ -38,7 +38,7 @@ static struct pcmcia_irqs cd_irqs[] = {
static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
- skt->irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) :
+ skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) :
IRQ_GPIO(GPIO_E740_PCMCIA_RDY1);
return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1);
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c
index 1138551..92016fe 100644
--- a/drivers/pcmcia/pxa2xx_mainstone.c
+++ b/drivers/pcmcia/pxa2xx_mainstone.c
@@ -44,7 +44,7 @@ static int mst_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
* before we enable them as outputs.
*/
- skt->irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ;
+ skt->socket.pci_irq = (skt->nr == 0) ? MAINSTONE_S0_IRQ : MAINSTONE_S1_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c
index 5ba9b36..6fb6f7f 100644
--- a/drivers/pcmcia/pxa2xx_palmld.c
+++ b/drivers/pcmcia/pxa2xx_palmld.c
@@ -45,7 +45,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
if (ret)
goto err4;
- skt->irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
+ skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
return 0;
err4:
diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/drivers/pcmcia/pxa2xx_palmtx.c
index e07b5c5..b07b247 100644
--- a/drivers/pcmcia/pxa2xx_palmtx.c
+++ b/drivers/pcmcia/pxa2xx_palmtx.c
@@ -53,7 +53,7 @@ static int palmtx_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
if (ret)
goto err5;
- skt->irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY);
+ skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTX_PCMCIA_READY);
return 0;
err5:
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
index bc43f78..0ea3b29 100644
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -66,7 +66,7 @@ static int sharpsl_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
}
}
- skt->irq = SCOOP_DEV[skt->nr].irq;
+ skt->socket.pci_irq = SCOOP_DEV[skt->nr].irq;
return 0;
}
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c
index e0e5cb3..b7e5966 100644
--- a/drivers/pcmcia/pxa2xx_trizeps4.c
+++ b/drivers/pcmcia/pxa2xx_trizeps4.c
@@ -53,7 +53,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
gpio_free(GPIO_PRDY);
return -EINVAL;
}
- skt->irq = IRQ_GPIO(GPIO_PRDY);
+ skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY);
break;
#ifndef CONFIG_MACH_TRIZEPS_CONXS
@@ -63,7 +63,7 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
break;
}
/* release the reset of this card */
- pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->irq);
+ pr_debug("%s: sock %d irq %d\n", __func__, skt->nr, skt->socket.pci_irq);
/* supplementory irqs for the socket */
for (i = 0; i < ARRAY_SIZE(irqs); i++) {
diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c
index 1787136..27be2e1 100644
--- a/drivers/pcmcia/pxa2xx_viper.c
+++ b/drivers/pcmcia/pxa2xx_viper.c
@@ -40,7 +40,7 @@ static int viper_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
unsigned long flags;
- skt->irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
+ skt->socket.pci_irq = gpio_to_irq(VIPER_CF_RDY_GPIO);
if (gpio_request(VIPER_CF_CD_GPIO, "CF detect"))
goto err_request_cd;
diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c
index ac8aa09..fd013a1 100644
--- a/drivers/pcmcia/sa1100_assabet.c
+++ b/drivers/pcmcia/sa1100_assabet.c
@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
static int assabet_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
- skt->irq = ASSABET_IRQ_GPIO_CF_IRQ;
+ skt->socket.pci_irq = ASSABET_IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
diff --git a/drivers/pcmcia/sa1100_cerf.c b/drivers/pcmcia/sa1100_cerf.c
index 63e6bc4..9bf088b 100644
--- a/drivers/pcmcia/sa1100_cerf.c
+++ b/drivers/pcmcia/sa1100_cerf.c
@@ -27,7 +27,7 @@ static struct pcmcia_irqs irqs[] = {
static int cerf_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
- skt->irq = CERF_IRQ_GPIO_CF_IRQ;
+ skt->socket.pci_irq = CERF_IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
diff --git a/drivers/pcmcia/sa1100_h3600.c b/drivers/pcmcia/sa1100_h3600.c
index 0cc3748..3a121ac 100644
--- a/drivers/pcmcia/sa1100_h3600.c
+++ b/drivers/pcmcia/sa1100_h3600.c
@@ -25,8 +25,8 @@ static struct pcmcia_irqs irqs[] = {
static int h3600_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
{
- skt->irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
- : IRQ_GPIO_H3600_PCMCIA_IRQ0;
+ skt->socket.pci_irq = skt->nr ? IRQ_GPIO_H3600_PCMCIA_IRQ1
+ : IRQ_GPIO_H3600_PCMCIA_IRQ0;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c
index 46d8c19..c4d5186 100644
--- a/drivers/pcmcia/sa1100_shannon.c
+++ b/drivers/pcmcia/sa1100_shannon.c
@@ -28,7 +28,7 @@ static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
GAFR &= ~(SHANNON_GPIO_EJECT_0 | SHANNON_GPIO_EJECT_1 |
SHANNON_GPIO_RDY_0 | SHANNON_GPIO_RDY_1);
- skt->irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0;
+ skt->socket.pci_irq = skt->nr ? SHANNON_IRQ_GPIO_RDY_1 : SHANNON_IRQ_GPIO_RDY_0;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c
index 33a08ae..05bd504 100644
--- a/drivers/pcmcia/sa1100_simpad.c
+++ b/drivers/pcmcia/sa1100_simpad.c
@@ -28,7 +28,7 @@ static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
- skt->irq = IRQ_GPIO_CF_IRQ;
+ skt->socket.pci_irq = IRQ_GPIO_CF_IRQ;
return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
}
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 219860a..deb5036 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -137,10 +137,10 @@ int sa1111_pcmcia_add(struct sa1111_dev *dev, struct pcmcia_low_level *ops,
return -ENOMEM;
s->soc.nr = ops->first + i;
- s->soc.irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
s->soc.ops = ops;
s->soc.socket.owner = ops->owner;
s->soc.socket.dev.parent = &dev->dev;
+ s->soc.socket.pci_irq = s->soc.nr ? IRQ_S1_READY_NINT : IRQ_S0_READY_NINT;
s->dev = dev;
ret = add(&s->soc);
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index ac99872..fc9a652 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -235,10 +235,10 @@ int sa11xx_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
skt = &sinfo->skt[i];
skt->nr = first + i;
- skt->irq = NO_IRQ;
skt->ops = ops;
skt->socket.owner = ops->owner;
skt->socket.dev.parent = dev;
+ skt->socket.pci_irq = NO_IRQ;
ret = sa11xx_drv_pcmcia_add_one(skt);
if (ret)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 8e262a4..5ddf8fa 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -144,10 +144,10 @@ soc_common_pcmcia_config_skt(struct soc_pcmcia_socket *skt, socket_state_t *stat
*/
if (skt->irq_state != 1 && state->io_irq) {
skt->irq_state = 1;
- set_irq_type(skt->irq, IRQ_TYPE_EDGE_FALLING);
+ set_irq_type(skt->socket.pci_irq, IRQ_TYPE_EDGE_FALLING);
} else if (skt->irq_state == 1 && state->io_irq == 0) {
skt->irq_state = 0;
- set_irq_type(skt->irq, IRQ_TYPE_NONE);
+ set_irq_type(skt->socket.pci_irq, IRQ_TYPE_NONE);
}
skt->cs_state = *state;
@@ -491,7 +491,8 @@ static ssize_t show_status(struct device *dev, struct device_attribute *attr, ch
p+=sprintf(p, "Vcc : %d\n", skt->cs_state.Vcc);
p+=sprintf(p, "Vpp : %d\n", skt->cs_state.Vpp);
- p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq, skt->irq);
+ p+=sprintf(p, "IRQ : %d (%d)\n", skt->cs_state.io_irq,
+ skt->socket.pci_irq);
if (skt->ops->show_timing)
p+=skt->ops->show_timing(skt, p);
@@ -694,7 +695,6 @@ int soc_pcmcia_add_one(struct soc_pcmcia_socket *skt)
skt->socket.resource_ops = &pccard_static_ops;
skt->socket.irq_mask = 0;
skt->socket.map_size = PAGE_SIZE;
- skt->socket.pci_irq = skt->irq;
skt->socket.io_offset = (unsigned long)skt->virt_io;
skt->status = soc_common_pcmcia_skt_state(skt);
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index 4fb06f7..e40824c 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -31,7 +31,6 @@ struct soc_pcmcia_socket {
* Info from low level handler
*/
unsigned int nr;
- unsigned int irq;
/*
* Core PCMCIA state
--
1.6.2.5
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 00/10] PCMCIA soc_common re-factorization
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (8 preceding siblings ...)
2009-10-27 23:13 ` [RFC PATCH 10/10] PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket Russell King - ARM Linux
@ 2009-10-27 23:18 ` Russell King - ARM Linux
2009-10-27 23:21 ` Russell King - ARM Linux
` (2 more replies)
2009-12-04 17:18 ` [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Jonathan Cameron
10 siblings, 3 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:18 UTC (permalink / raw)
To: linux-arm-kernel
This is a re-post of the previous patch series, but rebased forward
earlier on this month. Review comments would be nice to have, or
alternatively acks.
Lastly, is there an active PCMCIA maintainer who should take these?
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 00/10] PCMCIA soc_common re-factorization
2009-10-27 23:18 ` [RFC PATCH 00/10] PCMCIA soc_common re-factorization Russell King - ARM Linux
@ 2009-10-27 23:21 ` Russell King - ARM Linux
2009-10-28 8:44 ` Wolfram Sang
2009-10-28 21:25 ` Dominik Brodowski
2 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-27 23:21 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Oct 27, 2009 at 11:18:49PM +0000, Russell King - ARM Linux wrote:
> This is a re-post of the previous patch series, but rebased forward
> earlier on this month. Review comments would be nice to have, or
> alternatively acks.
>
> Lastly, is there an active PCMCIA maintainer who should take these?
Oh, and sorry for the stupid dates; next time I'll remember to delete
the Date: header from the git format-patch output.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 00/10] PCMCIA soc_common re-factorization
2009-10-27 23:18 ` [RFC PATCH 00/10] PCMCIA soc_common re-factorization Russell King - ARM Linux
2009-10-27 23:21 ` Russell King - ARM Linux
@ 2009-10-28 8:44 ` Wolfram Sang
2009-10-28 21:25 ` Dominik Brodowski
2 siblings, 0 replies; 24+ messages in thread
From: Wolfram Sang @ 2009-10-28 8:44 UTC (permalink / raw)
To: linux-arm-kernel
> Lastly, is there an active PCMCIA maintainer who should take these?
Dominik is very active these days (see pcmcia ml-archives).
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091028/0ac78fa0/attachment.sig>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 00/10] PCMCIA soc_common re-factorization
2009-10-27 23:18 ` [RFC PATCH 00/10] PCMCIA soc_common re-factorization Russell King - ARM Linux
2009-10-27 23:21 ` Russell King - ARM Linux
2009-10-28 8:44 ` Wolfram Sang
@ 2009-10-28 21:25 ` Dominik Brodowski
2009-10-29 17:25 ` Russell King - ARM Linux
2 siblings, 1 reply; 24+ messages in thread
From: Dominik Brodowski @ 2009-10-28 21:25 UTC (permalink / raw)
To: linux-arm-kernel
Russell,
On Tue, Oct 27, 2009 at 11:18:49PM +0000, Russell King - ARM Linux wrote:
> This is a re-post of the previous patch series, but rebased forward
> earlier on this month. Review comments would be nice to have, or
> alternatively acks.
Acked-by / Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> .
> Lastly, is there an active PCMCIA maintainer who should take these?
Do you have a git tree to pull from, or shall I apply each patch locally?
Alternatively, you're free to push it upstream yourself; as the PCMCIA core
is only touched in one (albeit _very_ useful) line.
Best,
Dominik
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 00/10] PCMCIA soc_common re-factorization
2009-10-28 21:25 ` Dominik Brodowski
@ 2009-10-29 17:25 ` Russell King - ARM Linux
2009-11-02 17:21 ` Dominik Brodowski
0 siblings, 1 reply; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-10-29 17:25 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Oct 28, 2009 at 10:25:34PM +0100, Dominik Brodowski wrote:
> Do you have a git tree to pull from, or shall I apply each patch locally?
> Alternatively, you're free to push it upstream yourself; as the PCMCIA core
> is only touched in one (albeit _very_ useful) line.
Thanks. Here's a URL you can pull them from:
ssh://master.kernel.org/home/rmk/linux-2.6-arm.git pcmcia
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 00/10] PCMCIA soc_common re-factorization
2009-10-29 17:25 ` Russell King - ARM Linux
@ 2009-11-02 17:21 ` Dominik Brodowski
0 siblings, 0 replies; 24+ messages in thread
From: Dominik Brodowski @ 2009-11-02 17:21 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Oct 29, 2009 at 05:25:52PM +0000, Russell King - ARM Linux wrote:
> On Wed, Oct 28, 2009 at 10:25:34PM +0100, Dominik Brodowski wrote:
> > Do you have a git tree to pull from, or shall I apply each patch locally?
> > Alternatively, you're free to push it upstream yourself; as the PCMCIA core
> > is only touched in one (albeit _very_ useful) line.
>
> Thanks. Here's a URL you can pull them from:
>
> ssh://master.kernel.org/home/rmk/linux-2.6-arm.git pcmcia
Thanks! I've applied the patches you sent me by mail, though, as your tree
was based on something more recent from Linus than my tree, and I wanted to
avoid a merge of Linus' tree into my tree.
http://git.kernel.org/?p=linux/kernel/git/brodo/pcmcia-2.6.git;a=summary
should have your patches momentarily.
Best,
Dominik
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH] pcmcia: Fix additional platforms after removal of skt->irq in 66024db57d5b9011e274b314affad68f370c0d6f
2009-10-27 23:13 ` [RFC PATCH 10/10] PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket Russell King - ARM Linux
@ 2009-12-04 16:27 ` Jonathan Cameron
2009-12-04 16:31 ` Jonathan Cameron
0 siblings, 1 reply; 24+ messages in thread
From: Jonathan Cameron @ 2009-12-04 16:27 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Jonathan Cameron <jic23@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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH] pcmcia: Fix additional platforms after removal of skt->irq in 66024db57d5b9011e274b314affad68f370c0d6f
2009-12-04 16:27 ` [PATCH] pcmcia: Fix additional platforms after removal of skt->irq in 66024db57d5b9011e274b314affad68f370c0d6f Jonathan Cameron
@ 2009-12-04 16:31 ` Jonathan Cameron
0 siblings, 0 replies; 24+ messages in thread
From: Jonathan Cameron @ 2009-12-04 16:31 UTC (permalink / raw)
To: linux-arm-kernel
Actually, sorry for the noise. Please hold off on this one, there are more
problems due to the same patch set. Should have waited for the compile to finish!
Jonathan
> Signed-off-by: Jonathan Cameron <jic23@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));
> }
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
` (9 preceding siblings ...)
2009-10-27 23:18 ` [RFC PATCH 00/10] PCMCIA soc_common re-factorization Russell King - ARM Linux
@ 2009-12-04 17:18 ` Jonathan Cameron
2009-12-04 17:24 ` Russell King - ARM Linux
10 siblings, 1 reply; 24+ messages in thread
From: Jonathan Cameron @ 2009-12-04 17:18 UTC (permalink / raw)
To: linux-arm-kernel
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+kernel@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_SA1111
> tristate "SA1111 support"
> depends on ARM && ARCH_SA1100 && SA1111 && PCMCIA
> + select PCMCIA_SOC_COMMON
> help
> Say Y here to include support for SA1111-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_SA1111) += sa11xx_core.o sa1111_cs.o
> +obj-$(CONFIG_PCMCIA_SOC_COMMON) += soc_common.o
> +obj-$(CONFIG_PCMCIA_SA1100) += sa11xx_base.o sa1100_cs.o
> +obj-$(CONFIG_PCMCIA_SA1111) += sa11xx_base.o sa1111_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 @@ pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o
> pxa2xx-obj-$(CONFIG_MACH_E740) += pxa2xx_e740.o
> pxa2xx-obj-$(CONFIG_MACH_STARGATE2) += pxa2xx_stargate2.o
>
> -obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o $(pxa2xx-obj-y)
> +obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y)
> diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
> index 163cf98..38c5484 100644
> --- a/drivers/pcmcia/soc_common.c
> +++ b/drivers/pcmcia/soc_common.c
> @@ -608,15 +608,14 @@ static int soc_pcmcia_cpufreq_register(void)
> "notifier for PCMCIA (%d)\n", ret);
> return ret;
> }
> +fs_initcall(soc_pcmcia_cpufreq_register);
>
> static void soc_pcmcia_cpufreq_unregister(void)
> {
> cpufreq_unregister_notifier(&soc_pcmcia_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
> }
> +module_exit(soc_pcmcia_cpufreq_unregister);
>
> -#else
> -static int soc_pcmcia_cpufreq_register(void) { return 0; }
> -static void soc_pcmcia_cpufreq_unregister(void) {}
> #endif
>
> int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops,
> @@ -667,9 +666,6 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
> goto out_err_5;
> }
>
> - if (list_empty(&soc_pcmcia_sockets))
> - soc_pcmcia_cpufreq_register();
> -
> list_add(&skt->node, &soc_pcmcia_sockets);
>
> /*
> @@ -742,6 +738,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
> mutex_unlock(&soc_pcmcia_sockets_lock);
> return ret;
> }
> +EXPORT_SYMBOL(soc_common_drv_pcmcia_probe);
>
> int soc_common_drv_pcmcia_remove(struct device *dev)
> {
> @@ -772,9 +769,6 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
> release_resource(&skt->res_io);
> release_resource(&skt->res_skt);
> }
> - if (list_empty(&soc_pcmcia_sockets))
> - soc_pcmcia_cpufreq_unregister();
> -
> mutex_unlock(&soc_pcmcia_sockets_lock);
>
> kfree(sinfo);
> @@ -782,3 +776,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
> return 0;
> }
> EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);
> +
> +MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
> +MODULE_DESCRIPTION("Linux PCMCIA Card Services: Common SoC support");
> +MODULE_LICENSE("Dual MPL/GPL");
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
2009-12-04 17:18 ` [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Jonathan Cameron
@ 2009-12-04 17:24 ` Russell King - ARM Linux
2009-12-05 9:56 ` Dominik Brodowski
0 siblings, 1 reply; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-12-04 17:24 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Dec 04, 2009 at 05:18:16PM +0000, Jonathan Cameron wrote:
> Hi Russell,
>
> This one is causing me some build problems.
Well, I've no idea what's happened to Dominik. While I may be the
author of these patches, I didn't commit them, so they're out of my
control.
There are some outstanding merge issues which SFR identified, and so
far Dominik has been quiet on them.
For the time being, I'll merge your patch into my git tree, but unless
Dominik hands my patches back to me for merging, it will be lost.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
2009-12-04 17:24 ` Russell King - ARM Linux
@ 2009-12-05 9:56 ` Dominik Brodowski
2009-12-05 10:28 ` Russell King - ARM Linux
0 siblings, 1 reply; 24+ messages in thread
From: Dominik Brodowski @ 2009-12-05 9:56 UTC (permalink / raw)
To: linux-arm-kernel
Russell,
On Fri, Dec 04, 2009 at 05:24:17PM +0000, Russell King - ARM Linux wrote:
> For the time being, I'll merge your patch into my git tree, but unless
> Dominik hands my patches back to me for merging, it will be lost.
your patches -- which you asked me to merge and push upstream -- are on
their way to Linus. I'll merge this bugfix to your patch later and push it
upstream, too, unless you prefer to do that independently.
Best,
Dominik
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
2009-12-05 9:56 ` Dominik Brodowski
@ 2009-12-05 10:28 ` Russell King - ARM Linux
2009-12-05 11:04 ` Dominik Brodowski
0 siblings, 1 reply; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-12-05 10:28 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Dec 05, 2009 at 10:56:33AM +0100, Dominik Brodowski wrote:
> Russell,
>
> On Fri, Dec 04, 2009 at 05:24:17PM +0000, Russell King - ARM Linux wrote:
> > For the time being, I'll merge your patch into my git tree, but unless
> > Dominik hands my patches back to me for merging, it will be lost.
>
> your patches -- which you asked me to merge and push upstream -- are on
> their way to Linus. I'll merge this bugfix to your patch later and push it
> upstream, too, unless you prefer to do that independently.
Yes I did at the time, but things change. Since you've been totally silent
on the merge conflicts between your PCMCIA tree and my tree which SFR
reported on December 1st:
| Hi Dominik,
|
| Today's linux-next merge of the pcmcia tree got a conflict in
| drivers/pcmcia/sa1100_h3600.c between commit
| 6ce8f65e71f0d80ee23b543be09789dd865a99be ("ARM: 5811/1: pcmcia: convert
| sa1100_h3600 driver to gpiolib") from the arm tree and commit
| 66024db57d5b9011e274b314affad68f370c0d6f ("PCMCIA: stop duplicating
| pci_irq in soc_pcmcia_socket") from the pcmcia tree.
|
| I fixed it up (see below) and can carry the fix as necessary. Please
| check the fix below.
...
To which there was this reply:
| Fix looks good to me, and testing next-20091201 on real device (h3600)
| shows no problems with pcmcia.
|
| Perhaps this merge conflict can be avoided by merging Russell's PCMCIA
| patches through arm tree. But, anyway, it's Russell and Dominik
| to decide.
And a reply from me agreeing that it would probably make more sense in
light of this for my patches to go through my tree.
This is no longer possible, so I'm going to kick out the conflicting code
for the time being. The conflicting stuff can be merged at some later
date once this kind of issue is solved.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
2009-12-05 10:28 ` Russell King - ARM Linux
@ 2009-12-05 11:04 ` Dominik Brodowski
2009-12-05 11:29 ` Russell King - ARM Linux
0 siblings, 1 reply; 24+ messages in thread
From: Dominik Brodowski @ 2009-12-05 11:04 UTC (permalink / raw)
To: linux-arm-kernel
Russell,
On Sat, Dec 05, 2009 at 10:28:16AM +0000, Russell King - ARM Linux wrote:
> On Sat, Dec 05, 2009 at 10:56:33AM +0100, Dominik Brodowski wrote:
> > Russell,
> >
> > On Fri, Dec 04, 2009 at 05:24:17PM +0000, Russell King - ARM Linux wrote:
> > > For the time being, I'll merge your patch into my git tree, but unless
> > > Dominik hands my patches back to me for merging, it will be lost.
> >
> > your patches -- which you asked me to merge and push upstream -- are on
> > their way to Linus. I'll merge this bugfix to your patch later and push it
> > upstream, too, unless you prefer to do that independently.
>
> Yes I did at the time, but things change. Since you've been totally silent
> on the merge conflicts between your PCMCIA tree and my tree which SFR
> reported on December 1st:
Well, as this was an addition through your tree, I didn't consider it
neccessary to comment on it.
> | Hi Dominik,
> |
> | Today's linux-next merge of the pcmcia tree got a conflict in
> | drivers/pcmcia/sa1100_h3600.c between commit
> | 6ce8f65e71f0d80ee23b543be09789dd865a99be ("ARM: 5811/1: pcmcia: convert
> | sa1100_h3600 driver to gpiolib") from the arm tree and commit
> | 66024db57d5b9011e274b314affad68f370c0d6f ("PCMCIA: stop duplicating
> | pci_irq in soc_pcmcia_socket") from the pcmcia tree.
> |
> | I fixed it up (see below) and can carry the fix as necessary. Please
> | check the fix below.
> ...
>
> To which there was this reply:
> | Fix looks good to me, and testing next-20091201 on real device (h3600)
> | shows no problems with pcmcia.
> |
> | Perhaps this merge conflict can be avoided by merging Russell's PCMCIA
> | patches through arm tree. But, anyway, it's Russell and Dominik
> | to decide.
>
> And a reply from me agreeing that it would probably make more sense in
> light of this for my patches to go through my tree.
Well, another option would have been to merge the other changes to
drivers/pcmcia/ via PCMCIA -- something which has not even been suggested.
More and more I think some if not all PCMCIA socket drivers should reside in
subdirectories to drivers/pcmcia/ .
> This is no longer possible, so I'm going to kick out the conflicting code
> for the time being. The conflicting stuff can be merged at some later
> date once this kind of issue is solved.
That's one option, yes.
Best,
Dominik
^ permalink raw reply [flat|nested] 24+ messages in thread
* [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
2009-12-05 11:04 ` Dominik Brodowski
@ 2009-12-05 11:29 ` Russell King - ARM Linux
0 siblings, 0 replies; 24+ messages in thread
From: Russell King - ARM Linux @ 2009-12-05 11:29 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Dec 05, 2009 at 12:04:17PM +0100, Dominik Brodowski wrote:
> Russell,
>
> On Sat, Dec 05, 2009 at 10:28:16AM +0000, Russell King - ARM Linux wrote:
> > On Sat, Dec 05, 2009 at 10:56:33AM +0100, Dominik Brodowski wrote:
> > > Russell,
> > >
> > > On Fri, Dec 04, 2009 at 05:24:17PM +0000, Russell King - ARM Linux wrote:
> > > > For the time being, I'll merge your patch into my git tree, but unless
> > > > Dominik hands my patches back to me for merging, it will be lost.
> > >
> > > your patches -- which you asked me to merge and push upstream -- are on
> > > their way to Linus. I'll merge this bugfix to your patch later and push it
> > > upstream, too, unless you prefer to do that independently.
> >
> > Yes I did at the time, but things change. Since you've been totally silent
> > on the merge conflicts between your PCMCIA tree and my tree which SFR
> > reported on December 1st:
>
> Well, as this was an addition through your tree, I didn't consider it
> neccessary to comment on it.
Which, in spite of the discussion surrounding the conflict, and the
resulting fall-out from it, would seem to have been the wrong decision.
>
> > | Hi Dominik,
> > |
> > | Today's linux-next merge of the pcmcia tree got a conflict in
> > | drivers/pcmcia/sa1100_h3600.c between commit
> > | 6ce8f65e71f0d80ee23b543be09789dd865a99be ("ARM: 5811/1: pcmcia: convert
> > | sa1100_h3600 driver to gpiolib") from the arm tree and commit
> > | 66024db57d5b9011e274b314affad68f370c0d6f ("PCMCIA: stop duplicating
> > | pci_irq in soc_pcmcia_socket") from the pcmcia tree.
> > |
> > | I fixed it up (see below) and can carry the fix as necessary. Please
> > | check the fix below.
> > ...
> >
> > To which there was this reply:
> > | Fix looks good to me, and testing next-20091201 on real device (h3600)
> > | shows no problems with pcmcia.
> > |
> > | Perhaps this merge conflict can be avoided by merging Russell's PCMCIA
> > | patches through arm tree. But, anyway, it's Russell and Dominik
> > | to decide.
> >
> > And a reply from me agreeing that it would probably make more sense in
> > light of this for my patches to go through my tree.
>
> Well, another option would have been to merge the other changes to
> drivers/pcmcia/ via PCMCIA -- something which has not even been suggested.
That would mean merging a bunch of other non-PCMCIA related changes
through your tree as well.
Do you want all the non-PCMCIA related changes in your tree as well?
> More and more I think some if not all PCMCIA socket drivers should reside in
> subdirectories to drivers/pcmcia/ .
That's a completely separate issue.
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2009-12-05 11:29 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-27 23:11 [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 02/10] PCMCIA: soc_common: provide single socket add/remove functionality Russell King - ARM Linux
2009-10-27 23:11 ` [RFC PATCH 03/10] PCMCIA: soc_common: push socket removal down to SoC specific support Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 04/10] PCMCIA: soc_common: push socket probe down into " Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 05/10] PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 06/10] PCMCIA: sa1111: remove duplicated initializers Russell King - ARM Linux
2009-10-27 23:12 ` [RFC PATCH 07/10] PCMCIA: soc_common: constify soc_pcmcia_socket ops member Russell King - ARM Linux
2009-10-27 23:13 ` [RFC PATCH 08/10] PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket Russell King - ARM Linux
2009-10-27 23:13 ` [RFC PATCH 09/10] PCMCIA: ss: allow PCI IRQs > 255 Russell King - ARM Linux
2009-10-27 23:13 ` [RFC PATCH 10/10] PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket Russell King - ARM Linux
2009-12-04 16:27 ` [PATCH] pcmcia: Fix additional platforms after removal of skt->irq in 66024db57d5b9011e274b314affad68f370c0d6f Jonathan Cameron
2009-12-04 16:31 ` Jonathan Cameron
2009-10-27 23:18 ` [RFC PATCH 00/10] PCMCIA soc_common re-factorization Russell King - ARM Linux
2009-10-27 23:21 ` Russell King - ARM Linux
2009-10-28 8:44 ` Wolfram Sang
2009-10-28 21:25 ` Dominik Brodowski
2009-10-29 17:25 ` Russell King - ARM Linux
2009-11-02 17:21 ` Dominik Brodowski
2009-12-04 17:18 ` [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module Jonathan Cameron
2009-12-04 17:24 ` Russell King - ARM Linux
2009-12-05 9:56 ` Dominik Brodowski
2009-12-05 10:28 ` Russell King - ARM Linux
2009-12-05 11:04 ` Dominik Brodowski
2009-12-05 11:29 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).