linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/2] pata-platform configuration changes / Remove bast-ide
@ 2008-06-16 11:16 Ben Dooks
  2008-06-16 11:16 ` [patch 1/2] LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver Ben Dooks
  2008-06-16 11:16 ` [patch 2/2] BAST: Remove old IDE driver Ben Dooks
  0 siblings, 2 replies; 7+ messages in thread
From: Ben Dooks @ 2008-06-16 11:16 UTC (permalink / raw)
  To: linux-ide; +Cc: jgarzik, bzolnier

With libata's pata-platform support being merged, look at removing
the old bast-ide driver as this can now be done by registering a
pair of platform devices in the relevant machine support file.

As an addition, introduct HAVE_PATA_PLATFORM to allow any platform
or machine that uses this support to define their use of this
without having to explicitly enable CONFIG_EMBEDDED or add numerous
enabling statements into drivers/ata/Kconfig.

For an example, this is the update that will happen to the relevant
Kconfig for the "Simtec Anubis" machine:

--- linux-2.6.26-rc3-quilt1.orig/arch/arm/mach-s3c2440/Kconfig
+++ linux-2.6.26-rc3-quilt1/arch/arm/mach-s3c2440/Kconfig
@@ -29,6 +29,7 @@ config MACH_ANUBIS
        bool "Simtec Electronics ANUBIS"
        select CPU_S3C2440
        select PM_SIMTEC if PM
+       select HAVE_PATA_PLATFORM
        help
          Say Y here if you are using the Simtec Electronics ANUBIS
          development system


These two patches do not update the PATA_PLATFORM to remove the
current 'depends on' lines as these require syncronisation with
the relevant maintainers, so I propose these be submitted once
the HAVE_PATA_PLATFORM is merged. This means the sequence is
merge the HAVE_PATA_PLATFORM Kconfig changes, then send the
updates to use it to each maintainer. Onces these are merged
it is then possible to remove the other 'depends on' items from
the Kconfig without damaging architecture or machine support.

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

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

* [patch 1/2] LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver
  2008-06-16 11:16 [patch 0/2] pata-platform configuration changes / Remove bast-ide Ben Dooks
@ 2008-06-16 11:16 ` Ben Dooks
  2008-06-19  0:30   ` Jeff Garzik
  2008-06-16 11:16 ` [patch 2/2] BAST: Remove old IDE driver Ben Dooks
  1 sibling, 1 reply; 7+ messages in thread
From: Ben Dooks @ 2008-06-16 11:16 UTC (permalink / raw)
  To: linux-ide; +Cc: jgarzik, bzolnier, Ben Dooks

[-- Attachment #1: simtec/libata-pata-kconfig.patch --]
[-- Type: text/plain, Size: 1288 bytes --]

Add HAVE_PATA_PLATFORM to select the pata platform driver
to ensure that we do not end up with a long 'depends on' list
when other users of this driver turn up.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

Index: linux-2.6.26-rc3-quilt1/drivers/ata/Kconfig
===================================================================
--- linux-2.6.26-rc3-quilt1.orig/drivers/ata/Kconfig	2008-05-19 23:04:01.000000000 +0100
+++ linux-2.6.26-rc3-quilt1/drivers/ata/Kconfig	2008-05-19 23:39:47.000000000 +0100
@@ -651,9 +651,17 @@ config PATA_WINBOND_VLB
 	  Support for the Winbond W83759A controller on Vesa Local Bus
 	  systems.
 
+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 || ARCH_RPC || PPC
+	depends on EMBEDDED || ARCH_RPC || PPC || HAVE_PATA_PLATFORM
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems.

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

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

* [patch 2/2] BAST: Remove old IDE driver
  2008-06-16 11:16 [patch 0/2] pata-platform configuration changes / Remove bast-ide Ben Dooks
  2008-06-16 11:16 ` [patch 1/2] LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver Ben Dooks
