arch/microblaze: 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: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
cb6dc512b7
commit
173b3a7a05
@ -18,6 +18,7 @@ struct dev_archdata {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct pdev_archdata {
|
struct pdev_archdata {
|
||||||
|
u64 dma_mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _ASM_MICROBLAZE_DEVICE_H */
|
#endif /* _ASM_MICROBLAZE_DEVICE_H */
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
* probed using OF properties.
|
* probed using OF properties.
|
||||||
*/
|
*/
|
||||||
struct of_device {
|
struct of_device {
|
||||||
u64 dma_mask; /* DMA mask */
|
|
||||||
struct device dev; /* Generic device interface */
|
struct device dev; /* Generic device interface */
|
||||||
|
struct pdev_archdata archdata;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ssize_t of_device_get_modalias(struct of_device *ofdev,
|
extern ssize_t of_device_get_modalias(struct of_device *ofdev,
|
||||||
|
@ -50,7 +50,7 @@ struct of_device *of_device_alloc(struct device_node *np,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dev->dev.of_node = of_node_get(np);
|
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.parent = parent;
|
||||||
dev->dev.release = of_release_dev;
|
dev->dev.release = of_release_dev;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ struct of_device *of_platform_device_create(struct device_node *np,
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dev->dma_mask = 0xffffffffUL;
|
dev->archdata.dma_mask = 0xffffffffUL;
|
||||||
dev->dev.bus = &of_platform_bus_type;
|
dev->dev.bus = &of_platform_bus_type;
|
||||||
|
|
||||||
/* We do not fill the DMA ops for platform devices by default.
|
/* We do not fill the DMA ops for platform devices by default.
|
||||||
|
Loading…
Reference in New Issue
Block a user