All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] OF-platform PATA driver
@ 2007-12-04 17:04 ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:04 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Paul Mundt, Arnd Bergmann, Sergei Shtylyov, Olof Johansson,
	Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

Hi all,

Here is the second version of the OF-platform PATA driver and
related patches.


Arnd, the first patch has been changed, so technically it lost your
Acked-by.

- - -
Changes since v1:
- __pata_platform_probe now accepts pio_mask argument;
- pata-platform compatible property renamed to ata-generic;
- pata_of_platform understands pio-mode property. It's used to pass
  pio_mask to the __pata_platform_probe. That is, in ata-generic
  context pio-mode means "pio mode the bus already configured for";
- New optional patch that renames pata_platform_info's
  ioport_shift to reg_shift.


Changes since RFC:
- nuked drivers/ata/pata_platform.h;
- powerpc bits: proper localbus node added.

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

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

* [PATCH v2 0/4] OF-platform PATA driver
@ 2007-12-04 17:04 ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:04 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Jeff Garzik, Arnd Bergmann, Paul Mundt, Olof Johansson

Hi all,

Here is the second version of the OF-platform PATA driver and
related patches.


Arnd, the first patch has been changed, so technically it lost your
Acked-by.

- - -
Changes since v1:
- __pata_platform_probe now accepts pio_mask argument;
- pata-platform compatible property renamed to ata-generic;
- pata_of_platform understands pio-mode property. It's used to pass
  pio_mask to the __pata_platform_probe. That is, in ata-generic
  context pio-mode means "pio mode the bus already configured for";
- New optional patch that renames pata_platform_info's
  ioport_shift to reg_shift.


Changes since RFC:
- nuked drivers/ata/pata_platform.h;
- powerpc bits: proper localbus node added.

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

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

