From: jic23@cam.ac.uk (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module
Date: Fri, 04 Dec 2009 17:18:16 +0000 [thread overview]
Message-ID: <4B194458.6040403@cam.ac.uk> (raw)
In-Reply-To: <925a8da0d92cdf1f37aaef988fcc63bf9744576e.1256684685.git.rmk+kernel@arm.linux.org.uk>
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");
next prev parent reply other threads:[~2009-12-04 17:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jonathan Cameron [this message]
2009-12-04 17:24 ` [RFC PATCH 01/10] PCMCIA: soc_common: convert to a stand alone module 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
-- strict thread matches above, loose matches on Subject: below --
2009-10-04 15:08 Russell King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B194458.6040403@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.