LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ARM: vexpress: register platform PATA device.
@ 2011-01-07 21:24 Nick Bowler
  2011-01-07 22:43 ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Bowler @ 2011-01-07 21:24 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel; +Cc: Russell King

The compactflash device on this platform is not usable simply because it
is never registered with the kernel.  Fix that up.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
 arch/arm/Kconfig             |    1 +
 arch/arm/mach-vexpress/v2m.c |   25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index d56d21c..ee61039 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -264,6 +264,7 @@ config ARCH_VEXPRESS
 	select HAVE_CLK
 	select ICST
 	select PLAT_VERSATILE
+	select HAVE_PATA_PLATFORM
 	help
 	  This enables support for the ARM Ltd Versatile Express boards.
 
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 7eaa232..89ec45c 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -7,6 +7,7 @@
 #include <linux/io.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/ata_platform.h>
 #include <linux/smsc911x.h>
 #include <linux/spinlock.h>
 #include <linux/sysdev.h>
@@ -238,6 +239,29 @@ static struct platform_device v2m_flash_device = {
 	.dev.platform_data = &v2m_flash_data,
 };
 
+static struct pata_platform_info v2m_pata_data = {
+	.ioport_shift	= 2,
+};
+
+static struct resource v2m_pata_resources[] = {
+	{
+		.start	= V2M_CF,
+		.end	= V2M_CF + 0xff,
+		.flags	= IORESOURCE_MEM,
+	}, {
+		.start	= V2M_CF + 0x100,
+		.end	= V2M_CF + SZ_4K - 1,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device v2m_cf_device = {
+	.name		= "pata_platform",
+	.id		= -1,
+	.resource       = v2m_pata_resources,
+	.num_resources  = ARRAY_SIZE(v2m_pata_resources),
+	.dev.platform_data = &v2m_pata_data,
+};
 
 static unsigned int v2m_mmci_status(struct device *dev)
 {
@@ -352,6 +376,7 @@ static int __init v2m_init(void)
 	platform_device_register(&v2m_pcie_i2c_device);
 	platform_device_register(&v2m_ddc_i2c_device);
 	platform_device_register(&v2m_flash_device);
+	platform_device_register(&v2m_cf_device);
 	platform_device_register(&v2m_eth_device);
 	platform_device_register(&v2m_usb_device);
 
-- 
1.7.2.2


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

* Re: [PATCH] ARM: vexpress: register platform PATA device.
  2011-01-07 21:24 [PATCH] ARM: vexpress: register platform PATA device Nick Bowler
@ 2011-01-07 22:43 ` Russell King - ARM Linux
  2011-01-08  2:32   ` [PATCH] pata_platform: Remove CONFIG_HAVE_PATA_PLATFORM's dependencies Nick Bowler
  2011-01-10 21:16   ` [PATCH] ARM: vexpress: register platform PATA device Nick Bowler
  0 siblings, 2 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-01-07 22:43 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-arm-kernel, linux-kernel

On Fri, Jan 07, 2011 at 04:24:05PM -0500, Nick Bowler wrote:
> The compactflash device on this platform is not usable simply because it
> is never registered with the kernel.  Fix that up.
> 
> Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
> ---
>  arch/arm/Kconfig             |    1 +
>  arch/arm/mach-vexpress/v2m.c |   25 +++++++++++++++++++++++++
>  2 files changed, 26 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index d56d21c..ee61039 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -264,6 +264,7 @@ config ARCH_VEXPRESS
>  	select HAVE_CLK
>  	select ICST
>  	select PLAT_VERSATILE
> +	select HAVE_PATA_PLATFORM

To avoid the Kconfig warning, this should be:

	select HAVE_PATA_PLATFORM if ATA

or it needs to be moved outside of the if ATA ... endif block in
drivers/ata/Kconfig.

Apart from that, I see nothing wrong.

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

* [PATCH] pata_platform: Remove CONFIG_HAVE_PATA_PLATFORM's dependencies.
  2011-01-07 22:43 ` Russell King - ARM Linux
@ 2011-01-08  2:32   ` Nick Bowler
  2011-01-10 21:16   ` [PATCH] ARM: vexpress: register platform PATA device Nick Bowler
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Bowler @ 2011-01-08  2:32 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Jeff Garzik, linux-kernel, linux-ide, linux-arm-kernel

From: Nick Bowler <nbowler@elliptictech.com>

CONFIG_HAVE_PATA_PLATFORM, by virtue of where its defined, has a
dependency on CONFG_ATA and CONFIG_ATA_SFF.  This causes Kconfig
warnings when it is selected by various architectures, such as

  warning: (ARCH_VEXPRESS && <choice> || ARCH_RPC && <choice> || MACH_VPAC270 && ARCH_PXA || MACH_REALVIEW_PB11MP && ARCH_REALVIEW || MACH_REALVIEW_PBA8 && ARCH_REALVIEW || MACH_REALVIEW_PBX && ARCH_REALVIEW || MACH_BAST_IDE && ARCH_S3C2410 || MACH_ANUBIS && ARCH_S3C2410) selects HAVE_PATA_PLATFORM which has unmet direct dependencies (ATA && ATA_SFF)

Since this option is only used to control visibility of the
CONFIG_PATA_PLATFORM option and isn't itself visible in the menu,
it is straightforward to simply remove these dependencies rather
than adjust all the architectures.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
---
 drivers/ata/Kconfig |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 36e2319..b15254f 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -2,6 +2,14 @@
 # SATA/PATA driver configuration
 #
 
+config HAVE_PATA_PLATFORM
+	bool
+	help
+	  This is an internal configuration node for any machine that
+	  uses pata-platform driver to enable the relevant driver in the
+	  configuration structure without having to submit endless patches
+	  to update the PATA_PLATFORM entry.
+
 menuconfig ATA
 	tristate "Serial ATA and Parallel ATA drivers"
 	depends on HAS_IOMEM
@@ -765,14 +773,6 @@ config PATA_PCMCIA
 
 	  If unsure, say N.
 
-config HAVE_PATA_PLATFORM
-	bool
-	help
-	  This is an internal configuration node for any machine that
-	  uses pata-platform driver to enable the relevant driver in the
-	  configuration structure without having to submit endless patches
-	  to update the PATA_PLATFORM entry.
-
 config PATA_PLATFORM
 	tristate "Generic platform device PATA support"
 	depends on EMBEDDED || PPC || HAVE_PATA_PLATFORM
-- 
1.7.2.2


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

* Re: [PATCH] ARM: vexpress: register platform PATA device.
  2011-01-07 22:43 ` Russell King - ARM Linux
  2011-01-08  2:32   ` [PATCH] pata_platform: Remove CONFIG_HAVE_PATA_PLATFORM's dependencies Nick Bowler
@ 2011-01-10 21:16   ` Nick Bowler
  2011-01-21 11:14     ` Russell King - ARM Linux
  1 sibling, 1 reply; 5+ messages in thread
From: Nick Bowler @ 2011-01-10 21:16 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-kernel

On 2011-01-07 22:43 +0000, Russell King - ARM Linux wrote:
> On Fri, Jan 07, 2011 at 04:24:05PM -0500, Nick Bowler wrote:
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index d56d21c..ee61039 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -264,6 +264,7 @@ config ARCH_VEXPRESS
> >  	select HAVE_CLK
> >  	select ICST
> >  	select PLAT_VERSATILE
> > +	select HAVE_PATA_PLATFORM
> 
> To avoid the Kconfig warning, this should be:
> 
> 	select HAVE_PATA_PLATFORM if ATA
> 
> or it needs to be moved outside of the if ATA ... endif block in
> drivers/ata/Kconfig.

The Kconfig dependency fix was merged into mainline today, so this patch
should no longer trigger the aforementioned warning.

-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)

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

* Re: [PATCH] ARM: vexpress: register platform PATA device.
  2011-01-10 21:16   ` [PATCH] ARM: vexpress: register platform PATA device Nick Bowler
@ 2011-01-21 11:14     ` Russell King - ARM Linux
  0 siblings, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2011-01-21 11:14 UTC (permalink / raw)
  To: Nick Bowler; +Cc: linux-arm-kernel, linux-kernel

On Mon, Jan 10, 2011 at 04:16:22PM -0500, Nick Bowler wrote:
> On 2011-01-07 22:43 +0000, Russell King - ARM Linux wrote:
> > On Fri, Jan 07, 2011 at 04:24:05PM -0500, Nick Bowler wrote:
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index d56d21c..ee61039 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -264,6 +264,7 @@ config ARCH_VEXPRESS
> > >  	select HAVE_CLK
> > >  	select ICST
> > >  	select PLAT_VERSATILE
> > > +	select HAVE_PATA_PLATFORM
> > 
> > To avoid the Kconfig warning, this should be:
> > 
> > 	select HAVE_PATA_PLATFORM if ATA
> > 
> > or it needs to be moved outside of the if ATA ... endif block in
> > drivers/ata/Kconfig.
> 
> The Kconfig dependency fix was merged into mainline today, so this patch
> should no longer trigger the aforementioned warning.

Ok, can you put it in the patch system please?

Thanks.

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

end of thread, other threads:[~2011-01-21 11:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07 21:24 [PATCH] ARM: vexpress: register platform PATA device Nick Bowler
2011-01-07 22:43 ` Russell King - ARM Linux
2011-01-08  2:32   ` [PATCH] pata_platform: Remove CONFIG_HAVE_PATA_PLATFORM's dependencies Nick Bowler
2011-01-10 21:16   ` [PATCH] ARM: vexpress: register platform PATA device Nick Bowler
2011-01-21 11:14     ` 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).