* [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral
  2007-12-04 17:04 ` Anton Vorontsov
@ 2007-12-04 17:06   ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:06 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Paul Mundt, Arnd Bergmann, Sergei Shtylyov, Olof Johansson,
	Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

Split pata_platform_{probe,remove} into two pieces:
1. pata_platform_{probe,remove} -- platform_device-dependant bits;
2. __ptata_platform_{probe,remove} -- device type neutral bits.

This is done to not duplicate code for the OF-platform driver.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/pata_platform.c   |  143 ++++++++++++++++++++++++-----------------
 include/linux/pata_platform.h |    9 +++
 2 files changed, 94 insertions(+), 58 deletions(-)

diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index ac03a90..d4cb231 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -93,14 +93,9 @@ static struct ata_port_operations pata_platform_port_ops = {
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
-				     struct pata_platform_info *info)
+				     unsigned int shift)
 {
-	unsigned int shift = 0;
-
 	/* Fixup the port shift for platforms that need it */
-	if (info && info->ioport_shift)
-		shift = info->ioport_shift;
-
 	ioaddr->data_addr	= ioaddr->cmd_addr + (ATA_REG_DATA    << shift);
 	ioaddr->error_addr	= ioaddr->cmd_addr + (ATA_REG_ERR     << shift);
 	ioaddr->feature_addr	= ioaddr->cmd_addr + (ATA_REG_FEATURE << shift);
@@ -114,8 +109,12 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
 }
 
 /**
- *	pata_platform_probe		-	attach a platform interface
- *	@pdev: platform device
+ *	__pata_platform_probe		-	attach a platform interface
+ *	@dev: device
+ *	@io_res: Resource representing I/O base
+ *	@ctl_res: Resource representing CTL base
+ *	@irq_res: Resource representing IRQ and its flags
+ *	@ioport_shift: I/O port shift
  *
  *	Register a platform bus IDE interface. Such interfaces are PIO and we
  *	assume do not support IRQ sharing.
@@ -135,42 +134,18 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
  *
  *	If no IRQ resource is present, PIO polling mode is used instead.
  */
-static int __devinit pata_platform_probe(struct platform_device *pdev)
+int __devinit __pata_platform_probe(struct device *dev,
+				    struct resource *io_res,
+				    struct resource *ctl_res,
+				    struct resource *irq_res,
+				    unsigned int ioport_shift,
+				    int __pio_mask)
 {
-	struct resource *io_res, *ctl_res;
 	struct ata_host *host;
 	struct ata_port *ap;
-	struct pata_platform_info *pp_info;
 	unsigned int mmio;
-	int irq;
-
-	/*
-	 * Simple resource validation ..
-	 */
-	if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
-		dev_err(&pdev->dev, "invalid number of resources\n");
-		return -EINVAL;
-	}
-
-	/*
-	 * Get the I/O base first
-	 */
-	io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
-	if (io_res == NULL) {
-		io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-		if (unlikely(io_res == NULL))
-			return -EINVAL;
-	}
-
-	/*
-	 * Then the CTL base
-	 */
-	ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
-	if (ctl_res == NULL) {
-		ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-		if (unlikely(ctl_res == NULL))
-			return -EINVAL;
-	}
+	int irq = 0;
+	int irq_flags = 0;
 
 	/*
 	 * Check for MMIO
@@ -181,20 +156,21 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 	/*
 	 * And the IRQ
 	 */
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
-		irq = 0;	/* no irq */
+	if (irq_res && irq_res->start > 0) {
+		irq = irq_res->start;
+		irq_flags = irq_res->flags;
+	}
 
 	/*
 	 * Now that that's out of the way, wire up the port..
 	 */
-	host = ata_host_alloc(&pdev->dev, 1);
+	host = ata_host_alloc(dev, 1);
 	if (!host)
 		return -ENOMEM;
 	ap = host->ports[0];
 
 	ap->ops = &pata_platform_port_ops;
-	ap->pio_mask = pio_mask;
+	ap->pio_mask = __pio_mask;
 	ap->flags |= ATA_FLAG_SLAVE_POSS;
 
 	/*
@@ -209,25 +185,24 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 	 * Handle the MMIO case
 	 */
 	if (mmio) {
-		ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, io_res->start,
+		ap->ioaddr.cmd_addr = devm_ioremap(dev, io_res->start,
 				io_res->end - io_res->start + 1);
-		ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, ctl_res->start,
+		ap->ioaddr.ctl_addr = devm_ioremap(dev, ctl_res->start,
 				ctl_res->end - ctl_res->start + 1);
 	} else {
-		ap->ioaddr.cmd_addr = devm_ioport_map(&pdev->dev, io_res->start,
+		ap->ioaddr.cmd_addr = devm_ioport_map(dev, io_res->start,
 				io_res->end - io_res->start + 1);
-		ap->ioaddr.ctl_addr = devm_ioport_map(&pdev->dev, ctl_res->start,
+		ap->ioaddr.ctl_addr = devm_ioport_map(dev, ctl_res->start,
 				ctl_res->end - ctl_res->start + 1);
 	}
 	if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) {
-		dev_err(&pdev->dev, "failed to map IO/CTL base\n");
+		dev_err(dev, "failed to map IO/CTL base\n");
 		return -ENOMEM;
 	}
 
 	ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
 
-	pp_info = pdev->dev.platform_data;
-	pata_platform_setup_port(&ap->ioaddr, pp_info);
+	pata_platform_setup_port(&ap->ioaddr, ioport_shift);
 
 	ata_port_desc(ap, "%s cmd 0x%llx ctl 0x%llx", mmio ? "mmio" : "ioport",
 		      (unsigned long long)io_res->start,
@@ -235,26 +210,78 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 
 	/* activate */
 	return ata_host_activate(host, irq, irq ? ata_interrupt : NULL,
-				 pp_info ? pp_info->irq_flags : 0,
-				 &pata_platform_sht);
+				 irq_flags, &pata_platform_sht);
 }
+EXPORT_SYMBOL_GPL(__pata_platform_probe);
 
 /**
- *	pata_platform_remove	-	unplug a platform interface
- *	@pdev: platform device
+ *	__pata_platform_remove		-	unplug a platform interface
+ *	@dev: device
  *
  *	A platform bus ATA device has been unplugged. Perform the needed
  *	cleanup. Also called on module unload for any active devices.
  */
-static int __devexit pata_platform_remove(struct platform_device *pdev)
+int __devexit __pata_platform_remove(struct device *dev)
 {
-	struct device *dev = &pdev->dev;
 	struct ata_host *host = dev_get_drvdata(dev);
 
 	ata_host_detach(host);
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(__pata_platform_remove);
+
+static int __devinit pata_platform_probe(struct platform_device *pdev)
+{
+	struct resource *io_res;
+	struct resource *ctl_res;
+	struct resource *irq_res;
+	struct pata_platform_info *pp_info = pdev->dev.platform_data;
+
+	/*
+	 * Simple resource validation ..
+	 */
+	if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
+		dev_err(&pdev->dev, "invalid number of resources\n");
+		return -EINVAL;
+	}
+
+	/*
+	 * Get the I/O base first
+	 */
+	io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+	if (io_res == NULL) {
+		io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+		if (unlikely(io_res == NULL))
+			return -EINVAL;
+	}
+
+	/*
+	 * Then the CTL base
+	 */
+	ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
+	if (ctl_res == NULL) {
+		ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+		if (unlikely(ctl_res == NULL))
+			return -EINVAL;
+	}
+
+	/*
+	 * And the IRQ
+	 */
+	irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+	if (irq_res)
+		irq_res->flags = pp_info ? pp_info->irq_flags : 0;
+
+	return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
+				     pp_info ? pp_info->ioport_shift : 0,
+				     pio_mask);
+}
+
+static int __devexit pata_platform_remove(struct platform_device *pdev)
+{
+	return __pata_platform_remove(&pdev->dev);
+}
 
 static struct platform_driver pata_platform_driver = {
 	.probe		= pata_platform_probe,
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h
index 5799e8d..6a7a92d 100644
--- a/include/linux/pata_platform.h
+++ b/include/linux/pata_platform.h
@@ -15,4 +15,13 @@ struct pata_platform_info {
 	unsigned int irq_flags;
 };
 
+extern int __devinit __pata_platform_probe(struct device *dev,
+					   struct resource *io_res,
+					   struct resource *ctl_res,
+					   struct resource *irq_res,
+					   unsigned int ioport_shift,
+					   int __pio_mask);
+
+extern int __devexit __pata_platform_remove(struct device *dev);
+
 #endif /* __LINUX_PATA_PLATFORM_H */
-- 
1.5.2.2


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

* [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral
@ 2007-12-04 17:06   ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:06 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Jeff Garzik, Arnd Bergmann, Paul Mundt, Olof Johansson

Split pata_platform_{probe,remove} into two pieces:
1. pata_platform_{probe,remove} -- platform_device-dependant bits;
2. __ptata_platform_{probe,remove} -- device type neutral bits.

This is done to not duplicate code for the OF-platform driver.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/pata_platform.c   |  143 ++++++++++++++++++++++++-----------------
 include/linux/pata_platform.h |    9 +++
 2 files changed, 94 insertions(+), 58 deletions(-)

diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index ac03a90..d4cb231 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -93,14 +93,9 @@ static struct ata_port_operations pata_platform_port_ops = {
 };
 
 static void pata_platform_setup_port(struct ata_ioports *ioaddr,
-				     struct pata_platform_info *info)
+				     unsigned int shift)
 {
-	unsigned int shift = 0;
-
 	/* Fixup the port shift for platforms that need it */
-	if (info && info->ioport_shift)
-		shift = info->ioport_shift;
-
 	ioaddr->data_addr	= ioaddr->cmd_addr + (ATA_REG_DATA    << shift);
 	ioaddr->error_addr	= ioaddr->cmd_addr + (ATA_REG_ERR     << shift);
 	ioaddr->feature_addr	= ioaddr->cmd_addr + (ATA_REG_FEATURE << shift);
@@ -114,8 +109,12 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
 }
 
 /**
- *	pata_platform_probe		-	attach a platform interface
- *	@pdev: platform device
+ *	__pata_platform_probe		-	attach a platform interface
+ *	@dev: device
+ *	@io_res: Resource representing I/O base
+ *	@ctl_res: Resource representing CTL base
+ *	@irq_res: Resource representing IRQ and its flags
+ *	@ioport_shift: I/O port shift
  *
  *	Register a platform bus IDE interface. Such interfaces are PIO and we
  *	assume do not support IRQ sharing.
@@ -135,42 +134,18 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
  *
  *	If no IRQ resource is present, PIO polling mode is used instead.
  */
-static int __devinit pata_platform_probe(struct platform_device *pdev)
+int __devinit __pata_platform_probe(struct device *dev,
+				    struct resource *io_res,
+				    struct resource *ctl_res,
+				    struct resource *irq_res,
+				    unsigned int ioport_shift,
+				    int __pio_mask)
 {
-	struct resource *io_res, *ctl_res;
 	struct ata_host *host;
 	struct ata_port *ap;
-	struct pata_platform_info *pp_info;
 	unsigned int mmio;
-	int irq;
-
-	/*
-	 * Simple resource validation ..
-	 */
-	if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
-		dev_err(&pdev->dev, "invalid number of resources\n");
-		return -EINVAL;
-	}
-
-	/*
-	 * Get the I/O base first
-	 */
-	io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
-	if (io_res == NULL) {
-		io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-		if (unlikely(io_res == NULL))
-			return -EINVAL;
-	}
-
-	/*
-	 * Then the CTL base
-	 */
-	ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
-	if (ctl_res == NULL) {
-		ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-		if (unlikely(ctl_res == NULL))
-			return -EINVAL;
-	}
+	int irq = 0;
+	int irq_flags = 0;
 
 	/*
 	 * Check for MMIO
@@ -181,20 +156,21 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 	/*
 	 * And the IRQ
 	 */
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
-		irq = 0;	/* no irq */
+	if (irq_res && irq_res->start > 0) {
+		irq = irq_res->start;
+		irq_flags = irq_res->flags;
+	}
 
 	/*
 	 * Now that that's out of the way, wire up the port..
 	 */
-	host = ata_host_alloc(&pdev->dev, 1);
+	host = ata_host_alloc(dev, 1);
 	if (!host)
 		return -ENOMEM;
 	ap = host->ports[0];
 
 	ap->ops = &pata_platform_port_ops;
-	ap->pio_mask = pio_mask;
+	ap->pio_mask = __pio_mask;
 	ap->flags |= ATA_FLAG_SLAVE_POSS;
 
 	/*
@@ -209,25 +185,24 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 	 * Handle the MMIO case
 	 */
 	if (mmio) {
-		ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, io_res->start,
+		ap->ioaddr.cmd_addr = devm_ioremap(dev, io_res->start,
 				io_res->end - io_res->start + 1);
-		ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, ctl_res->start,
+		ap->ioaddr.ctl_addr = devm_ioremap(dev, ctl_res->start,
 				ctl_res->end - ctl_res->start + 1);
 	} else {
-		ap->ioaddr.cmd_addr = devm_ioport_map(&pdev->dev, io_res->start,
+		ap->ioaddr.cmd_addr = devm_ioport_map(dev, io_res->start,
 				io_res->end - io_res->start + 1);
-		ap->ioaddr.ctl_addr = devm_ioport_map(&pdev->dev, ctl_res->start,
+		ap->ioaddr.ctl_addr = devm_ioport_map(dev, ctl_res->start,
 				ctl_res->end - ctl_res->start + 1);
 	}
 	if (!ap->ioaddr.cmd_addr || !ap->ioaddr.ctl_addr) {
-		dev_err(&pdev->dev, "failed to map IO/CTL base\n");
+		dev_err(dev, "failed to map IO/CTL base\n");
 		return -ENOMEM;
 	}
 
 	ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
 
-	pp_info = pdev->dev.platform_data;
-	pata_platform_setup_port(&ap->ioaddr, pp_info);
+	pata_platform_setup_port(&ap->ioaddr, ioport_shift);
 
 	ata_port_desc(ap, "%s cmd 0x%llx ctl 0x%llx", mmio ? "mmio" : "ioport",
 		      (unsigned long long)io_res->start,
@@ -235,26 +210,78 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 
 	/* activate */
 	return ata_host_activate(host, irq, irq ? ata_interrupt : NULL,
-				 pp_info ? pp_info->irq_flags : 0,
-				 &pata_platform_sht);
+				 irq_flags, &pata_platform_sht);
 }
+EXPORT_SYMBOL_GPL(__pata_platform_probe);
 
 /**
- *	pata_platform_remove	-	unplug a platform interface
- *	@pdev: platform device
+ *	__pata_platform_remove		-	unplug a platform interface
+ *	@dev: device
  *
  *	A platform bus ATA device has been unplugged. Perform the needed
  *	cleanup. Also called on module unload for any active devices.
  */
-static int __devexit pata_platform_remove(struct platform_device *pdev)
+int __devexit __pata_platform_remove(struct device *dev)
 {
-	struct device *dev = &pdev->dev;
 	struct ata_host *host = dev_get_drvdata(dev);
 
 	ata_host_detach(host);
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(__pata_platform_remove);
+
+static int __devinit pata_platform_probe(struct platform_device *pdev)
+{
+	struct resource *io_res;
+	struct resource *ctl_res;
+	struct resource *irq_res;
+	struct pata_platform_info *pp_info = pdev->dev.platform_data;
+
+	/*
+	 * Simple resource validation ..
+	 */
+	if ((pdev->num_resources != 3) && (pdev->num_resources != 2)) {
+		dev_err(&pdev->dev, "invalid number of resources\n");
+		return -EINVAL;
+	}
+
+	/*
+	 * Get the I/O base first
+	 */
+	io_res = platform_get_resource(pdev, IORESOURCE_IO, 0);
+	if (io_res == NULL) {
+		io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+		if (unlikely(io_res == NULL))
+			return -EINVAL;
+	}
+
+	/*
+	 * Then the CTL base
+	 */
+	ctl_res = platform_get_resource(pdev, IORESOURCE_IO, 1);
+	if (ctl_res == NULL) {
+		ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+		if (unlikely(ctl_res == NULL))
+			return -EINVAL;
+	}
+
+	/*
+	 * And the IRQ
+	 */
+	irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+	if (irq_res)
+		irq_res->flags = pp_info ? pp_info->irq_flags : 0;
+
+	return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
+				     pp_info ? pp_info->ioport_shift : 0,
+				     pio_mask);
+}
+
+static int __devexit pata_platform_remove(struct platform_device *pdev)
+{
+	return __pata_platform_remove(&pdev->dev);
+}
 
 static struct platform_driver pata_platform_driver = {
 	.probe		= pata_platform_probe,
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h
index 5799e8d..6a7a92d 100644
--- a/include/linux/pata_platform.h
+++ b/include/linux/pata_platform.h
@@ -15,4 +15,13 @@ struct pata_platform_info {
 	unsigned int irq_flags;
 };
 
+extern int __devinit __pata_platform_probe(struct device *dev,
+					   struct resource *io_res,
+					   struct resource *ctl_res,
+					   struct resource *irq_res,
+					   unsigned int ioport_shift,
+					   int __pio_mask);
+
+extern int __devexit __pata_platform_remove(struct device *dev);
+
 #endif /* __LINUX_PATA_PLATFORM_H */
-- 
1.5.2.2

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

* [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 17:04 ` Anton Vorontsov
@ 2007-12-04 17:07   ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:07 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Paul Mundt, Arnd Bergmann, Sergei Shtylyov, Olof Johansson,
	Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

This driver nicely wraps around pata_platform library functions,
and provides OF platform bus bindings to the PATA devices.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/Kconfig            |   10 ++++
 drivers/ata/Makefile           |    1 +
 drivers/ata/pata_of_platform.c |  102 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100644 drivers/ata/pata_of_platform.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ba63619..5a492fa 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -614,6 +614,16 @@ config PATA_PLATFORM
 
 	  If unsure, say N.
 
+config PATA_OF_PLATFORM
+	tristate "OpenFirmware platform device PATA support"
+	depends on PATA_PLATFORM && PPC_OF
+	help
+	  This option enables support for generic directly connected ATA
+	  devices commonly found on embedded systems with OpenFirmware
+	  bindings.
+
+	  If unsure, say N.
+
 config PATA_ICSIDE
 	tristate "Acorn ICS PATA support"
 	depends on ARM && ARCH_ACORN
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index b13feb2..ebcee64 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF)	+= pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
+obj-$(CONFIG_PATA_OF_PLATFORM)	+= pata_of_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
new file mode 100644
index 0000000..738f9e0
--- /dev/null
+++ b/drivers/ata/pata_of_platform.c
@@ -0,0 +1,102 @@
+/*
+ * OF-platform PATA driver
+ *
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ *                     Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/pata_platform.h>
+
+static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+					    const struct of_device_id *match)
+{
+	int ret;
+	struct device_node *dn = ofdev->node;
+	struct resource io_res;
+	struct resource ctl_res;
+	struct resource irq_res;
+	unsigned int reg_shift = 0;
+	int pio_mode = 0;
+	int pio_mask;
+	const u32 *prop;
+
+	ret = of_address_to_resource(dn, 0, &io_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get IO address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_irq_to_resource(dn, 0, &irq_res);
+	if (ret == NO_IRQ)
+		irq_res.start = irq_res.end = -1;
+	else
+		irq_res.flags = 0;
+
+	prop = (u32 *)of_get_property(dn, "reg-shift", NULL);
+	if (prop)
+		reg_shift = *prop;
+
+	prop = (u32 *)of_get_property(dn, "pio-mode", NULL);
+	if (prop) {
+		pio_mode = *prop;
+		if (pio_mode > 6) {
+			dev_err(&ofdev->dev, "invalid pio-mode\n");
+			return -EINVAL;
+		}
+	} else {
+		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
+	}
+
+	pio_mask = 1 << pio_mode;
+	pio_mask |= (1 << pio_mode) - 1;
+
+	return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
+				     reg_shift, pio_mask);
+}
+
+static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+{
+	return __pata_platform_remove(&ofdev->dev);
+}
+
+static struct of_device_id pata_of_platform_match[] = {
+	{ .compatible = "ata-generic", },
+};
+
+static struct of_platform_driver pata_of_platform_driver = {
+	.name		= "pata_of_platform",
+	.match_table	= pata_of_platform_match,
+	.probe		= pata_of_platform_probe,
+	.remove		= __devexit_p(pata_of_platform_remove),
+};
+
+static int __init pata_of_platform_init(void)
+{
+	return of_register_platform_driver(&pata_of_platform_driver);
+}
+module_init(pata_of_platform_init);
+
+static void __exit pata_of_platform_exit(void)
+{
+	of_unregister_platform_driver(&pata_of_platform_driver);
+}
+module_exit(pata_of_platform_exit);
+
+MODULE_DESCRIPTION("OF-platform PATA driver");
+MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
+MODULE_LICENSE("GPL");
-- 
1.5.2.2


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

* [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-04 17:07   ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:07 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Jeff Garzik, Arnd Bergmann, Paul Mundt, Olof Johansson

This driver nicely wraps around pata_platform library functions,
and provides OF platform bus bindings to the PATA devices.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/Kconfig            |   10 ++++
 drivers/ata/Makefile           |    1 +
 drivers/ata/pata_of_platform.c |  102 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 113 insertions(+), 0 deletions(-)
 create mode 100644 drivers/ata/pata_of_platform.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ba63619..5a492fa 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -614,6 +614,16 @@ config PATA_PLATFORM
 
 	  If unsure, say N.
 
+config PATA_OF_PLATFORM
+	tristate "OpenFirmware platform device PATA support"
+	depends on PATA_PLATFORM && PPC_OF
+	help
+	  This option enables support for generic directly connected ATA
+	  devices commonly found on embedded systems with OpenFirmware
+	  bindings.
+
+	  If unsure, say N.
+
 config PATA_ICSIDE
 	tristate "Acorn ICS PATA support"
 	depends on ARM && ARCH_ACORN
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index b13feb2..ebcee64 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF)	+= pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
+obj-$(CONFIG_PATA_OF_PLATFORM)	+= pata_of_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
new file mode 100644
index 0000000..738f9e0
--- /dev/null
+++ b/drivers/ata/pata_of_platform.c
@@ -0,0 +1,102 @@
+/*
+ * OF-platform PATA driver
+ *
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ *                     Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/pata_platform.h>
+
+static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+					    const struct of_device_id *match)
+{
+	int ret;
+	struct device_node *dn = ofdev->node;
+	struct resource io_res;
+	struct resource ctl_res;
+	struct resource irq_res;
+	unsigned int reg_shift = 0;
+	int pio_mode = 0;
+	int pio_mask;
+	const u32 *prop;
+
+	ret = of_address_to_resource(dn, 0, &io_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get IO address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_irq_to_resource(dn, 0, &irq_res);
+	if (ret == NO_IRQ)
+		irq_res.start = irq_res.end = -1;
+	else
+		irq_res.flags = 0;
+
+	prop = (u32 *)of_get_property(dn, "reg-shift", NULL);
+	if (prop)
+		reg_shift = *prop;
+
+	prop = (u32 *)of_get_property(dn, "pio-mode", NULL);
+	if (prop) {
+		pio_mode = *prop;
+		if (pio_mode > 6) {
+			dev_err(&ofdev->dev, "invalid pio-mode\n");
+			return -EINVAL;
+		}
+	} else {
+		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
+	}
+
+	pio_mask = 1 << pio_mode;
+	pio_mask |= (1 << pio_mode) - 1;
+
+	return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
+				     reg_shift, pio_mask);
+}
+
+static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+{
+	return __pata_platform_remove(&ofdev->dev);
+}
+
+static struct of_device_id pata_of_platform_match[] = {
+	{ .compatible = "ata-generic", },
+};
+
+static struct of_platform_driver pata_of_platform_driver = {
+	.name		= "pata_of_platform",
+	.match_table	= pata_of_platform_match,
+	.probe		= pata_of_platform_probe,
+	.remove		= __devexit_p(pata_of_platform_remove),
+};
+
+static int __init pata_of_platform_init(void)
+{
+	return of_register_platform_driver(&pata_of_platform_driver);
+}
+module_init(pata_of_platform_init);
+
+static void __exit pata_of_platform_exit(void)
+{
+	of_unregister_platform_driver(&pata_of_platform_driver);
+}
+module_exit(pata_of_platform_exit);
+
+MODULE_DESCRIPTION("OF-platform PATA driver");
+MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
+MODULE_LICENSE("GPL");
-- 
1.5.2.2

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

* [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
  2007-12-04 17:04 ` Anton Vorontsov
@ 2007-12-04 17:07   ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:07 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Paul Mundt, Arnd Bergmann, Sergei Shtylyov, Olof Johansson,
	Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

This patch adds localbus and pata nodes to use CF IDE interface
on MPC8349E-mITX boards.

Patch also adds code to probe localbus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc8349emitx.dts    |   18 +++++++++++++++++-
 arch/powerpc/platforms/83xx/mpc834x_itx.c |   17 +++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5072f6d..c459b0a 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -249,6 +249,22 @@
 		device_type = "pci";
 	};
 
+	localbus@e0005000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8349emitx-localbus",
+			     "fsl,mpc8349e-localbus",
+			     "fsl,pq2pro-localbus";
+		reg = <e0005000 d8>;
+		ranges = <3 0 f0000000 210>;
 
-
+		pata@3,0 {
+			compatible = "fsl,mpc8349emitx-pata", "ata-generic";
+			reg = <3 0 10 3 20c 4>;
+			reg-shift = <1>;
+			pio-mode = <6>;
+			interrupts = <17 8>;
+			interrupt-parent = <&ipic>;
+		};
+	};
 };
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index aa76819..ea5f176 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/atomic.h>
@@ -37,6 +38,22 @@
 
 #include "mpc83xx.h"
 
+static struct of_device_id mpc834x_itx_ids[] = {
+	{ .name = "localbus", },
+	{},
+};
+
+static int __init mpc834x_itx_declare_of_platform_devices(void)
+{
+	if (!machine_is(mpc834x_itx))
+		return 0;
+
+	of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc834x_itx_declare_of_platform_devices);
+
 /* ************************************************************************
  *
  * Setup the architecture
-- 
1.5.2.2


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

* [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
@ 2007-12-04 17:07   ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:07 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Jeff Garzik, Arnd Bergmann, Paul Mundt, Olof Johansson

This patch adds localbus and pata nodes to use CF IDE interface
on MPC8349E-mITX boards.

Patch also adds code to probe localbus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc8349emitx.dts    |   18 +++++++++++++++++-
 arch/powerpc/platforms/83xx/mpc834x_itx.c |   17 +++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5072f6d..c459b0a 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -249,6 +249,22 @@
 		device_type = "pci";
 	};
 
+	localbus@e0005000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8349emitx-localbus",
+			     "fsl,mpc8349e-localbus",
+			     "fsl,pq2pro-localbus";
+		reg = <e0005000 d8>;
+		ranges = <3 0 f0000000 210>;
 
-
+		pata@3,0 {
+			compatible = "fsl,mpc8349emitx-pata", "ata-generic";
+			reg = <3 0 10 3 20c 4>;
+			reg-shift = <1>;
+			pio-mode = <6>;
+			interrupts = <17 8>;
+			interrupt-parent = <&ipic>;
+		};
+	};
 };
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index aa76819..ea5f176 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/atomic.h>
@@ -37,6 +38,22 @@
 
 #include "mpc83xx.h"
 
+static struct of_device_id mpc834x_itx_ids[] = {
+	{ .name = "localbus", },
+	{},
+};
+
+static int __init mpc834x_itx_declare_of_platform_devices(void)
+{
+	if (!machine_is(mpc834x_itx))
+		return 0;
+
+	of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc834x_itx_declare_of_platform_devices);
+
 /* ************************************************************************
  *
  * Setup the architecture
-- 
1.5.2.2

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

* [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g
  2007-12-04 17:04 ` Anton Vorontsov
@ 2007-12-04 17:07   ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:07 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Paul Mundt, Arnd Bergmann, Sergei Shtylyov, Olof Johansson,
	Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

This patch renames ioport_shift member of pata_platform_info
structure to reg_shift. Users of pata_platform are followed
appropriately.

Rationale of that change is: shifting applies to the whole memory
mapped region, not only to the command block of the ATA registers,
despite the fact that shifting is meaningless for ctl register.

This patch should make Sergei Shtylyov a bit more happy. ;-)

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/arm/mach-rpc/riscpc.c                      |    2 +-
 arch/blackfin/mach-bf527/boards/ezkit.c         |    2 +-
 arch/blackfin/mach-bf533/boards/cm_bf533.c      |    2 +-
 arch/blackfin/mach-bf533/boards/ezkit.c         |    2 +-
 arch/blackfin/mach-bf533/boards/stamp.c         |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537.c      |    2 +-
 arch/blackfin/mach-bf537/boards/generic_board.c |    2 +-
 arch/blackfin/mach-bf537/boards/stamp.c         |    2 +-
 arch/blackfin/mach-bf561/boards/cm_bf561.c      |    2 +-
 arch/blackfin/mach-bf561/boards/ezkit.c         |    2 +-
 arch/sh/boards/landisk/setup.c                  |    2 +-
 arch/sh/boards/renesas/r7780rp/setup.c          |    2 +-
 arch/sh/boards/renesas/rts7751r2d/setup.c       |    2 +-
 drivers/ata/pata_platform.c                     |    8 ++++----
 drivers/ide/legacy/ide_platform.c               |    4 ++--
 include/linux/pata_platform.h                   |    4 ++--
 16 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index a454451..be413c1 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -161,7 +161,7 @@ static struct platform_device serial_device = {
 };
 
 static struct pata_platform_info pata_platform_data = {
-	.ioport_shift		= 2,
+	.reg_shift		= 2,
 };
 
 static struct resource pata_resources[] = {
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 003e2ac..c9b20bd 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -685,7 +685,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 21df2f3..6cc697d 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -289,7 +289,7 @@ static struct platform_device isp1362_hcd_device = {
 #define PATA_INT	38
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 2,
+	.reg_shift = 2,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index be85203..030dc64 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -223,7 +223,7 @@ static struct platform_device bfin_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 8fde8d8..6ff0b88 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -340,7 +340,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index c0fb06d..031da0f 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -340,7 +340,7 @@ static struct platform_device bfin_mac_device = {
 #define PATA_INT	64
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 2,
+	.reg_shift = 2,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index 09f4bfb..e217eb2 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -613,7 +613,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 07b0dc2..daeb0d5 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -640,7 +640,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index c19cd29..5628e34 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -280,7 +280,7 @@ static struct platform_device bfin_uart_device = {
 #define PATA_INT	119
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 2,
+	.reg_shift = 2,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 4ff8f6e..6894472 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -213,7 +213,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index eda7176..46330f7 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -31,7 +31,7 @@ static void landisk_power_off(void)
 static struct resource cf_ide_resources[3];
 
 static struct pata_platform_info pata_info = {
-	.ioport_shift	= 1,
+	.reg_shift	= 1,
 };
 
 static struct platform_device cf_ide_device = {
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 0fdc0bc..1fc9c9b 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -94,7 +94,7 @@ static struct resource cf_ide_resources[] = {
 };
 
 static struct pata_platform_info pata_info = {
-	.ioport_shift	= 1,
+	.reg_shift	= 1,
 };
 
 static struct platform_device cf_ide_device  = {
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 8125d20..8bcca50 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -62,7 +62,7 @@ static struct resource cf_ide_resources[] = {
 };
 
 static struct pata_platform_info pata_info = {
-	.ioport_shift	= 1,
+	.reg_shift	= 1,
 };
 
 static struct platform_device cf_ide_device  = {
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index d4cb231..3e7d2eb 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -114,7 +114,7 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
  *	@io_res: Resource representing I/O base
  *	@ctl_res: Resource representing CTL base
  *	@irq_res: Resource representing IRQ and its flags
- *	@ioport_shift: I/O port shift
+ *	@reg_shift: I/O port shift
  *
  *	Register a platform bus IDE interface. Such interfaces are PIO and we
  *	assume do not support IRQ sharing.
@@ -138,7 +138,7 @@ int __devinit __pata_platform_probe(struct device *dev,
 				    struct resource *io_res,
 				    struct resource *ctl_res,
 				    struct resource *irq_res,
-				    unsigned int ioport_shift,
+				    unsigned int reg_shift,
 				    int __pio_mask)
 {
 	struct ata_host *host;
@@ -202,7 +202,7 @@ int __devinit __pata_platform_probe(struct device *dev,
 
 	ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
 
-	pata_platform_setup_port(&ap->ioaddr, ioport_shift);
+	pata_platform_setup_port(&ap->ioaddr, reg_shift);
 
 	ata_port_desc(ap, "%s cmd 0x%llx ctl 0x%llx", mmio ? "mmio" : "ioport",
 		      (unsigned long long)io_res->start,
@@ -274,7 +274,7 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 		irq_res->flags = pp_info ? pp_info->irq_flags : 0;
 
 	return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
-				     pp_info ? pp_info->ioport_shift : 0,
+				     pp_info ? pp_info->reg_shift : 0,
 				     pio_mask);
 }
 
diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c
index 7bb79f5..3cee1b2 100644
--- a/drivers/ide/legacy/ide_platform.c
+++ b/drivers/ide/legacy/ide_platform.c
@@ -41,9 +41,9 @@ static ide_hwif_t *__devinit plat_ide_locate_hwif(void __iomem *base,
 
 	hwif->io_ports[IDE_DATA_OFFSET] = port;
 
-	port += (1 << pdata->ioport_shift);
+	port += (1 << pdata->reg_shift);
 	for (i = IDE_ERROR_OFFSET; i <= IDE_STATUS_OFFSET;
-	     i++, port += (1 << pdata->ioport_shift))
+	     i++, port += (1 << pdata->reg_shift))
 		hwif->io_ports[i] = port;
 
 	hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl;
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h
index 6a7a92d..a0fc6b0 100644
--- a/include/linux/pata_platform.h
+++ b/include/linux/pata_platform.h
@@ -7,7 +7,7 @@ struct pata_platform_info {
 	 * constantly spaced and need larger than the 1-byte
 	 * spacing used by ata_std_ports().
 	 */