@ 2008-06-16 11:16 ` Ben Dooks
  2008-06-16 19:30   ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 7+ messages in thread
From: Ben Dooks @ 2008-06-16 11:16 UTC (permalink / raw)
  To: linux-ide; +Cc: jgarzik, bzolnier, Ben Dooks

[-- Attachment #1: simtec/simtec-drivers-ata-remove-bast-ide.patch --]
[-- Type: text/plain, Size: 3826 bytes --]

Remove the old BAST IDE driver, as we are now using the platform-pata
support.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

Index: linux-2.6.26-rc6-quilt1/drivers/ide/Kconfig
===================================================================
--- linux-2.6.26-rc6-quilt1.orig/drivers/ide/Kconfig	2008-06-16 11:54:50.000000000 +0100
+++ linux-2.6.26-rc6-quilt1/drivers/ide/Kconfig	2008-06-16 12:02:45.000000000 +0100
@@ -823,13 +823,6 @@ config BLK_DEV_IDE_RAPIDE
 	  Say Y here if you want to support the Yellowstone RapIDE controller
 	  manufactured for use with Acorn computers.
 
-config BLK_DEV_IDE_BAST
-	tristate "Simtec BAST / Thorcom VR1000 IDE support"
-	depends on ARM && (ARCH_BAST || MACH_VR1000)
-	help
-	  Say Y here if you want to support the onboard IDE channels on the
-	  Simtec BAST or the Thorcom VR1000
-
 config IDE_H8300
 	tristate "H8300 IDE support"
 	depends on H8300
Index: linux-2.6.26-rc6-quilt1/drivers/ide/arm/Makefile
===================================================================
--- linux-2.6.26-rc6-quilt1.orig/drivers/ide/arm/Makefile	2008-06-16 12:03:24.000000000 +0100
+++ linux-2.6.26-rc6-quilt1/drivers/ide/arm/Makefile	2008-06-16 12:03:27.000000000 +0100
@@ -1,7 +1,6 @@
 
 obj-$(CONFIG_BLK_DEV_IDE_ICSIDE)	+= icside.o
 obj-$(CONFIG_BLK_DEV_IDE_RAPIDE)	+= rapide.o
-obj-$(CONFIG_BLK_DEV_IDE_BAST)		+= bast-ide.o
 obj-$(CONFIG_BLK_DEV_PALMCHIP_BK3710)	+= palm_bk3710.o
 
 ifeq ($(CONFIG_IDE_ARM), m)
Index: linux-2.6.26-rc6-quilt1/drivers/ide/arm/bast-ide.c
===================================================================
--- linux-2.6.26-rc6-quilt1.orig/drivers/ide/arm/bast-ide.c	2008-06-16 12:03:14.000000000 +0100
+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2003-2004 Simtec Electronics
- *  Ben Dooks <ben@simtec.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
-*/
-
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/ide.h>
-#include <linux/init.h>
-
-#include <asm/mach-types.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/arch/map.h>
-#include <asm/arch/bast-map.h>
-#include <asm/arch/bast-irq.h>
-
-#define DRV_NAME "bast-ide"
-
-static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
-{
-	ide_hwif_t *hwif;
-	hw_regs_t hw;
-	int i;
-	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
-
-	memset(&hw, 0, sizeof(hw));
-
-	base += BAST_IDE_CS;
-	aux  += BAST_IDE_CS;
-
-	for (i = 0; i <= 7; i++) {
-		hw.io_ports_array[i] = (unsigned long)base;
-		base += 0x20;
-	}
-
-	hw.io_ports.ctl_addr = aux + (6 * 0x20);
-	hw.irq = irq;
-	hw.chipset = ide_generic;
-
-	hwif = ide_find_port();
-	if (hwif == NULL)
-		goto out;
-
-	i = hwif->index;
-
-	ide_init_port_data(hwif, i);
-	ide_init_port_hw(hwif, &hw);
-	hwif->port_ops = NULL;
-
-	idx[0] = i;
-
-	ide_device_add(idx, NULL);
-out:
-	return 0;
-}
-
-static int __init bastide_init(void)
-{
-	unsigned long base = BAST_VA_IDEPRI + BAST_IDE_CS;
-
-	/* we can treat the VR1000 and the BAST the same */
-
-	if (!(machine_is_bast() || machine_is_vr1000()))
-		return 0;
-
-	printk("BAST: IDE driver, (c) 2003-2004 Simtec Electronics\n");
-
-	if (!request_mem_region(base, 0x400000, DRV_NAME)) {
-		printk(KERN_ERR "%s: resources busy\n", DRV_NAME);
-		return -EBUSY;
-	}
-
-	bastide_register(BAST_VA_IDEPRI, BAST_VA_IDEPRIAUX, IRQ_IDE0);
-	bastide_register(BAST_VA_IDESEC, BAST_VA_IDESECAUX, IRQ_IDE1);
-
-	return 0;
-}
-
-module_init(bastide_init);
-
-MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Simtec BAST / Thorcom VR1000 IDE driver");

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

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

* Re: [patch 2/2] BAST: Remove old IDE driver
  2008-06-16 11:16 ` [patch 2/2] BAST: Remove old IDE driver Ben Dooks
@ 2008-06-16 19:30   ` Bartlomiej Zolnierkiewicz
  2008-06-18 11:41     ` Ben Dooks
  0 siblings, 1 reply; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-06-16 19:30 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-ide, jgarzik

On Monday 16 June 2008, Ben Dooks wrote:
> Remove the old BAST IDE driver, as we are now using the platform-pata
> support.
> 
> Signed-off-by: Ben Dooks <ben-linux@fluff.org>

