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

Commit cb6dc512 authored by Grant Likely's avatar Grant Likely
Browse files

arch/powerpc: Move dma_mask from of_device into pdev_archdata



By moving dma_mask into pdev_archdata, and adding archdata to
struct of_device, it makes it possible to substitute of_device
with struct platform_device, which is a stepping stone to
removing the of_platform bus entirely.

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 58f9b0b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ struct dev_archdata {
};

struct pdev_archdata {
	u64 dma_mask;
};

#endif /* _ASM_POWERPC_DEVICE_H */
+1 −1
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@
 */
struct of_device
{
	u64			dma_mask;	/* DMA mask */
	struct device		dev;		/* Generic device interface */
	struct pdev_archdata	archdata;
};

extern struct of_device *of_device_alloc(struct device_node *np,
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ struct of_device *of_device_alloc(struct device_node *np,
		return NULL;

	dev->dev.of_node = of_node_get(np);
	dev->dev.dma_mask = &dev->dma_mask;
	dev->dev.dma_mask = &dev->archdata.dma_mask;
	dev->dev.parent = parent;
	dev->dev.release = of_release_dev;

+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
	if (!dev)
		return NULL;

	dev->dma_mask = 0xffffffffUL;
	dev->archdata.dma_mask = 0xffffffffUL;
	dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);

	dev->dev.bus = &of_platform_bus_type;
+2 −2
Original line number Diff line number Diff line
@@ -374,8 +374,8 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
	dev->bus = &chip->lbus;
	dev->media_bay = in_bay;
	dev->ofdev.dev.of_node = np;
	dev->ofdev.dma_mask = 0xffffffffUL;
	dev->ofdev.dev.dma_mask = &dev->ofdev.dma_mask;
	dev->ofdev.archdata.dma_mask = 0xffffffffUL;
	dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask;
	dev->ofdev.dev.parent = parent;
	dev->ofdev.dev.bus = &macio_bus_type;
	dev->ofdev.dev.release = macio_release_dev;
Loading