-	unsigned int ioport_shift;
+	unsigned int reg_shift;
 	/* 
 	 * Indicate platform specific irq types and initial
 	 * IRQ flags when call request_irq()
@@ -19,7 +19,7 @@ extern int __devinit __pata_platform_probe(struct device *dev,
 					   struct resource *io_res,
 					   struct resource *ctl_res,
 					   struct resource *irq_res,
-					   unsigned int ioport_shift,
+					   unsigned int reg_shift,
 					   int __pio_mask);
 
 extern int __devexit __pata_platform_remove(struct device *dev);
-- 
1.5.2.2

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

* [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g
@ 2007-12-04 17:07   ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 17:07 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Jeff Garzik, Arnd Bergmann, Paul Mundt, Olof Johansson

This patch renames ioport_shift member of pata_platform_info
structure to reg_shift. Users of pata_platform are followed
appropriately.

Rationale of that change is: shifting applies to the whole memory
mapped region, not only to the command block of the ATA registers,
despite the fact that shifting is meaningless for ctl register.

This patch should make Sergei Shtylyov a bit more happy. ;-)

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/arm/mach-rpc/riscpc.c                      |    2 +-
 arch/blackfin/mach-bf527/boards/ezkit.c         |    2 +-
 arch/blackfin/mach-bf533/boards/cm_bf533.c      |    2 +-
 arch/blackfin/mach-bf533/boards/ezkit.c         |    2 +-
 arch/blackfin/mach-bf533/boards/stamp.c         |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537.c      |    2 +-
 arch/blackfin/mach-bf537/boards/generic_board.c |    2 +-
 arch/blackfin/mach-bf537/boards/stamp.c         |    2 +-
 arch/blackfin/mach-bf561/boards/cm_bf561.c      |    2 +-
 arch/blackfin/mach-bf561/boards/ezkit.c         |    2 +-
 arch/sh/boards/landisk/setup.c                  |    2 +-
 arch/sh/boards/renesas/r7780rp/setup.c          |    2 +-
 arch/sh/boards/renesas/rts7751r2d/setup.c       |    2 +-
 drivers/ata/pata_platform.c                     |    8 ++++----
 drivers/ide/legacy/ide_platform.c               |    4 ++--
 include/linux/pata_platform.h                   |    4 ++--
 16 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index a454451..be413c1 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -161,7 +161,7 @@ static struct platform_device serial_device = {
 };
 
 static struct pata_platform_info pata_platform_data = {
-	.ioport_shift		= 2,
+	.reg_shift		= 2,
 };
 
 static struct resource pata_resources[] = {
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 003e2ac..c9b20bd 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -685,7 +685,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index 21df2f3..6cc697d 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -289,7 +289,7 @@ static struct platform_device isp1362_hcd_device = {
 #define PATA_INT	38
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 2,
+	.reg_shift = 2,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index be85203..030dc64 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -223,7 +223,7 @@ static struct platform_device bfin_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 8fde8d8..6ff0b88 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -340,7 +340,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index c0fb06d..031da0f 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -340,7 +340,7 @@ static struct platform_device bfin_mac_device = {
 #define PATA_INT	64
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 2,
+	.reg_shift = 2,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c
index 09f4bfb..e217eb2 100644
--- a/arch/blackfin/mach-bf537/boards/generic_board.c
+++ b/arch/blackfin/mach-bf537/boards/generic_board.c
@@ -613,7 +613,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 07b0dc2..daeb0d5 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -640,7 +640,7 @@ static struct platform_device bfin_sport1_uart_device = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index c19cd29..5628e34 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -280,7 +280,7 @@ static struct platform_device bfin_uart_device = {
 #define PATA_INT	119
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 2,
+	.reg_shift = 2,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c
index 4ff8f6e..6894472 100644
--- a/arch/blackfin/mach-bf561/boards/ezkit.c
+++ b/arch/blackfin/mach-bf561/boards/ezkit.c
@@ -213,7 +213,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
 #define PATA_INT	55
 
 static struct pata_platform_info bfin_pata_platform_data = {
-	.ioport_shift = 1,
+	.reg_shift = 1,
 	.irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
 };
 
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c
index eda7176..46330f7 100644
--- a/arch/sh/boards/landisk/setup.c
+++ b/arch/sh/boards/landisk/setup.c
@@ -31,7 +31,7 @@ static void landisk_power_off(void)
 static struct resource cf_ide_resources[3];
 
 static struct pata_platform_info pata_info = {
-	.ioport_shift	= 1,
+	.reg_shift	= 1,
 };
 
 static struct platform_device cf_ide_device = {
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c
index 0fdc0bc..1fc9c9b 100644
--- a/arch/sh/boards/renesas/r7780rp/setup.c
+++ b/arch/sh/boards/renesas/r7780rp/setup.c
@@ -94,7 +94,7 @@ static struct resource cf_ide_resources[] = {
 };
 
 static struct pata_platform_info pata_info = {
-	.ioport_shift	= 1,
+	.reg_shift	= 1,
 };
 
 static struct platform_device cf_ide_device  = {
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index 8125d20..8bcca50 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -62,7 +62,7 @@ static struct resource cf_ide_resources[] = {
 };
 
 static struct pata_platform_info pata_info = {
-	.ioport_shift	= 1,
+	.reg_shift	= 1,
 };
 
 static struct platform_device cf_ide_device  = {
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index d4cb231..3e7d2eb 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -114,7 +114,7 @@ static void pata_platform_setup_port(struct ata_ioports *ioaddr,
  *	@io_res: Resource representing I/O base
  *	@ctl_res: Resource representing CTL base
  *	@irq_res: Resource representing IRQ and its flags
- *	@ioport_shift: I/O port shift
+ *	@reg_shift: I/O port shift
  *
  *	Register a platform bus IDE interface. Such interfaces are PIO and we
  *	assume do not support IRQ sharing.
@@ -138,7 +138,7 @@ int __devinit __pata_platform_probe(struct device *dev,
 				    struct resource *io_res,
 				    struct resource *ctl_res,
 				    struct resource *irq_res,
-				    unsigned int ioport_shift,
+				    unsigned int reg_shift,
 				    int __pio_mask)
 {
 	struct ata_host *host;
@@ -202,7 +202,7 @@ int __devinit __pata_platform_probe(struct device *dev,
 
 	ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
 
-	pata_platform_setup_port(&ap->ioaddr, ioport_shift);
+	pata_platform_setup_port(&ap->ioaddr, reg_shift);
 
 	ata_port_desc(ap, "%s cmd 0x%llx ctl 0x%llx", mmio ? "mmio" : "ioport",
 		      (unsigned long long)io_res->start,
@@ -274,7 +274,7 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 		irq_res->flags = pp_info ? pp_info->irq_flags : 0;
 
 	return __pata_platform_probe(&pdev->dev, io_res, ctl_res, irq_res,
-				     pp_info ? pp_info->ioport_shift : 0,
+				     pp_info ? pp_info->reg_shift : 0,
 				     pio_mask);
 }
 
diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c
index 7bb79f5..3cee1b2 100644
--- a/drivers/ide/legacy/ide_platform.c
+++ b/drivers/ide/legacy/ide_platform.c
@@ -41,9 +41,9 @@ static ide_hwif_t *__devinit plat_ide_locate_hwif(void __iomem *base,
 
 	hwif->io_ports[IDE_DATA_OFFSET] = port;
 
-	port += (1 << pdata->ioport_shift);
+	port += (1 << pdata->reg_shift);
 	for (i = IDE_ERROR_OFFSET; i <= IDE_STATUS_OFFSET;
-	     i++, port += (1 << pdata->ioport_shift))
+	     i++, port += (1 << pdata->reg_shift))
 		hwif->io_ports[i] = port;
 
 	hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl;
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h
index 6a7a92d..a0fc6b0 100644
--- a/include/linux/pata_platform.h
+++ b/include/linux/pata_platform.h
@@ -7,7 +7,7 @@ struct pata_platform_info {
 	 * constantly spaced and need larger than the 1-byte
 	 * spacing used by ata_std_ports().
 	 */
