diff options
author | Rob Herring <r.herring@freescale.com> | 2010-03-08 15:23:58 -0600 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 10:57:50 +0200 |
commit | bf3fa686ebca341e65af73920792b5054508f381 (patch) | |
tree | 8586dff269323d50cfd59cef8b4dfd5913d96513 /arch/arm/mach-mx5/devices.c | |
parent | d07c4c722170a8ad6cbe2aef5e99f38f2f8a1886 (diff) |
ENGR00121388 imx: make sdma a platform device
Convert sdma to a platform device and driver.
Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'arch/arm/mach-mx5/devices.c')
-rw-r--r-- | arch/arm/mach-mx5/devices.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c index ff78f3ca76e7..bcf7da7d36a3 100644 --- a/arch/arm/mach-mx5/devices.c +++ b/arch/arm/mach-mx5/devices.c @@ -95,6 +95,28 @@ void mxc_sdma_get_script_info(sdma_script_start_addrs * sdma_script_addr) sdma_script_addr->mxc_sdma_ram_code_size = RAM_CODE_SIZE; } +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, + }, +}; + +struct platform_device mxc_dma_device = { + .name = "mxc_sdma", + .id = -1, + .dev = { + .coherent_dma_mask = DMA_BIT_MASK(32), + }, + .num_resources = ARRAY_SIZE(sdma_resources), + .resource = sdma_resources, +}; + static struct resource mxc_w1_master_resources[] = { { .start = OWIRE_BASE_ADDR, |