public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PXA2xx: build PCMCIA as a module
@ 2006-01-04 21:16 Florin Malita
  2006-01-04 22:20 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Florin Malita @ 2006-01-04 21:16 UTC (permalink / raw)
  To: rpurdie; +Cc: rmk+lkml, linux-kernel

This patch adds support for building the PCMCIA driver for pxa2xx Sharp
platforms as a module:

1) platform_scoop_config is currently declared in pxa2xx_sharpsl.c but
referenced in the platform code - move the declaration in the platform
code so pxa2xx_sharpsl.c can be built as a module.
2) export soc_common_drv_pcmcia_remove which is referenced in
pxa2xx_base.c.

Please apply.

Signed-off-by: Florin Malita <fmalita@gmail.com>
--
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -45,6 +45,9 @@
 #include "generic.h"
 #include "sharpsl.h"
 
+/* PCMCIA to Scoop linkage */
+struct scoop_pcmcia_config *platform_scoop_config;
+EXPORT_SYMBOL(platform_scoop_config);
 
 /*
  * Corgi SCOOP Device
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -48,6 +48,10 @@
 #include "generic.h"
 #include "sharpsl.h"
 
+/* PCMCIA to Scoop linkage */
+struct scoop_pcmcia_config *platform_scoop_config;
+EXPORT_SYMBOL(platform_scoop_config);
+
 /*
  * Spitz SCOOP Device #1
  */
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -27,13 +27,6 @@
 
 #define	NO_KEEP_VS 0x0001
 
-/* PCMCIA to Scoop linkage
-
-   There is no easy way to link multiple scoop devices into one
-   single entity for the pxa2xx_pcmcia device so this structure
-   is used which is setup by the platform code
-*/
-struct scoop_pcmcia_config *platform_scoop_config;
 #define SCOOP_DEV platform_scoop_config->devs
 
 static void sharpsl_pcmcia_init_reset(struct scoop_pcmcia_dev *scoopdev)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -846,3 +846,5 @@ int soc_common_drv_pcmcia_remove(struct 
 
 	return 0;
 }
+
+EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PXA2xx: build PCMCIA as a module
  2006-01-04 21:16 [PATCH] PXA2xx: build PCMCIA as a module Florin Malita
@ 2006-01-04 22:20 ` Richard Purdie
  2006-01-05  0:12   ` Florin Malita
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2006-01-04 22:20 UTC (permalink / raw)
  To: Florin Malita; +Cc: rmk+lkml, linux-kernel

On Wed, 2006-01-04 at 16:16 -0500, Florin Malita wrote: 
> This patch adds support for building the PCMCIA driver for pxa2xx Sharp
> platforms as a module:
> 
> 1) platform_scoop_config is currently declared in pxa2xx_sharpsl.c but
> referenced in the platform code - move the declaration in the platform
> code so pxa2xx_sharpsl.c can be built as a module.
> 2) export soc_common_drv_pcmcia_remove which is referenced in
> pxa2xx_base.c.
> 
> Please apply.
> 
> Signed-off-by: Florin Malita <fmalita@gmail.com>

NAK. This breaks poodle, tosa and collie who also use scoop and this
pcmcia driver. I'd suggest moving scoop_pcmcia_config to
arch/arm/common/scoop.c instead. Whilst this means scoop can't be a
module, the hardware isn't going to do much without it so I have no
objection to that.

Richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PXA2xx: build PCMCIA as a module
  2006-01-04 22:20 ` Richard Purdie
@ 2006-01-05  0:12   ` Florin Malita
  2006-01-05 14:17     ` Florin Malita
  0 siblings, 1 reply; 5+ messages in thread
From: Florin Malita @ 2006-01-05  0:12 UTC (permalink / raw)
  To: Richard Purdie; +Cc: rmk+lkml, linux-kernel

On Wed, 2006-01-04 at 22:20 +0000, Richard Purdie wrote:
> NAK. This breaks poodle, tosa and collie who also use scoop and this
> pcmcia driver. I'd suggest moving scoop_pcmcia_config to
> arch/arm/common/scoop.c instead.

Breaking collies is not exactly at the top of my todo list :)

So how about this then:

Signed-off-by: Florin Malita <fmalita@gmail.com>
--
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -19,6 +19,10 @@
 
 #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
 
+/* PCMCIA to Scoop linkage */
+struct scoop_pcmcia_config *platform_scoop_config;
+EXPORT_SYMBOL(platform_scoop_config);
+
 struct  scoop_dev {
 	void  *base;
 	spinlock_t scoop_lock;
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -27,13 +27,6 @@
 
 #define	NO_KEEP_VS 0x0001
 
-/* PCMCIA to Scoop linkage
-
-   There is no easy way to link multiple scoop devices into one
-   single entity for the pxa2xx_pcmcia device so this structure
-   is used which is setup by the platform code
-*/
-struct scoop_pcmcia_config *platform_scoop_config;
 #define SCOOP_DEV platform_scoop_config->devs
 
 static void sharpsl_pcmcia_init_reset(struct scoop_pcmcia_dev *scoopdev)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -846,3 +846,4 @@ int soc_common_drv_pcmcia_remove(struct 
 
 	return 0;
 }
+EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PXA2xx: build PCMCIA as a module
  2006-01-05  0:12   ` Florin Malita