-	unsigned int ioport_shift;
+	unsigned int reg_shift;
 	/* 
 	 * Indicate platform specific irq types and initial
 	 * IRQ flags when call request_irq()
@@ -19,7 +19,7 @@ extern int __devinit __pata_platform_probe(struct device *dev,
 					   struct resource *io_res,
 					   struct resource *ctl_res,
 					   struct resource *irq_res,
-					   unsigned int ioport_shift,
+					   unsigned int reg_shift,
 					   int __pio_mask);
 
 extern int __devexit __pata_platform_remove(struct device *dev);
-- 
1.5.2.2

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

* Re: [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g
  2007-12-04 17:07   ` Anton Vorontsov
@ 2007-12-04 17:08     ` Sergei Shtylyov
  -1 siblings, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2007-12-04 17:08 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Paul Mundt, Arnd Bergmann,
	Olof Johansson, Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

Hello.

Anton Vorontsov wrote:

> This patch renames ioport_shift member of pata_platform_info
> structure to reg_shift. Users of pata_platform are followed
> appropriately.

> Rationale of that change is: shifting applies to the whole memory
> mapped region, not only to the command block of the ATA registers,
> despite the fact that shifting is meaningless for ctl register.

> This patch should make Sergei Shtylyov a bit more happy. ;-)

    In fact, I don't care about how platform driver calls this stuff. ;-)
I only care about the property name.

MBR, Sergei

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

* Re: [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g
@ 2007-12-04 17:08     ` Sergei Shtylyov
  0 siblings, 0 replies; 57+ messages in thread
From: Sergei Shtylyov @ 2007-12-04 17:08 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt,
	Olof Johansson

Hello.

Anton Vorontsov wrote:

> This patch renames ioport_shift member of pata_platform_info
> structure to reg_shift. Users of pata_platform are followed
> appropriately.

> Rationale of that change is: shifting applies to the whole memory
> mapped region, not only to the command block of the ATA registers,
> despite the fact that shifting is meaningless for ctl register.

> This patch should make Sergei Shtylyov a bit more happy. ;-)

    In fact, I don't care about how platform driver calls this stuff. ;-)
I only care about the property name.

MBR, Sergei

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 17:07   ` Anton Vorontsov
@ 2007-12-04 18:48     ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 18:48 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Paul Mundt, Arnd Bergmann,
	Sergei Shtylyov, Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

Hi,

On Tue, Dec 04, 2007 at 08:07:19PM +0300, Anton Vorontsov wrote:
> This driver nicely wraps around pata_platform library functions,
> and provides OF platform bus bindings to the PATA devices.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
>  drivers/ata/Kconfig            |   10 ++++
>  drivers/ata/Makefile           |    1 +
>  drivers/ata/pata_of_platform.c |  102 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 113 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/ata/pata_of_platform.c
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index ba63619..5a492fa 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -614,6 +614,16 @@ config PATA_PLATFORM
>  
>  	  If unsure, say N.
>  
> +config PATA_OF_PLATFORM
> +	tristate "OpenFirmware platform device PATA support"
> +	depends on PATA_PLATFORM && PPC_OF
> +	help
> +	  This option enables support for generic directly connected ATA
> +	  devices commonly found on embedded systems with OpenFirmware
> +	  bindings.
> +
> +	  If unsure, say N.
> +

There's a typo in the dependencies for PATA_PLATFORM that you should change:

depends on EMBEDDED || ARCH_RPC

(note ARCH_>R<PC). With my font it's hard to tell a difference :)

It should really be:

depends on EMBEDDED || PPC

Care to change that while you're at it?

> +static struct of_device_id pata_of_platform_match[] = {
> +	{ .compatible = "ata-generic", },
> +};

Needs to be terminated by empty entry, and please add:
MODULE_DEVICE_TABLE(of, pata_of_platform_match);


-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-04 18:48     ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 18:48 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

Hi,

On Tue, Dec 04, 2007 at 08:07:19PM +0300, Anton Vorontsov wrote:
> This driver nicely wraps around pata_platform library functions,
> and provides OF platform bus bindings to the PATA devices.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
>  drivers/ata/Kconfig            |   10 ++++
>  drivers/ata/Makefile           |    1 +
>  drivers/ata/pata_of_platform.c |  102 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 113 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/ata/pata_of_platform.c
> 
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index ba63619..5a492fa 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -614,6 +614,16 @@ config PATA_PLATFORM
>  
>  	  If unsure, say N.
>  
> +config PATA_OF_PLATFORM
> +	tristate "OpenFirmware platform device PATA support"
> +	depends on PATA_PLATFORM && PPC_OF
> +	help
> +	  This option enables support for generic directly connected ATA
> +	  devices commonly found on embedded systems with OpenFirmware
> +	  bindings.
> +
> +	  If unsure, say N.
> +

There's a typo in the dependencies for PATA_PLATFORM that you should change:

depends on EMBEDDED || ARCH_RPC

(note ARCH_>R<PC). With my font it's hard to tell a difference :)

It should really be:

depends on EMBEDDED || PPC

Care to change that while you're at it?

> +static struct of_device_id pata_of_platform_match[] = {
> +	{ .compatible = "ata-generic", },
> +};

Needs to be terminated by empty entry, and please add:
MODULE_DEVICE_TABLE(of, pata_of_platform_match);


-Olof

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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
  2007-12-04 17:07   ` Anton Vorontsov
@ 2007-12-04 19:16     ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 19:16 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Jeff Garzik, Arnd Bergmann, Paul Mundt

Hi,

On Tue, Dec 04, 2007 at 08:07:26PM +0300, Anton Vorontsov wrote:
> diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
> index 5072f6d..c459b0a 100644
> --- a/arch/powerpc/boot/dts/mpc8349emitx.dts
> +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
> @@ -249,6 +249,22 @@
>  		device_type = "pci";
>  	};
>  
> +	localbus@e0005000 {
> +		#address-cells = <2>;
> +		#size-cells = <1>;
> +		compatible = "fsl,mpc8349emitx-localbus",
> +			     "fsl,mpc8349e-localbus",
> +			     "fsl,pq2pro-localbus";
> +		reg = <e0005000 d8>;
> +		ranges = <3 0 f0000000 210>;
>  
> -
> +		pata@3,0 {

What's the ,0 for?

> +			compatible = "fsl,mpc8349emitx-pata", "ata-generic";
> +			reg = <3 0 10 3 20c 4>;
> +			reg-shift = <1>;
> +			pio-mode = <6>;
> +			interrupts = <17 8>;
> +			interrupt-parent = <&ipic>;
> +		};
> +	};
>  };
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> index aa76819..ea5f176 100644
> --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
> +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> @@ -23,6 +23,7 @@
>  #include <linux/delay.h>
>  #include <linux/seq_file.h>
>  #include <linux/root_dev.h>
> +#include <linux/of_platform.h>
>  
>  #include <asm/system.h>
>  #include <asm/atomic.h>
> @@ -37,6 +38,22 @@
>  
>  #include "mpc83xx.h"
>  
> +static struct of_device_id mpc834x_itx_ids[] = {
> +	{ .name = "localbus", },
> +	{},
> +};

Please add the "compatible" field here (fsl,pq2pro-localbus should do
just fine), instead of the name.

(Sorry for not spotting this sooner)


-Olof


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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
@ 2007-12-04 19:16     ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 19:16 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, Paul Mundt, Arnd Bergmann, Jeff Garzik, linux-ide

Hi,

On Tue, Dec 04, 2007 at 08:07:26PM +0300, Anton Vorontsov wrote:
> diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
> index 5072f6d..c459b0a 100644
> --- a/arch/powerpc/boot/dts/mpc8349emitx.dts
> +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
> @@ -249,6 +249,22 @@
>  		device_type = "pci";
>  	};
>  
> +	localbus@e0005000 {
> +		#address-cells = <2>;
> +		#size-cells = <1>;
> +		compatible = "fsl,mpc8349emitx-localbus",
> +			     "fsl,mpc8349e-localbus",
> +			     "fsl,pq2pro-localbus";
> +		reg = <e0005000 d8>;
> +		ranges = <3 0 f0000000 210>;
>  
> -
> +		pata@3,0 {

What's the ,0 for?

> +			compatible = "fsl,mpc8349emitx-pata", "ata-generic";
> +			reg = <3 0 10 3 20c 4>;
> +			reg-shift = <1>;
> +			pio-mode = <6>;
> +			interrupts = <17 8>;
> +			interrupt-parent = <&ipic>;
> +		};
> +	};
>  };
> diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> index aa76819..ea5f176 100644
> --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
> +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
> @@ -23,6 +23,7 @@
>  #include <linux/delay.h>
>  #include <linux/seq_file.h>
>  #include <linux/root_dev.h>
> +#include <linux/of_platform.h>
>  
>  #include <asm/system.h>
>  #include <asm/atomic.h>
> @@ -37,6 +38,22 @@
>  
>  #include "mpc83xx.h"
>  
> +static struct of_device_id mpc834x_itx_ids[] = {
> +	{ .name = "localbus", },
> +	{},
> +};

Please add the "compatible" field here (fsl,pq2pro-localbus should do
just fine), instead of the name.

(Sorry for not spotting this sooner)


-Olof

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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
  2007-12-04 19:16     ` Olof Johansson
  (?)
@ 2007-12-04 19:23     ` Scott Wood
  -1 siblings, 0 replies; 57+ messages in thread
From: Scott Wood @ 2007-12-04 19:23 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Arnd Bergmann, Jeff Garzik, linuxppc-dev, linux-ide, Paul Mundt

Olof Johansson wrote:
> Hi,
> 
> On Tue, Dec 04, 2007 at 08:07:26PM +0300, Anton Vorontsov wrote:
>> diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
>> index 5072f6d..c459b0a 100644
>> --- a/arch/powerpc/boot/dts/mpc8349emitx.dts
>> +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
>> @@ -249,6 +249,22 @@
>>  		device_type = "pci";
>>  	};
>>  
>> +	localbus@e0005000 {
>> +		#address-cells = <2>;
>> +		#size-cells = <1>;
>> +		compatible = "fsl,mpc8349emitx-localbus",
>> +			     "fsl,mpc8349e-localbus",
>> +			     "fsl,pq2pro-localbus";
>> +		reg = <e0005000 d8>;
>> +		ranges = <3 0 f0000000 210>;
>>  
>> -
>> +		pata@3,0 {
> 
> What's the ,0 for?

chipselect 3, offset 0.

-Scott

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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
  2007-12-04 19:16     ` Olof Johansson
@ 2007-12-04 19:45       ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 19:45 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linuxppc-dev, linux-ide, Jeff Garzik, Arnd Bergmann, Paul Mundt

On Tue, Dec 04, 2007 at 01:16:57PM -0600, Olof Johansson wrote:
> Hi,
> 
> On Tue, Dec 04, 2007 at 08:07:26PM +0300, Anton Vorontsov wrote:
> > diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
> > index 5072f6d..c459b0a 100644
[...]
> > +static struct of_device_id mpc834x_itx_ids[] = {
> > +	{ .name = "localbus", },
> > +	{},
> > +};
> 
> Please add the "compatible" field here (fsl,pq2pro-localbus should do
> just fine), instead of the name.

Done, thanks.

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH v2.1] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

This patch adds localbus and pata nodes to use CF IDE interface
on MPC8349E-mITX boards.

Patch also adds code to probe localbus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc8349emitx.dts    |   18 +++++++++++++++++-
 arch/powerpc/platforms/83xx/mpc834x_itx.c |   17 +++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5072f6d..c459b0a 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -249,6 +249,22 @@
 		device_type = "pci";
 	};
 
+	localbus@e0005000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8349emitx-localbus",
+			     "fsl,mpc8349e-localbus",
+			     "fsl,pq2pro-localbus";
+		reg = <e0005000 d8>;
+		ranges = <3 0 f0000000 210>;
 
-
+		pata@3,0 {
+			compatible = "fsl,mpc8349emitx-pata", "ata-generic";
+			reg = <3 0 10 3 20c 4>;
+			reg-shift = <1>;
+			pio-mode = <6>;
+			interrupts = <17 8>;
+			interrupt-parent = <&ipic>;
+		};
+	};
 };
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index aa76819..4797850 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/atomic.h>
@@ -37,6 +38,22 @@
 
 #include "mpc83xx.h"
 
+static struct of_device_id mpc834x_itx_ids[] = {
+	{ .compatible = "fsl,pq2pro-localbus", },
+	{},
+};
+
+static int __init mpc834x_itx_declare_of_platform_devices(void)
+{
+	if (!machine_is(mpc834x_itx))
+		return 0;
+
+	of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc834x_itx_declare_of_platform_devices);
+
 /* ************************************************************************
  *
  * Setup the architecture
-- 
1.5.2.2


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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
@ 2007-12-04 19:45       ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 19:45 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linuxppc-dev, Paul Mundt, Arnd Bergmann, Jeff Garzik, linux-ide

On Tue, Dec 04, 2007 at 01:16:57PM -0600, Olof Johansson wrote:
> Hi,
> 
> On Tue, Dec 04, 2007 at 08:07:26PM +0300, Anton Vorontsov wrote:
> > diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
> > index 5072f6d..c459b0a 100644
[...]
> > +static struct of_device_id mpc834x_itx_ids[] = {
> > +	{ .name = "localbus", },
> > +	{},
> > +};
> 
> Please add the "compatible" field here (fsl,pq2pro-localbus should do
> just fine), instead of the name.

Done, thanks.

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH v2.1] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes

This patch adds localbus and pata nodes to use CF IDE interface
on MPC8349E-mITX boards.

Patch also adds code to probe localbus.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 arch/powerpc/boot/dts/mpc8349emitx.dts    |   18 +++++++++++++++++-
 arch/powerpc/platforms/83xx/mpc834x_itx.c |   17 +++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
index 5072f6d..c459b0a 100644
--- a/arch/powerpc/boot/dts/mpc8349emitx.dts
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -249,6 +249,22 @@
 		device_type = "pci";
 	};
 
+	localbus@e0005000 {
+		#address-cells = <2>;
+		#size-cells = <1>;
+		compatible = "fsl,mpc8349emitx-localbus",
+			     "fsl,mpc8349e-localbus",
+			     "fsl,pq2pro-localbus";
+		reg = <e0005000 d8>;
+		ranges = <3 0 f0000000 210>;
 
-
+		pata@3,0 {
+			compatible = "fsl,mpc8349emitx-pata", "ata-generic";
+			reg = <3 0 10 3 20c 4>;
+			reg-shift = <1>;
+			pio-mode = <6>;
+			interrupts = <17 8>;
+			interrupt-parent = <&ipic>;
+		};
+	};
 };
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c
index aa76819..4797850 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_itx.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c
@@ -23,6 +23,7 @@
 #include <linux/delay.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/of_platform.h>
 
 #include <asm/system.h>
 #include <asm/atomic.h>
@@ -37,6 +38,22 @@
 
 #include "mpc83xx.h"
 
+static struct of_device_id mpc834x_itx_ids[] = {
+	{ .compatible = "fsl,pq2pro-localbus", },
+	{},
+};
+
+static int __init mpc834x_itx_declare_of_platform_devices(void)
+{
+	if (!machine_is(mpc834x_itx))
+		return 0;
+
+	of_platform_bus_probe(NULL, mpc834x_itx_ids, NULL);
+
+	return 0;
+}
+device_initcall(mpc834x_itx_declare_of_platform_devices);
+
 /* ************************************************************************
  *
  * Setup the architecture
-- 
1.5.2.2

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 18:48     ` Olof Johansson
@ 2007-12-04 19:49       ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 19:49 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linuxppc-dev, linux-ide, Paul Mundt, Arnd Bergmann,
	Sergei Shtylyov, Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

On Tue, Dec 04, 2007 at 12:48:26PM -0600, Olof Johansson wrote:
> Hi,
> 
> On Tue, Dec 04, 2007 at 08:07:19PM +0300, Anton Vorontsov wrote:
> > This driver nicely wraps around pata_platform library functions,
[..]
> There's a typo in the dependencies for PATA_PLATFORM that you should change:
> 
> depends on EMBEDDED || ARCH_RPC
> 
> (note ARCH_>R<PC). With my font it's hard to tell a difference :)
> 
> It should really be:
> 
> depends on EMBEDDED || PPC
> 
> Care to change that while you're at it?

Yup.

> 
> > +static struct of_device_id pata_of_platform_match[] = {
> > +	{ .compatible = "ata-generic", },
> > +};
> 
> Needs to be terminated by empty entry,

Fixed.

> and please add:
> MODULE_DEVICE_TABLE(of, pata_of_platform_match);

Ugh. I forgot about device table. Done.

Much thanks for spotting these.

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH v2.1] [libata] pata_of_platform: OF-Platform PATA device driver

This driver nicely wraps around pata_platform library functions,
and provides OF platform bus bindings to the PATA devices.

In addition fix ARCH_RPC typo in the PATA_PLATFORM Kconfig entry,
spotted by Olof Johansson.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/Kconfig            |   12 ++++-
 drivers/ata/Makefile           |    1 +
 drivers/ata/pata_of_platform.c |  104 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100644 drivers/ata/pata_of_platform.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ba63619..e067112 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -607,13 +607,23 @@ config PATA_WINBOND_VLB
 
 config PATA_PLATFORM
 	tristate "Generic platform device PATA support"
-	depends on EMBEDDED || ARCH_RPC
+	depends on EMBEDDED || ARCH_PPC
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems.
 
 	  If unsure, say N.
 
+config PATA_OF_PLATFORM
+	tristate "OpenFirmware platform device PATA support"
+	depends on PATA_PLATFORM && PPC_OF
+	help
+	  This option enables support for generic directly connected ATA
+	  devices commonly found on embedded systems with OpenFirmware
+	  bindings.
+
+	  If unsure, say N.
+
 config PATA_ICSIDE
 	tristate "Acorn ICS PATA support"
 	depends on ARM && ARCH_ACORN
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index b13feb2..ebcee64 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF)	+= pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
+obj-$(CONFIG_PATA_OF_PLATFORM)	+= pata_of_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
new file mode 100644
index 0000000..4daf118
--- /dev/null
+++ b/drivers/ata/pata_of_platform.c
@@ -0,0 +1,104 @@
+/*
+ * OF-platform PATA driver
+ *
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ *                     Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/pata_platform.h>
+
+static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+					    const struct of_device_id *match)
+{
+	int ret;
+	struct device_node *dn = ofdev->node;
+	struct resource io_res;
+	struct resource ctl_res;
+	struct resource irq_res;
+	unsigned int reg_shift = 0;
+	int pio_mode = 0;
+	int pio_mask;
+	const u32 *prop;
+
+	ret = of_address_to_resource(dn, 0, &io_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get IO address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_irq_to_resource(dn, 0, &irq_res);
+	if (ret == NO_IRQ)
+		irq_res.start = irq_res.end = -1;
+	else
+		irq_res.flags = 0;
+
+	prop = (u32 *)of_get_property(dn, "reg-shift", NULL);
+	if (prop)
+		reg_shift = *prop;
+
+	prop = (u32 *)of_get_property(dn, "pio-mode", NULL);
+	if (prop) {
+		pio_mode = *prop;
+		if (pio_mode > 6) {
+			dev_err(&ofdev->dev, "invalid pio-mode\n");
+			return -EINVAL;
+		}
+	} else {
+		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
+	}
+
+	pio_mask = 1 << pio_mode;
+	pio_mask |= (1 << pio_mode) - 1;
+
+	return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
+				     reg_shift, pio_mask);
+}
+
+static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+{
+	return __pata_platform_remove(&ofdev->dev);
+}
+
+static struct of_device_id pata_of_platform_match[] = {
+	{ .compatible = "ata-generic", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, pata_of_platform_match);
+
+static struct of_platform_driver pata_of_platform_driver = {
+	.name		= "pata_of_platform",
+	.match_table	= pata_of_platform_match,
+	.probe		= pata_of_platform_probe,
+	.remove		= __devexit_p(pata_of_platform_remove),
+};
+
+static int __init pata_of_platform_init(void)
+{
+	return of_register_platform_driver(&pata_of_platform_driver);
+}
+module_init(pata_of_platform_init);
+
+static void __exit pata_of_platform_exit(void)
+{
+	of_unregister_platform_driver(&pata_of_platform_driver);
+}
+module_exit(pata_of_platform_exit);
+
+MODULE_DESCRIPTION("OF-platform PATA driver");
+MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
+MODULE_LICENSE("GPL");
-- 
1.5.2.2


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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-04 19:49       ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 19:49 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Tue, Dec 04, 2007 at 12:48:26PM -0600, Olof Johansson wrote:
> Hi,
> 
> On Tue, Dec 04, 2007 at 08:07:19PM +0300, Anton Vorontsov wrote:
> > This driver nicely wraps around pata_platform library functions,
[..]
> There's a typo in the dependencies for PATA_PLATFORM that you should change:
> 
> depends on EMBEDDED || ARCH_RPC
> 
> (note ARCH_>R<PC). With my font it's hard to tell a difference :)
> 
> It should really be:
> 
> depends on EMBEDDED || PPC
> 
> Care to change that while you're at it?

Yup.

> 
> > +static struct of_device_id pata_of_platform_match[] = {
> > +	{ .compatible = "ata-generic", },
> > +};
> 
> Needs to be terminated by empty entry,

Fixed.

> and please add:
> MODULE_DEVICE_TABLE(of, pata_of_platform_match);

Ugh. I forgot about device table. Done.

Much thanks for spotting these.

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH v2.1] [libata] pata_of_platform: OF-Platform PATA device driver

This driver nicely wraps around pata_platform library functions,
and provides OF platform bus bindings to the PATA devices.

In addition fix ARCH_RPC typo in the PATA_PLATFORM Kconfig entry,
spotted by Olof Johansson.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/Kconfig            |   12 ++++-
 drivers/ata/Makefile           |    1 +
 drivers/ata/pata_of_platform.c |  104 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100644 drivers/ata/pata_of_platform.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ba63619..e067112 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -607,13 +607,23 @@ config PATA_WINBOND_VLB
 
 config PATA_PLATFORM
 	tristate "Generic platform device PATA support"
-	depends on EMBEDDED || ARCH_RPC
+	depends on EMBEDDED || ARCH_PPC
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems.
 
 	  If unsure, say N.
 
+config PATA_OF_PLATFORM
+	tristate "OpenFirmware platform device PATA support"
+	depends on PATA_PLATFORM && PPC_OF
+	help
+	  This option enables support for generic directly connected ATA
+	  devices commonly found on embedded systems with OpenFirmware
+	  bindings.
+
+	  If unsure, say N.
+
 config PATA_ICSIDE
 	tristate "Acorn ICS PATA support"
 	depends on ARM && ARCH_ACORN
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index b13feb2..ebcee64 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF)	+= pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
+obj-$(CONFIG_PATA_OF_PLATFORM)	+= pata_of_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
new file mode 100644
index 0000000..4daf118
--- /dev/null
+++ b/drivers/ata/pata_of_platform.c
@@ -0,0 +1,104 @@
+/*
+ * OF-platform PATA driver
+ *
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ *                     Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/pata_platform.h>
+
+static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+					    const struct of_device_id *match)
+{
+	int ret;
+	struct device_node *dn = ofdev->node;
+	struct resource io_res;
+	struct resource ctl_res;
+	struct resource irq_res;
+	unsigned int reg_shift = 0;
+	int pio_mode = 0;
+	int pio_mask;
+	const u32 *prop;
+
+	ret = of_address_to_resource(dn, 0, &io_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get IO address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_irq_to_resource(dn, 0, &irq_res);
+	if (ret == NO_IRQ)
+		irq_res.start = irq_res.end = -1;
+	else
+		irq_res.flags = 0;
+
+	prop = (u32 *)of_get_property(dn, "reg-shift", NULL);
+	if (prop)
+		reg_shift = *prop;
+
+	prop = (u32 *)of_get_property(dn, "pio-mode", NULL);
+	if (prop) {
+		pio_mode = *prop;
+		if (pio_mode > 6) {
+			dev_err(&ofdev->dev, "invalid pio-mode\n");
+			return -EINVAL;
+		}
+	} else {
+		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
+	}
+
+	pio_mask = 1 << pio_mode;
+	pio_mask |= (1 << pio_mode) - 1;
+
+	return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
+				     reg_shift, pio_mask);
+}
+
+static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+{
+	return __pata_platform_remove(&ofdev->dev);
+}
+
+static struct of_device_id pata_of_platform_match[] = {
+	{ .compatible = "ata-generic", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, pata_of_platform_match);
+
+static struct of_platform_driver pata_of_platform_driver = {
+	.name		= "pata_of_platform",
+	.match_table	= pata_of_platform_match,
+	.probe		= pata_of_platform_probe,
+	.remove		= __devexit_p(pata_of_platform_remove),
+};
+
+static int __init pata_of_platform_init(void)
+{
+	return of_register_platform_driver(&pata_of_platform_driver);
+}
+module_init(pata_of_platform_init);
+
+static void __exit pata_of_platform_exit(void)
+{
+	of_unregister_platform_driver(&pata_of_platform_driver);
+}
+module_exit(pata_of_platform_exit);
+
+MODULE_DESCRIPTION("OF-platform PATA driver");
+MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
+MODULE_LICENSE("GPL");
-- 
1.5.2.2

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 19:49       ` Anton Vorontsov
@ 2007-12-04 20:01         ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:01 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
>  	tristate "Generic platform device PATA support"
> -	depends on EMBEDDED || ARCH_RPC
> +	depends on EMBEDDED || ARCH_PPC

It needs to be || PPC, not || ARCH_PPC.


-Olof


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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-04 20:01         ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:01 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
>  	tristate "Generic platform device PATA support"
> -	depends on EMBEDDED || ARCH_RPC
> +	depends on EMBEDDED || ARCH_PPC

It needs to be || PPC, not || ARCH_PPC.


-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 20:01         ` Olof Johansson
@ 2007-12-04 20:37           ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 20:37 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> >  	tristate "Generic platform device PATA support"
> > -	depends on EMBEDDED || ARCH_RPC
> > +	depends on EMBEDDED || ARCH_PPC
> 
> It needs to be || PPC, not || ARCH_PPC.

D'oh.

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH v2.2] [libata] pata_of_platform: OF-Platform PATA device driver

This driver nicely wraps around pata_platform library functions,
and provides OF platform bus bindings to the PATA devices.

In addition fix ARCH_RPC typo in the PATA_PLATFORM Kconfig entry,
spotted by Olof Johansson.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/Kconfig            |   12 ++++-
 drivers/ata/Makefile           |    1 +
 drivers/ata/pata_of_platform.c |  104 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100644 drivers/ata/pata_of_platform.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ba63619..299ff1f 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -607,13 +607,23 @@ config PATA_WINBOND_VLB
 
 config PATA_PLATFORM
 	tristate "Generic platform device PATA support"
-	depends on EMBEDDED || ARCH_RPC
+	depends on EMBEDDED || PPC
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems.
 
 	  If unsure, say N.
 
+config PATA_OF_PLATFORM
+	tristate "OpenFirmware platform device PATA support"
+	depends on PATA_PLATFORM && PPC_OF
+	help
+	  This option enables support for generic directly connected ATA
+	  devices commonly found on embedded systems with OpenFirmware
+	  bindings.
+
+	  If unsure, say N.
+
 config PATA_ICSIDE
 	tristate "Acorn ICS PATA support"
 	depends on ARM && ARCH_ACORN
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index b13feb2..ebcee64 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF)	+= pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
+obj-$(CONFIG_PATA_OF_PLATFORM)	+= pata_of_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
new file mode 100644
index 0000000..4daf118
--- /dev/null
+++ b/drivers/ata/pata_of_platform.c
@@ -0,0 +1,104 @@
+/*
+ * OF-platform PATA driver
+ *
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ *                     Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/pata_platform.h>
+
+static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+					    const struct of_device_id *match)
+{
+	int ret;
+	struct device_node *dn = ofdev->node;
+	struct resource io_res;
+	struct resource ctl_res;
+	struct resource irq_res;
+	unsigned int reg_shift = 0;
+	int pio_mode = 0;
+	int pio_mask;
+	const u32 *prop;
+
+	ret = of_address_to_resource(dn, 0, &io_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get IO address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_irq_to_resource(dn, 0, &irq_res);
+	if (ret == NO_IRQ)
+		irq_res.start = irq_res.end = -1;
+	else
+		irq_res.flags = 0;
+
+	prop = (u32 *)of_get_property(dn, "reg-shift", NULL);
+	if (prop)
+		reg_shift = *prop;
+
+	prop = (u32 *)of_get_property(dn, "pio-mode", NULL);
+	if (prop) {
+		pio_mode = *prop;
+		if (pio_mode > 6) {
+			dev_err(&ofdev->dev, "invalid pio-mode\n");
+			return -EINVAL;
+		}
+	} else {
+		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
+	}
+
+	pio_mask = 1 << pio_mode;
+	pio_mask |= (1 << pio_mode) - 1;
+
+	return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
+				     reg_shift, pio_mask);
+}
+
+static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+{
+	return __pata_platform_remove(&ofdev->dev);
+}
+
+static struct of_device_id pata_of_platform_match[] = {
+	{ .compatible = "ata-generic", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, pata_of_platform_match);
+
+static struct of_platform_driver pata_of_platform_driver = {
+	.name		= "pata_of_platform",
+	.match_table	= pata_of_platform_match,
+	.probe		= pata_of_platform_probe,
+	.remove		= __devexit_p(pata_of_platform_remove),
+};
+
+static int __init pata_of_platform_init(void)
+{
+	return of_register_platform_driver(&pata_of_platform_driver);
+}
+module_init(pata_of_platform_init);
+
+static void __exit pata_of_platform_exit(void)
+{
+	of_unregister_platform_driver(&pata_of_platform_driver);
+}
+module_exit(pata_of_platform_exit);
+
+MODULE_DESCRIPTION("OF-platform PATA driver");
+MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
+MODULE_LICENSE("GPL");
-- 
1.5.2.2


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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-04 20:37           ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-04 20:37 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> >  	tristate "Generic platform device PATA support"
> > -	depends on EMBEDDED || ARCH_RPC
> > +	depends on EMBEDDED || ARCH_PPC
> 
> It needs to be || PPC, not || ARCH_PPC.

D'oh.

- - - -
From: Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [PATCH v2.2] [libata] pata_of_platform: OF-Platform PATA device driver

This driver nicely wraps around pata_platform library functions,
and provides OF platform bus bindings to the PATA devices.

In addition fix ARCH_RPC typo in the PATA_PLATFORM Kconfig entry,
spotted by Olof Johansson.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/ata/Kconfig            |   12 ++++-
 drivers/ata/Makefile           |    1 +
 drivers/ata/pata_of_platform.c |  104 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 116 insertions(+), 1 deletions(-)
 create mode 100644 drivers/ata/pata_of_platform.c

diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ba63619..299ff1f 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -607,13 +607,23 @@ config PATA_WINBOND_VLB
 
 config PATA_PLATFORM
 	tristate "Generic platform device PATA support"
-	depends on EMBEDDED || ARCH_RPC
+	depends on EMBEDDED || PPC
 	help
 	  This option enables support for generic directly connected ATA
 	  devices commonly found on embedded systems.
 
 	  If unsure, say N.
 
+config PATA_OF_PLATFORM
+	tristate "OpenFirmware platform device PATA support"
+	depends on PATA_PLATFORM && PPC_OF
+	help
+	  This option enables support for generic directly connected ATA
+	  devices commonly found on embedded systems with OpenFirmware
+	  bindings.
+
+	  If unsure, say N.
+
 config PATA_ICSIDE
 	tristate "Acorn ICS PATA support"
 	depends on ARM && ARCH_ACORN
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index b13feb2..ebcee64 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -67,6 +67,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF)	+= pata_ixp4xx_cf.o
 obj-$(CONFIG_PATA_SCC)		+= pata_scc.o
 obj-$(CONFIG_PATA_BF54X)	+= pata_bf54x.o
 obj-$(CONFIG_PATA_PLATFORM)	+= pata_platform.o
+obj-$(CONFIG_PATA_OF_PLATFORM)	+= pata_of_platform.o
 obj-$(CONFIG_PATA_ICSIDE)	+= pata_icside.o
 # Should be last but two libata driver
 obj-$(CONFIG_PATA_ACPI)		+= pata_acpi.o
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
new file mode 100644
index 0000000..4daf118
--- /dev/null
+++ b/drivers/ata/pata_of_platform.c
@@ -0,0 +1,104 @@
+/*
+ * OF-platform PATA driver
+ *
+ * Copyright (c) 2007  MontaVista Software, Inc.
+ *                     Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * 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/kernel.h>
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/pata_platform.h>
+
+static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+					    const struct of_device_id *match)
+{
+	int ret;
+	struct device_node *dn = ofdev->node;
+	struct resource io_res;
+	struct resource ctl_res;
+	struct resource irq_res;
+	unsigned int reg_shift = 0;
+	int pio_mode = 0;
+	int pio_mask;
+	const u32 *prop;
+
+	ret = of_address_to_resource(dn, 0, &io_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get IO address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_address_to_resource(dn, 1, &ctl_res);
+	if (ret) {
+		dev_err(&ofdev->dev, "can't get CTL address from "
+			"device tree\n");
+		return -EINVAL;
+	}
+
+	ret = of_irq_to_resource(dn, 0, &irq_res);
+	if (ret == NO_IRQ)
+		irq_res.start = irq_res.end = -1;
+	else
+		irq_res.flags = 0;
+
+	prop = (u32 *)of_get_property(dn, "reg-shift", NULL);
+	if (prop)
+		reg_shift = *prop;
+
+	prop = (u32 *)of_get_property(dn, "pio-mode", NULL);
+	if (prop) {
+		pio_mode = *prop;
+		if (pio_mode > 6) {
+			dev_err(&ofdev->dev, "invalid pio-mode\n");
+			return -EINVAL;
+		}
+	} else {
+		dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n");
+	}
+
+	pio_mask = 1 << pio_mode;
+	pio_mask |= (1 << pio_mode) - 1;
+
+	return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, &irq_res,
+				     reg_shift, pio_mask);
+}
+
+static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+{
+	return __pata_platform_remove(&ofdev->dev);
+}
+
+static struct of_device_id pata_of_platform_match[] = {
+	{ .compatible = "ata-generic", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, pata_of_platform_match);
+
+static struct of_platform_driver pata_of_platform_driver = {
+	.name		= "pata_of_platform",
+	.match_table	= pata_of_platform_match,
+	.probe		= pata_of_platform_probe,
+	.remove		= __devexit_p(pata_of_platform_remove),
+};
+
+static int __init pata_of_platform_init(void)
+{
+	return of_register_platform_driver(&pata_of_platform_driver);
+}
+module_init(pata_of_platform_init);
+
+static void __exit pata_of_platform_exit(void)
+{
+	of_unregister_platform_driver(&pata_of_platform_driver);
+}
+module_exit(pata_of_platform_exit);
+
+MODULE_DESCRIPTION("OF-platform PATA driver");
+MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>");
+MODULE_LICENSE("GPL");
-- 
1.5.2.2

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 20:37           ` Anton Vorontsov
@ 2007-12-04 20:39             ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:39 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Tue, Dec 04, 2007 at 11:37:51PM +0300, Anton Vorontsov wrote:
> On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > >  	tristate "Generic platform device PATA support"
> > > -	depends on EMBEDDED || ARCH_RPC
> > > +	depends on EMBEDDED || ARCH_PPC
> > 
> > It needs to be || PPC, not || ARCH_PPC.
> 
> D'oh.
> 
> - - - -
> From: Anton Vorontsov <avorontsov@ru.mvista.com>
> Subject: [PATCH v2.2] [libata] pata_of_platform: OF-Platform PATA device driver
> 
> This driver nicely wraps around pata_platform library functions,
> and provides OF platform bus bindings to the PATA devices.
> 
> In addition fix ARCH_RPC typo in the PATA_PLATFORM Kconfig entry,
> spotted by Olof Johansson.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Reviewed-by: Olof Johansson <olof@lixom.net>

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-04 20:39             ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:39 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Tue, Dec 04, 2007 at 11:37:51PM +0300, Anton Vorontsov wrote:
> On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > >  	tristate "Generic platform device PATA support"
> > > -	depends on EMBEDDED || ARCH_RPC
> > > +	depends on EMBEDDED || ARCH_PPC
> > 
> > It needs to be || PPC, not || ARCH_PPC.
> 
> D'oh.
> 
> - - - -
> From: Anton Vorontsov <avorontsov@ru.mvista.com>
> Subject: [PATCH v2.2] [libata] pata_of_platform: OF-Platform PATA device driver
> 
> This driver nicely wraps around pata_platform library functions,
> and provides OF platform bus bindings to the PATA devices.
> 
> In addition fix ARCH_RPC typo in the PATA_PLATFORM Kconfig entry,
> spotted by Olof Johansson.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Reviewed-by: Olof Johansson <olof@lixom.net>

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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
  2007-12-04 19:45       ` Anton Vorontsov
@ 2007-12-04 20:40         ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:40 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Jeff Garzik, Arnd Bergmann, Paul Mundt

On Tue, Dec 04, 2007 at 10:45:31PM +0300, Anton Vorontsov wrote:
> This patch adds localbus and pata nodes to use CF IDE interface
> on MPC8349E-mITX boards.
> 
> Patch also adds code to probe localbus.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Acked-by: Olof Johansson <olof@lixom.net>


-Olof

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

* Re: [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes
@ 2007-12-04 20:40         ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:40 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, Paul Mundt, Arnd Bergmann, Jeff Garzik, linux-ide

On Tue, Dec 04, 2007 at 10:45:31PM +0300, Anton Vorontsov wrote:
> This patch adds localbus and pata nodes to use CF IDE interface
> on MPC8349E-mITX boards.
> 
> Patch also adds code to probe localbus.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Acked-by: Olof Johansson <olof@lixom.net>


-Olof

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

* Re: [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral
  2007-12-04 17:06   ` Anton Vorontsov
@ 2007-12-04 20:40     ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:40 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Paul Mundt, Arnd Bergmann,
	Sergei Shtylyov, Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

On Tue, Dec 04, 2007 at 08:06:25PM +0300, Anton Vorontsov wrote:
> Split pata_platform_{probe,remove} into two pieces:
> 1. pata_platform_{probe,remove} -- platform_device-dependant bits;
> 2. __ptata_platform_{probe,remove} -- device type neutral bits.
> 
> This is done to not duplicate code for the OF-platform driver.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Acked-by: Olof Johansson <olof@lixom.net>

Tested with both the old pata_platform and new pata_of_platform drivers on
PA Semi Electra (see separate post with pata_of_platform cutover patch).


-Olof


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

* Re: [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral
@ 2007-12-04 20:40     ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:40 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Tue, Dec 04, 2007 at 08:06:25PM +0300, Anton Vorontsov wrote:
> Split pata_platform_{probe,remove} into two pieces:
> 1. pata_platform_{probe,remove} -- platform_device-dependant bits;
> 2. __ptata_platform_{probe,remove} -- device type neutral bits.
> 
> This is done to not duplicate code for the OF-platform driver.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>

Acked-by: Olof Johansson <olof@lixom.net>

Tested with both the old pata_platform and new pata_of_platform drivers on
PA Semi Electra (see separate post with pata_of_platform cutover patch).


-Olof

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

* [PATCH] pata_of_platform: Move electra-ide support over to new framework
  2007-12-04 17:04 ` Anton Vorontsov
@ 2007-12-04 20:44   ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:44 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Paul Mundt, Arnd Bergmann,
	Sergei Shtylyov, Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

[POWERPC] Move electra-ide support over to new pata_of_platform framework

Move electra-ide glue over to the new pata_of_platform framework, and
add the quirks needed to that driver.


Signed-off-by: Olof Johansson <olof@lixom.net>

---

I'll remove the electra-ide stuff from arch/powerpc/platforms/pasemi
once this hits a common tree, since otherwise I'd be without IDE until
they converge (i.e.  2.6.25 merge window).


-Olof

diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index 4daf118..3e9675a 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -34,11 +34,20 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
 		return -EINVAL;
 	}
 
-	ret = of_address_to_resource(dn, 1, &ctl_res);
-	if (ret) {
-		dev_err(&ofdev->dev, "can't get CTL address from "
-			"device tree\n");
-		return -EINVAL;
+	if (of_device_is_compatible(dn, "electra-ide")) {
+		/* Altstatus is really at offset 0x3f6 from the primary window
+		 * on electra-ide. Adjust ctl_res and io_res accordingly.
+		 */
+		ctl_res = io_res;
+		ctl_res.start = ctl_res.start+0x3f6;
+		io_res.end = ctl_res.start-1;
+	} else {
+		ret = of_address_to_resource(dn, 1, &ctl_res);
+		if (ret) {
+			dev_err(&ofdev->dev, "can't get CTL address from "
+				"device tree\n");
+			return -EINVAL;
+		}
 	}
 
 	ret = of_irq_to_resource(dn, 0, &irq_res);
