Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6aedd86 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Benjamin Herrenschmidt
Browse files

powerpc/macio: Ensure all dma routines get copied over



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

Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent a8daac8a
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -9,6 +9,12 @@
struct dma_map_ops;
struct dma_map_ops;
struct device_node;
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 {
struct dev_archdata {
	/* DMA operations on that device */
	/* DMA operations on that device */
	struct dma_map_ops	*dma_ops;
	struct dma_map_ops	*dma_ops;
+3 −4
Original line number Original line Diff line number Diff line
@@ -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
	/* 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
	 * fishy if we didn't know that on PowerMac it's always direct ops
	 * or iommu ops that will work fine
	 * or iommu ops that will work fine
	 *
	 * To get all the fields, copy all archdata
	 */
	 */
	dev->ofdev.dev.archdata.dma_ops =
	dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata;
		chip->lbus.pdev->dev.archdata.dma_ops;
	dev->ofdev.dev.archdata.dma_data =
		chip->lbus.pdev->dev.archdata.dma_data;
#endif /* CONFIG_PCI */
#endif /* CONFIG_PCI */


#ifdef DEBUG
#ifdef DEBUG