ide_platform a.k.a. CONFIG_BLK_DEV_PLATFORM doesn't have "depends on"
limitation so I wonder if it is possible to use it "out-of-the-box" on
ANUBIS now?

[ so I could apply this patch without waiting for patch #1/2 ]

Thanks,
Bart

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

* Re: [patch 2/2] BAST: Remove old IDE driver
  2008-06-16 19:30   ` Bartlomiej Zolnierkiewicz
@ 2008-06-18 11:41     ` Ben Dooks
  2008-06-18 21:33       ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Dooks @ 2008-06-18 11:41 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Ben Dooks, linux-ide, jgarzik

On Mon, Jun 16, 2008 at 09:30:43PM +0200, Bartlomiej Zolnierkiewicz wrote:
> On Monday 16 June 2008, Ben Dooks wrote:
> > Remove the old BAST IDE driver, as we are now using the platform-pata
> > support.
> > 
> > Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> 
> ide_platform a.k.a. CONFIG_BLK_DEV_PLATFORM doesn't have "depends on"
> limitation so I wonder if it is possible to use it "out-of-the-box" on
> ANUBIS now?

I'll have a look.
 
> [ so I could apply this patch without waiting for patch #1/2 ]

I'd prefer to see the kconfig changes done, we're testing with libata
as the default, however it is _possible_ to select either with a bit
of pain. CONFIG_EMBEDDED isn't really what we want, but at least we get
a working system.

So, short answer, enqueue this, I'm sure we'll manage either way.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.


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

* Re: [patch 2/2] BAST: Remove old IDE driver
  2008-06-18 11:41     ` Ben Dooks
@ 2008-06-18 21:33       ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-06-18 21:33 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-ide, jgarzik

On Wednesday 18 June 2008, Ben Dooks wrote:
> On Mon, Jun 16, 2008 at 09:30:43PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Monday 16 June 2008, Ben Dooks wrote:
> > > Remove the old BAST IDE driver, as we are now using the platform-pata
> > > support.
> > > 
> > > Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> > 
> > ide_platform a.k.a. CONFIG_BLK_DEV_PLATFORM doesn't have "depends on"
> > limitation so I wonder if it is possible to use it "out-of-the-box" on
> > ANUBIS now?
> 
> I'll have a look.
>  
> > [ so I could apply this patch without waiting for patch #1/2 ]
> 
> I'd prefer to see the kconfig changes done, we're testing with libata
> as the default, however it is _possible_ to select either with a bit
> of pain. CONFIG_EMBEDDED isn't really what we want, but at least we get
> a working system.
> 
> So, short answer, enqueue this, I'm sure we'll manage either way.

ok, I applied it to IDE tree but will wait with pushing it to Linus until
patch #1/2 goes in (or there is some confirmation w.r.t. ide_platform)

Thanks,
Bart

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

* Re: [patch 1/2] LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver
  2008-06-16 11:16 ` [patch 1/2] LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver Ben Dooks
@ 2008-06-19  0:30   ` Jeff Garzik
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2008-06-19  0:30 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-ide, bzolnier

Ben Dooks wrote:
> Add HAVE_PATA_PLATFORM to select the pata platform driver
> to ensure that we do not end up with a long 'depends on' list
> when other users of this driver turn up.
> 
> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
> 
> Index: linux-2.6.26-rc3-quilt1/drivers/ata/Kconfig
> ===================================================================
> --- linux-2.6.26-rc3-quilt1.orig/drivers/ata/Kconfig	2008-05-19 23:04:01.000000000 +0100
> +++ linux-2.6.26-rc3-quilt1/drivers/ata/Kconfig	2008-05-19 23:39:47.000000000 +0100
> @@ -651,9 +651,17 @@ config PATA_WINBOND_VLB
>  	  Support for the Winbond W83759A controller on Vesa Local Bus
>  	  systems.
>  
> +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 || ARCH_RPC || PPC
> +	depends on EMBEDDED || ARCH_RPC || PPC || HAVE_PATA_PLATFORM
>  	help

applied



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

end of thread, other threads:[~2008-06-19  0:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-16 11:16 [patch 0/2] pata-platform configuration changes / Remove bast-ide Ben Dooks
2008-06-16 11:16 ` [patch 1/2] LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver Ben Dooks
2008-06-19  0:30   ` Jeff Garzik
2008-06-16 11:16 ` [patch 2/2] BAST: Remove old IDE driver Ben Dooks
2008-06-16 19:30   ` Bartlomiej Zolnierkiewicz
2008-06-18 11:41     ` Ben Dooks
2008-06-18 21:33       ` Bartlomiej Zolnierkiewicz

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).