@@ -76,6 +85,7 @@ static int __devexit pata_of_platform_remove(struct of_device *ofdev)
 
 static struct of_device_id pata_of_platform_match[] = {
 	{ .compatible = "ata-generic", },
+	{ .compatible = "electra-ide", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, pata_of_platform_match);

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

* [PATCH] pata_of_platform: Move electra-ide support over to new framework
@ 2007-12-04 20:44   ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 20:44 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

[POWERPC] Move electra-ide support over to new pata_of_platform framework

Move electra-ide glue over to the new pata_of_platform framework, and
add the quirks needed to that driver.


Signed-off-by: Olof Johansson <olof@lixom.net>

---

I'll remove the electra-ide stuff from arch/powerpc/platforms/pasemi
once this hits a common tree, since otherwise I'd be without IDE until
they converge (i.e.  2.6.25 merge window).


-Olof

diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index 4daf118..3e9675a 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -34,11 +34,20 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
 		return -EINVAL;
 	}
 
-	ret = of_address_to_resource(dn, 1, &ctl_res);
-	if (ret) {
-		dev_err(&ofdev->dev, "can't get CTL address from "
-			"device tree\n");
-		return -EINVAL;
+	if (of_device_is_compatible(dn, "electra-ide")) {
+		/* Altstatus is really at offset 0x3f6 from the primary window
+		 * on electra-ide. Adjust ctl_res and io_res accordingly.
+		 */
+		ctl_res = io_res;
+		ctl_res.start = ctl_res.start+0x3f6;
+		io_res.end = ctl_res.start-1;
+	} else {
+		ret = of_address_to_resource(dn, 1, &ctl_res);
+		if (ret) {
+			dev_err(&ofdev->dev, "can't get CTL address from "
+				"device tree\n");
+			return -EINVAL;
+		}
 	}
 
 	ret = of_irq_to_resource(dn, 0, &irq_res);
@@ -76,6 +85,7 @@ static int __devexit pata_of_platform_remove(struct of_device *ofdev)
 
 static struct of_device_id pata_of_platform_match[] = {
 	{ .compatible = "ata-generic", },
+	{ .compatible = "electra-ide", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, pata_of_platform_match);

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
  2007-12-04 20:44   ` Olof Johansson
@ 2007-12-04 20:50     ` Jeff Garzik
  -1 siblings, 0 replies; 57+ messages in thread
From: Jeff Garzik @ 2007-12-04 20:50 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Anton Vorontsov, linuxppc-dev, linux-ide, Paul Mundt,
	Arnd Bergmann, Sergei Shtylyov, Benjamin Herrenschmidt,
	Kumar Gala

Olof Johansson wrote:
> [POWERPC] Move electra-ide support over to new pata_of_platform framework
> 
> Move electra-ide glue over to the new pata_of_platform framework, and
> add the quirks needed to that driver.
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> 
> ---
> 
> I'll remove the electra-ide stuff from arch/powerpc/platforms/pasemi
> once this hits a common tree, since otherwise I'd be without IDE until
> they converge (i.e.  2.6.25 merge window).

FWIW I'm presuming this work will go via a powerpc tree not libata... 
Generally that's not the case, but here it's largely an arch-specific work.

	Jeff




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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
@ 2007-12-04 20:50     ` Jeff Garzik
  0 siblings, 0 replies; 57+ messages in thread
From: Jeff Garzik @ 2007-12-04 20:50 UTC (permalink / raw)
  To: Olof Johansson; +Cc: Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

Olof Johansson wrote:
> [POWERPC] Move electra-ide support over to new pata_of_platform framework
> 
> Move electra-ide glue over to the new pata_of_platform framework, and
> add the quirks needed to that driver.
> 
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> 
> ---
> 
> I'll remove the electra-ide stuff from arch/powerpc/platforms/pasemi
> once this hits a common tree, since otherwise I'd be without IDE until
> they converge (i.e.  2.6.25 merge window).

FWIW I'm presuming this work will go via a powerpc tree not libata... 
Generally that's not the case, but here it's largely an arch-specific work.

	Jeff

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
  2007-12-04 20:50     ` Jeff Garzik
@ 2007-12-04 21:03       ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 21:03 UTC (permalink / raw)
  To: Jeff Garzik
  Cc: Anton Vorontsov, linuxppc-dev, linux-ide, Paul Mundt,
	Arnd Bergmann, Sergei Shtylyov, Benjamin Herrenschmidt,
	Kumar Gala

On Tue, Dec 04, 2007 at 03:50:03PM -0500, Jeff Garzik wrote:
> Olof Johansson wrote:
>> [POWERPC] Move electra-ide support over to new pata_of_platform framework
>> Move electra-ide glue over to the new pata_of_platform framework, and
>> add the quirks needed to that driver.
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> ---
>> I'll remove the electra-ide stuff from arch/powerpc/platforms/pasemi
>> once this hits a common tree, since otherwise I'd be without IDE until
>> they converge (i.e.  2.6.25 merge window).
>
> FWIW I'm presuming this work will go via a powerpc tree not libata... 
> Generally that's not the case, but here it's largely an arch-specific work.

Ok, that works. I was thinking of letting this patch go through libata,
and do the removal through the powerpc merge path. But I can do both
through powerpc.

-Olof

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
@ 2007-12-04 21:03       ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-04 21:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Tue, Dec 04, 2007 at 03:50:03PM -0500, Jeff Garzik wrote:
> Olof Johansson wrote:
>> [POWERPC] Move electra-ide support over to new pata_of_platform framework
>> Move electra-ide glue over to the new pata_of_platform framework, and
>> add the quirks needed to that driver.
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> ---
>> I'll remove the electra-ide stuff from arch/powerpc/platforms/pasemi
>> once this hits a common tree, since otherwise I'd be without IDE until
>> they converge (i.e.  2.6.25 merge window).
>
> FWIW I'm presuming this work will go via a powerpc tree not libata... 
> Generally that's not the case, but here it's largely an arch-specific work.

Ok, that works. I was thinking of letting this patch go through libata,
and do the removal through the powerpc merge path. But I can do both
through powerpc.

-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-04 20:01         ` Olof Johansson
@ 2007-12-05  0:48           ` Paul Mundt
  -1 siblings, 0 replies; 57+ messages in thread
From: Paul Mundt @ 2007-12-05  0:48 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Anton Vorontsov, Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev

On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> >  	tristate "Generic platform device PATA support"
> > -	depends on EMBEDDED || ARCH_RPC
> > +	depends on EMBEDDED || ARCH_PPC
> 
> It needs to be || PPC, not || ARCH_PPC.
> 
Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.

ARCH_RPC is not a typo, it's an ARM platform. Please grep first :-)

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-05  0:48           ` Paul Mundt
  0 siblings, 0 replies; 57+ messages in thread
From: Paul Mundt @ 2007-12-05  0:48 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linux-ide, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> >  	tristate "Generic platform device PATA support"
> > -	depends on EMBEDDED || ARCH_RPC
> > +	depends on EMBEDDED || ARCH_PPC
> 
> It needs to be || PPC, not || ARCH_PPC.
> 
Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.

ARCH_RPC is not a typo, it's an ARM platform. Please grep first :-)

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

* Re: [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g
  2007-12-04 17:07   ` Anton Vorontsov
@ 2007-12-05  0:56     ` Paul Mundt
  -1 siblings, 0 replies; 57+ messages in thread
From: Paul Mundt @ 2007-12-05  0:56 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: linuxppc-dev, linux-ide, Arnd Bergmann, Sergei Shtylyov,
	Olof Johansson, Benjamin Herrenschmidt, Kumar Gala, Jeff Garzik

On Tue, Dec 04, 2007 at 08:07:45PM +0300, Anton Vorontsov wrote:
> This patch renames ioport_shift member of pata_platform_info
> structure to reg_shift. Users of pata_platform are followed
> appropriately.
> 
> Rationale of that change is: shifting applies to the whole memory
> mapped region, not only to the command block of the ATA registers,
> despite the fact that shifting is meaningless for ctl register.
> 
It's called ioport_shift because of the fact it shifts an ioport, namely
a struct ata_ioport *. We could rename it, but I really don't see the
point. If you don't like the choice of name on your platform, add a
comment to your platform-specific code noting this particular outrage so
it can be grepped for by future generations ;-)

Nacked-by: Paul Mundt <lethal@linux-sh.org>

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

* Re: [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g
@ 2007-12-05  0:56     ` Paul Mundt
  0 siblings, 0 replies; 57+ messages in thread
From: Paul Mundt @ 2007-12-05  0:56 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Olof Johansson

On Tue, Dec 04, 2007 at 08:07:45PM +0300, Anton Vorontsov wrote:
> This patch renames ioport_shift member of pata_platform_info
> structure to reg_shift. Users of pata_platform are followed
> appropriately.
> 
> Rationale of that change is: shifting applies to the whole memory
> mapped region, not only to the command block of the ATA registers,
> despite the fact that shifting is meaningless for ctl register.
> 
It's called ioport_shift because of the fact it shifts an ioport, namely
a struct ata_ioport *. We could rename it, but I really don't see the
point. If you don't like the choice of name on your platform, add a
comment to your platform-specific code noting this particular outrage so
it can be grepped for by future generations ;-)

Nacked-by: Paul Mundt <lethal@linux-sh.org>

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-05  0:48           ` Paul Mundt
@ 2007-12-05  3:26             ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-05  3:26 UTC (permalink / raw)
  To: Paul Mundt; +Cc: linux-ide, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > >  	tristate "Generic platform device PATA support"
> > > -	depends on EMBEDDED || ARCH_RPC
> > > +	depends on EMBEDDED || ARCH_PPC
> > 
> > It needs to be || PPC, not || ARCH_PPC.
> > 
> Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.
> 
> ARCH_RPC is not a typo, it's an ARM platform. Please grep first :-)

I'm sorry, but seeing ARCH_RPC and not having an arch/rpc made me
suspect it being a typo. It surprises me that the ARM guys chose such
a generic prefix as ARCH_ for their specific platforms.  (powerpc uses
PPC_<platform>).

Anyway, thanks for catching it.


-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-05  3:26             ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-05  3:26 UTC (permalink / raw)
  To: Paul Mundt; +Cc: linux-ide, Jeff Garzik, Arnd Bergmann, linuxppc-dev

On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > >  	tristate "Generic platform device PATA support"
> > > -	depends on EMBEDDED || ARCH_RPC
> > > +	depends on EMBEDDED || ARCH_PPC
> > 
> > It needs to be || PPC, not || ARCH_PPC.
> > 
> Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.
> 
> ARCH_RPC is not a typo, it's an ARM platform. Please grep first :-)

I'm sorry, but seeing ARCH_RPC and not having an arch/rpc made me
suspect it being a typo. It surprises me that the ARM guys chose such
a generic prefix as ARCH_ for their specific platforms.  (powerpc uses
PPC_<platform>).

Anyway, thanks for catching it.


-Olof

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

* Re: [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral
  2007-12-04 17:06   ` Anton Vorontsov
@ 2007-12-05 15:37     ` Anton Vorontsov
  -1 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-05 15:37 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Jeff Garzik, Arnd Bergmann, Paul Mundt, Olof Johansson

On Tue, Dec 04, 2007 at 08:06:25PM +0300, Anton Vorontsov wrote:
> Split pata_platform_{probe,remove} into two pieces:
> 1. pata_platform_{probe,remove} -- platform_device-dependant bits;
> 2. __ptata_platform_{probe,remove} -- device type neutral bits.
> 
> This is done to not duplicate code for the OF-platform driver.

Paul, do you have any objections regarding that one?

If there is no objections, could you stamp Acked-by on it?
Thus I can resend this set one more time for the merge, w/o
fourth patch.

>  /**
> - *	pata_platform_probe		-	attach a platform interface
> - *	@pdev: platform device
> + *	__pata_platform_probe		-	attach a platform interface
> + *	@dev: device
> + *	@io_res: Resource representing I/O base
> + *	@ctl_res: Resource representing CTL base
> + *	@irq_res: Resource representing IRQ and its flags
> + *	@ioport_shift: I/O port shift
  + *	@__pio_mask: PIO mask

^^^ added

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

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

* Re: [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral
@ 2007-12-05 15:37     ` Anton Vorontsov
  0 siblings, 0 replies; 57+ messages in thread
From: Anton Vorontsov @ 2007-12-05 15:37 UTC (permalink / raw)
  To: linuxppc-dev, linux-ide
  Cc: Olof Johansson, Paul Mundt, Arnd Bergmann, Jeff Garzik

On Tue, Dec 04, 2007 at 08:06:25PM +0300, Anton Vorontsov wrote:
> Split pata_platform_{probe,remove} into two pieces:
> 1. pata_platform_{probe,remove} -- platform_device-dependant bits;
> 2. __ptata_platform_{probe,remove} -- device type neutral bits.
> 
> This is done to not duplicate code for the OF-platform driver.

Paul, do you have any objections regarding that one?

If there is no objections, could you stamp Acked-by on it?
Thus I can resend this set one more time for the merge, w/o
fourth patch.

>  /**
> - *	pata_platform_probe		-	attach a platform interface
> - *	@pdev: platform device
> + *	__pata_platform_probe		-	attach a platform interface
> + *	@dev: device
> + *	@io_res: Resource representing I/O base
> + *	@ctl_res: Resource representing CTL base
> + *	@irq_res: Resource representing IRQ and its flags
> + *	@ioport_shift: I/O port shift
  + *	@__pio_mask: PIO mask

^^^ added

Thanks,

-- 
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-05  0:48           ` Paul Mundt
@ 2007-12-05 18:39             ` Scott Wood
  -1 siblings, 0 replies; 57+ messages in thread
From: Scott Wood @ 2007-12-05 18:39 UTC (permalink / raw)
  To: Paul Mundt
  Cc: Olof Johansson, linux-ide, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > >  	tristate "Generic platform device PATA support"
> > > -	depends on EMBEDDED || ARCH_RPC
> > > +	depends on EMBEDDED || ARCH_PPC
> > 
> > It needs to be || PPC, not || ARCH_PPC.
> > 
> Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.

Why is it dependent on anything other than platform bus support and ATA?

-Scott

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-05 18:39             ` Scott Wood
  0 siblings, 0 replies; 57+ messages in thread
From: Scott Wood @ 2007-12-05 18:39 UTC (permalink / raw)
  To: Paul Mundt
  Cc: Olof Johansson, linux-ide, Jeff Garzik, Arnd Bergmann, linuxppc-dev

On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > >  	tristate "Generic platform device PATA support"
> > > -	depends on EMBEDDED || ARCH_RPC
> > > +	depends on EMBEDDED || ARCH_PPC
> > 
> > It needs to be || PPC, not || ARCH_PPC.
> > 
> Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.

Why is it dependent on anything other than platform bus support and ATA?

-Scott

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-05 18:39             ` Scott Wood
@ 2007-12-14  8:23               ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-14  8:23 UTC (permalink / raw)
  To: Scott Wood
  Cc: Paul Mundt, linux-ide, Jeff Garzik, Arnd Bergmann, linuxppc-dev

On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> > On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > > >  	tristate "Generic platform device PATA support"
> > > > -	depends on EMBEDDED || ARCH_RPC
> > > > +	depends on EMBEDDED || ARCH_PPC
> > > 
> > > It needs to be || PPC, not || ARCH_PPC.
> > > 
> > Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.
> 
> Why is it dependent on anything other than platform bus support and ATA?

There's no way to specify dependency on platform bus as a config option,
that's likely what EMBEDDED was meant to do. Some platforms have platform
bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
to be among those. PPC too.


-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-14  8:23               ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-14  8:23 UTC (permalink / raw)
  To: Scott Wood
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> On Wed, Dec 05, 2007 at 09:48:41AM +0900, Paul Mundt wrote:
> > On Tue, Dec 04, 2007 at 02:01:21PM -0600, Olof Johansson wrote:
> > > On Tue, Dec 04, 2007 at 10:49:21PM +0300, Anton Vorontsov wrote:
> > > >  	tristate "Generic platform device PATA support"
> > > > -	depends on EMBEDDED || ARCH_RPC
> > > > +	depends on EMBEDDED || ARCH_PPC
> > > 
> > > It needs to be || PPC, not || ARCH_PPC.
> > > 
> > Wrong. It needs to be EMBEDDED || ARCH_RPC || PPC.
> 
> Why is it dependent on anything other than platform bus support and ATA?

There's no way to specify dependency on platform bus as a config option,
that's likely what EMBEDDED was meant to do. Some platforms have platform
bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
to be among those. PPC too.


-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-14  8:23               ` Olof Johansson
@ 2007-12-14 16:09                 ` Scott Wood
  -1 siblings, 0 replies; 57+ messages in thread
From: Scott Wood @ 2007-12-14 16:09 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Paul Mundt, linux-ide, Jeff Garzik, Arnd Bergmann, linuxppc-dev

On Fri, Dec 14, 2007 at 02:23:13AM -0600, Olof Johansson wrote:
> On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> > Why is it dependent on anything other than platform bus support and ATA?
> 
> There's no way to specify dependency on platform bus as a config option,
> that's likely what EMBEDDED was meant to do. Some platforms have platform
> bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
> to be among those. PPC too.

If platform bus can't be configged out, then the only dependency should
be the implicit one on ATA (is there anything else whose absence will
stop the code from building, or working if the appropriate platform
device is passed in?).

-Scott

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-14 16:09                 ` Scott Wood
  0 siblings, 0 replies; 57+ messages in thread
From: Scott Wood @ 2007-12-14 16:09 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Fri, Dec 14, 2007 at 02:23:13AM -0600, Olof Johansson wrote:
> On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> > Why is it dependent on anything other than platform bus support and ATA?
> 
> There's no way to specify dependency on platform bus as a config option,
> that's likely what EMBEDDED was meant to do. Some platforms have platform
> bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
> to be among those. PPC too.

If platform bus can't be configged out, then the only dependency should
be the implicit one on ATA (is there anything else whose absence will
stop the code from building, or working if the appropriate platform
device is passed in?).

-Scott

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
  2007-12-14 16:09                 ` Scott Wood
@ 2007-12-14 16:33                   ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-14 16:33 UTC (permalink / raw)
  To: Scott Wood
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Fri, Dec 14, 2007 at 10:09:28AM -0600, Scott Wood wrote:
> On Fri, Dec 14, 2007 at 02:23:13AM -0600, Olof Johansson wrote:
> > On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> > > Why is it dependent on anything other than platform bus support and ATA?
> > 
> > There's no way to specify dependency on platform bus as a config option,
> > that's likely what EMBEDDED was meant to do. Some platforms have platform
> > bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
> > to be among those. PPC too.
> 
> If platform bus can't be configged out, then the only dependency should
> be the implicit one on ATA (is there anything else whose absence will
> stop the code from building, or working if the appropriate platform
> device is passed in?).

Sure, sounds good to me.


-Olof

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

* Re: [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver
@ 2007-12-14 16:33                   ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-14 16:33 UTC (permalink / raw)
  To: Scott Wood
  Cc: linux-ide, Paul Mundt, Jeff Garzik, Arnd Bergmann, linuxppc-dev

On Fri, Dec 14, 2007 at 10:09:28AM -0600, Scott Wood wrote:
> On Fri, Dec 14, 2007 at 02:23:13AM -0600, Olof Johansson wrote:
> > On Wed, Dec 05, 2007 at 12:39:12PM -0600, Scott Wood wrote:
> > > Why is it dependent on anything other than platform bus support and ATA?
> > 
> > There's no way to specify dependency on platform bus as a config option,
> > that's likely what EMBEDDED was meant to do. Some platforms have platform
> > bus in spite of being !EMBEDDED, arch/arm/configs/rpc_defconfig seems
> > to be among those. PPC too.
> 
> If platform bus can't be configged out, then the only dependency should
> be the implicit one on ATA (is there anything else whose absence will
> stop the code from building, or working if the appropriate platform
> device is passed in?).

Sure, sounds good to me.


-Olof

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
  2007-12-04 21:03       ` Olof Johansson
@ 2007-12-20  3:53         ` Paul Mackerras
  -1 siblings, 0 replies; 57+ messages in thread
From: Paul Mackerras @ 2007-12-20  3:53 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

Olof Johansson writes:

> > FWIW I'm presuming this work will go via a powerpc tree not libata... 
> > Generally that's not the case, but here it's largely an arch-specific work.
> 
> Ok, that works. I was thinking of letting this patch go through libata,
> and do the removal through the powerpc merge path. But I can do both
> through powerpc.

Are you going to send me a patch to do this addition plus the removal
of the old stuff, or do you want me to merge this patch as is?

Paul.

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
@ 2007-12-20  3:53         ` Paul Mackerras
  0 siblings, 0 replies; 57+ messages in thread
From: Paul Mackerras @ 2007-12-20  3:53 UTC (permalink / raw)
  To: Olof Johansson
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

Olof Johansson writes:

> > FWIW I'm presuming this work will go via a powerpc tree not libata... 
> > Generally that's not the case, but here it's largely an arch-specific work.
> 
> Ok, that works. I was thinking of letting this patch go through libata,
> and do the removal through the powerpc merge path. But I can do both
> through powerpc.

Are you going to send me a patch to do this addition plus the removal
of the old stuff, or do you want me to merge this patch as is?

Paul.

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
  2007-12-20  3:53         ` Paul Mackerras
@ 2007-12-20 15:33           ` Olof Johansson
  -1 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-20 15:33 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Jeff Garzik, Arnd Bergmann, linux-ide, linuxppc-dev, Paul Mundt

On Thu, Dec 20, 2007 at 02:53:46PM +1100, Paul Mackerras wrote:
> Olof Johansson writes:
> 
> > > FWIW I'm presuming this work will go via a powerpc tree not libata... 
> > > Generally that's not the case, but here it's largely an arch-specific work.
> > 
> > Ok, that works. I was thinking of letting this patch go through libata,
> > and do the removal through the powerpc merge path. But I can do both
> > through powerpc.
> 
> Are you going to send me a patch to do this addition plus the removal
> of the old stuff, or do you want me to merge this patch as is?

Yes, I will once the series it depends on has been sorted out and is
picked up somewhere, since it depends on it.


-Olof

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

* Re: [PATCH] pata_of_platform: Move electra-ide support over to new framework
@ 2007-12-20 15:33           ` Olof Johansson
  0 siblings, 0 replies; 57+ messages in thread
From: Olof Johansson @ 2007-12-20 15:33 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: linux-ide, Paul Mundt, Arnd Bergmann, Jeff Garzik, linuxppc-dev

On Thu, Dec 20, 2007 at 02:53:46PM +1100, Paul Mackerras wrote:
> Olof Johansson writes:
> 
> > > FWIW I'm presuming this work will go via a powerpc tree not libata... 
> > > Generally that's not the case, but here it's largely an arch-specific work.
> > 
> > Ok, that works. I was thinking of letting this patch go through libata,
> > and do the removal through the powerpc merge path. But I can do both
> > through powerpc.
> 
> Are you going to send me a patch to do this addition plus the removal
> of the old stuff, or do you want me to merge this patch as is?

Yes, I will once the series it depends on has been sorted out and is
picked up somewhere, since it depends on it.


-Olof

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

end of thread, other threads:[~2007-12-20 15:26 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 17:04 [PATCH v2 0/4] OF-platform PATA driver Anton Vorontsov
2007-12-04 17:04 ` Anton Vorontsov
2007-12-04 17:06 ` [PATCH v2 1/4] [libata] pata_platform: make probe and remove functions device type neutral Anton Vorontsov
2007-12-04 17:06   ` Anton Vorontsov
2007-12-04 20:40   ` Olof Johansson
2007-12-04 20:40     ` Olof Johansson
2007-12-05 15:37   ` Anton Vorontsov
2007-12-05 15:37     ` Anton Vorontsov
2007-12-04 17:07 ` [PATCH v2 2/4] [libata] pata_of_platform: OF-Platform PATA device driver Anton Vorontsov
2007-12-04 17:07   ` Anton Vorontsov
2007-12-04 18:48   ` Olof Johansson
2007-12-04 18:48     ` Olof Johansson
2007-12-04 19:49     ` Anton Vorontsov
2007-12-04 19:49       ` Anton Vorontsov
2007-12-04 20:01       ` Olof Johansson
2007-12-04 20:01         ` Olof Johansson
2007-12-04 20:37         ` Anton Vorontsov
2007-12-04 20:37           ` Anton Vorontsov
2007-12-04 20:39           ` Olof Johansson
2007-12-04 20:39             ` Olof Johansson
2007-12-05  0:48         ` Paul Mundt
2007-12-05  0:48           ` Paul Mundt
2007-12-05  3:26           ` Olof Johansson
2007-12-05  3:26             ` Olof Johansson
2007-12-05 18:39           ` Scott Wood
2007-12-05 18:39             ` Scott Wood
2007-12-14  8:23             ` Olof Johansson
2007-12-14  8:23               ` Olof Johansson
2007-12-14 16:09               ` Scott Wood
2007-12-14 16:09                 ` Scott Wood
2007-12-14 16:33                 ` Olof Johansson
2007-12-14 16:33                   ` Olof Johansson
2007-12-04 17:07 ` [PATCH v2 3/4] [POWERPC] MPC8349E-mITX: introduce localbus and pata nodes Anton Vorontsov
2007-12-04 17:07   ` Anton Vorontsov
2007-12-04 19:16   ` Olof Johansson
2007-12-04 19:16     ` Olof Johansson
2007-12-04 19:23     ` Scott Wood
2007-12-04 19:45     ` Anton Vorontsov
2007-12-04 19:45       ` Anton Vorontsov
2007-12-04 20:40       ` Olof Johansson
2007-12-04 20:40         ` Olof Johansson
2007-12-04 17:07 ` [PATCH v2 4/4] [libata] pata_platform: s/ioport_shift/reg_shift/g Anton Vorontsov
2007-12-04 17:07   ` Anton Vorontsov
2007-12-04 17:08   ` Sergei Shtylyov
2007-12-04 17:08     ` Sergei Shtylyov
2007-12-05  0:56   ` Paul Mundt
2007-12-05  0:56     ` Paul Mundt
2007-12-04 20:44 ` [PATCH] pata_of_platform: Move electra-ide support over to new framework Olof Johansson
2007-12-04 20:44   ` Olof Johansson
2007-12-04 20:50   ` Jeff Garzik
2007-12-04 20:50     ` Jeff Garzik
2007-12-04 21:03     ` Olof Johansson
2007-12-04 21:03       ` Olof Johansson
2007-12-20  3:53       ` Paul Mackerras
2007-12-20  3:53         ` Paul Mackerras
2007-12-20 15:33         ` Olof Johansson
2007-12-20 15:33           ` Olof Johansson

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.