[RFC PATCH 01/11] macio: ensure all dma routines get copied over

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nishanth Aravamudan
Date: Friday, October 8, 2010 - 10:33 am

Also add a comment to dev_archdata, indicating that changes there need
to be verified against the driver code.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
---
 arch/powerpc/include/asm/device.h |    6 ++++++
 drivers/macintosh/macio_asic.c    |    7 +++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
index a3954e4..16d25c0 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -9,6 +9,12 @@
 struct dma_map_ops;
 struct device_node;
 
+/*
+ * Arch extensions to struct device.
+ *
+ * When adding fields, consider macio_add_one_device in
+ * drivers/macintosh/macio_asic.c
+ */
 struct dev_archdata {
 	/* DMA operations on that device */
 	struct dma_map_ops	*dma_ops;
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index b6e7ddc..18bf7a9 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -387,11 +387,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 	/* Set the DMA ops to the ones from the PCI device, this could be
 	 * fishy if we didn't know that on PowerMac it's always direct ops
 	 * or iommu ops that will work fine
+         *
+         * To get all the fields, copy all archdata
 	 */
-	dev->ofdev.dev.archdata.dma_ops =
-		chip->lbus.pdev->dev.archdata.dma_ops;
-	dev->ofdev.dev.archdata.dma_data =
-		chip->lbus.pdev->dev.archdata.dma_data;
+        dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata;
 #endif /* CONFIG_PCI */
 
 #ifdef DEBUG
-- 
1.7.1

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 00/11] ppc: enable dynamic dma window support, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 01/11] macio: ensure all dma routines get copie ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 02/11] ppc: allow direct and iommu to coexist, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 03/11] ppc: Create ops to choose between direct ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 04/11] ppc: add memory_hotplug_max, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 05/11] ppc: do not search for dma-window proper ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 06/11] ppc: checking for pdn-&gt;parent is redundant, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 07/11] ppc/iommu: do not need to check for dma_ ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 08/11] ppc/iommu: remove unneeded pci_dma_bus_s ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 09/11] ppc/iommu: pass phb only to iommu_table_ ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 10/11] ppc/iommu: add routines to pseries iommu ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 11/11] ppc: add dynamic dma window support, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
Re: [RFC PATCH 02/11] ppc: allow direct and iommu to coexist, Benjamin Herrenschmidt, (Fri Oct 8, 4:38 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Fri Oct 8, 4:43 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Fri Oct 8, 4:44 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Sun Oct 10, 4:41 pm)