@ 2006-01-05 14:17     ` Florin Malita
  2006-01-05 15:52       ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Florin Malita @ 2006-01-05 14:17 UTC (permalink / raw)
  To: Richard Purdie; +Cc: rmk+lkml, linux-kernel

> On Wed, 2006-01-04 at 22:20 +0000, Richard Purdie wrote:
> > NAK. This breaks poodle, tosa and collie who also use scoop and this
> > pcmcia driver. I'd suggest moving scoop_pcmcia_config to
> > arch/arm/common/scoop.c instead.

Here's a version with the modified comment following your suggestion.

Thanks,
Florin

Signed-off-by: Florin Malita <fmalita@gmail.com>
--
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -19,6 +19,16 @@
 
 #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
 
+/* PCMCIA to Scoop linkage
+
+   There is no easy way to link multiple scoop devices into one
+   single entity for the pxa2xx_pcmcia device so this structure
+   is used which is setup by the platform code and used by the
+   pcmcia driver.
+*/
+struct scoop_pcmcia_config *platform_scoop_config;
+EXPORT_SYMBOL(platform_scoop_config);
+
 struct  scoop_dev {
 	void  *base;
 	spinlock_t scoop_lock;
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -27,13 +27,6 @@
 
 #define	NO_KEEP_VS 0x0001
 
-/* PCMCIA to Scoop linkage
-
-   There is no easy way to link multiple scoop devices into one
-   single entity for the pxa2xx_pcmcia device so this structure
-   is used which is setup by the platform code
-*/
-struct scoop_pcmcia_config *platform_scoop_config;
 #define SCOOP_DEV platform_scoop_config->devs
 
 static void sharpsl_pcmcia_init_reset(struct scoop_pcmcia_dev *scoopdev)
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -846,3 +846,4 @@ int soc_common_drv_pcmcia_remove(struct 
 
 	return 0;
 }
+EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PXA2xx: build PCMCIA as a module
  2006-01-05 14:17     ` Florin Malita
@ 2006-01-05 15:52       ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2006-01-05 15:52 UTC (permalink / raw)
  To: Florin Malita, rmk+lkml, linux-kernel

On Thu, 2006-01-05 at 09:17 -0500, Florin Malita wrote:
> > On Wed, 2006-01-04 at 22:20 +0000, Richard Purdie wrote:
> > > NAK. This breaks poodle, tosa and collie who also use scoop and this
> > > pcmcia driver. I'd suggest moving scoop_pcmcia_config to
> > > arch/arm/common/scoop.c instead.
> 
> Here's a version with the modified comment following your suggestion.
> 
> Thanks,
> Florin
> 
> Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
> --
> diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
> --- a/arch/arm/common/scoop.c
> +++ b/arch/arm/common/scoop.c
> @@ -19,6 +19,16 @@
>  
>  #define SCOOP_REG(d,adr) (*(volatile unsigned short*)(d +(adr)))
>  
> +/* PCMCIA to Scoop linkage
> +
> +   There is no easy way to link multiple scoop devices into one
> +   single entity for the pxa2xx_pcmcia device so this structure
> +   is used which is setup by the platform code and used by the
> +   pcmcia driver.
> +*/
> +struct scoop_pcmcia_config *platform_scoop_config;
> +EXPORT_SYMBOL(platform_scoop_config);
> +
>  struct  scoop_dev {
>  	void  *base;
>  	spinlock_t scoop_lock;
> diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
> --- a/drivers/pcmcia/pxa2xx_sharpsl.c
> +++ b/drivers/pcmcia/pxa2xx_sharpsl.c
> @@ -27,13 +27,6 @@
>  
>  #define	NO_KEEP_VS 0x0001
>  
> -/* PCMCIA to Scoop linkage
> -
> -   There is no easy way to link multiple scoop devices into one
> -   single entity for the pxa2xx_pcmcia device so this structure
> -   is used which is setup by the platform code
> -*/
> -struct scoop_pcmcia_config *platform_scoop_config;
>  #define SCOOP_DEV platform_scoop_config->devs
>  
>  static void sharpsl_pcmcia_init_reset(struct scoop_pcmcia_dev *scoopdev)
> diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
> --- a/drivers/pcmcia/soc_common.c
> +++ b/drivers/pcmcia/soc_common.c
> @@ -846,3 +846,4 @@ int soc_common_drv_pcmcia_remove(struct 
>  
>  	return 0;
>  }
> +EXPORT_SYMBOL(soc_common_drv_pcmcia_remove);
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-05 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04 21:16 [PATCH] PXA2xx: build PCMCIA as a module Florin Malita
2006-01-04 22:20 ` Richard Purdie
2006-01-05  0:12   ` Florin Malita
2006-01-05 14:17     ` Florin Malita
2006-01-05 15:52       ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox