diff options
Diffstat (limited to 'arch/arm/mach-mx3/devices.c')
-rw-r--r-- | arch/arm/mach-mx3/devices.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index 8124741a61c7..a5eafff77a1c 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/io.h> +#include <linux/dma-mapping.h> #include <linux/platform_device.h> #include <linux/clk.h> #include <linux/pmic_external.h> @@ -116,6 +117,32 @@ void mxc_sdma_get_script_info(sdma_script_start_addrs * sdma_script_addr) } } +static struct resource sdma_resources[] = { + { + .start = SDMA_BASE_ADDR, + .end = SDMA_BASE_ADDR + SZ_4K - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = MXC_INT_SDMA, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device mxc_dma_device = { + .name = "mxc_sdma", + .dev = { + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .num_resources = ARRAY_SIZE(sdma_resources), + .resource = sdma_resources, +}; + +static inline void mxc_init_dma(void) +{ + (void)platform_device_register(&mxc_dma_device); +} + static void mxc_nop_release(struct device *dev) { /* Nothing */ @@ -697,19 +724,6 @@ static inline void mxc_init_hmp4e(void) } #endif -static struct platform_device mxc_dma_device = { - .name = "mxc_dma", - .id = 0, - .dev = { - .release = mxc_nop_release, - }, -}; - -static inline void mxc_init_dma(void) -{ - (void)platform_device_register(&mxc_dma_device); -} - /*! * Resource definition for the DPTC LP */ |