From: Grant Likely Date: Tue, 13 Apr 2010 23:13:00 +0000 (-0700) Subject: arch/microblaze: Move dma_mask from of_device into pdev_archdata X-Git-Tag: v2.6.35-rc1~420^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=173b3a7a059a6998a6c0733710818c473cc0de4c;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 --- diff --git a/arch/microblaze/include/asm/device.h b/arch/microblaze/include/asm/device.h index 15b0058..123b2fe 100644 --- a/arch/microblaze/include/asm/device.h +++ b/arch/microblaze/include/asm/device.h @@ -18,6 +18,7 @@ struct dev_archdata { }; struct pdev_archdata { + u64 dma_mask; }; #endif /* _ASM_MICROBLAZE_DEVICE_H */ diff --git a/arch/microblaze/include/asm/of_device.h b/arch/microblaze/include/asm/of_device.h index ab25a40..73cb980 100644 --- a/arch/microblaze/include/asm/of_device.h +++ b/arch/microblaze/include/asm/of_device.h @@ -21,8 +21,8 @@ * probed using OF properties. */ struct of_device { - u64 dma_mask; /* DMA mask */ struct device dev; /* Generic device interface */ + struct pdev_archdata archdata; }; extern ssize_t of_device_get_modalias(struct of_device *ofdev, diff --git a/arch/microblaze/kernel/of_device.c b/arch/microblaze/kernel/of_device.c index ac7e6e1..b372787 100644 --- a/arch/microblaze/kernel/of_device.c +++ b/arch/microblaze/kernel/of_device.c @@ -50,7 +50,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; diff --git a/arch/microblaze/kernel/of_platform.c b/arch/microblaze/kernel/of_platform.c index 46a1e10..ccf6f42 100644 --- a/arch/microblaze/kernel/of_platform.c +++ b/arch/microblaze/kernel/of_platform.c @@ -47,7 +47,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.bus = &of_platform_bus_type; /* We do not fill the DMA ops for platform devices by default.