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 | |
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')
-rw-r--r-- | arch/arm/mach-mx5/devices.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-mx5/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_3stack.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mx5/mx51_babbage.c | 1 |
4 files changed, 25 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, diff --git a/arch/arm/mach-mx5/devices.h b/arch/arm/mach-mx5/devices.h index 52b07e8823a5..5a600527511a 100644 --- a/arch/arm/mach-mx5/devices.h +++ b/arch/arm/mach-mx5/devices.h @@ -17,6 +17,7 @@ * MA 02110-1301, USA. */ +extern struct platform_device mxc_dma_device; extern struct platform_device mxc_w1_master_device; extern struct platform_device mxc_keypad_device; extern struct platform_device mxc_rtc_device; diff --git a/arch/arm/mach-mx5/mx51_3stack.c b/arch/arm/mach-mx5/mx51_3stack.c index d91a9644003a..995cd36b220a 100644 --- a/arch/arm/mach-mx5/mx51_3stack.c +++ b/arch/arm/mach-mx5/mx51_3stack.c @@ -884,6 +884,7 @@ static void __init mxc_board_init(void) mxc_register_gpios(); mx51_3stack_io_init(); + mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); diff --git a/arch/arm/mach-mx5/mx51_babbage.c b/arch/arm/mach-mx5/mx51_babbage.c index 4ebe93e0b62a..c3f896a5900d 100644 --- a/arch/arm/mach-mx5/mx51_babbage.c +++ b/arch/arm/mach-mx5/mx51_babbage.c @@ -890,6 +890,7 @@ static void __init mxc_board_init(void) mxc_register_gpios(); mx51_babbage_io_init(); + mxc_register_device(&mxc_dma_device, NULL); mxc_register_device(&mxc_wdt_device, NULL); mxc_register_device(&mxcspi1_device, &mxcspi1_data); mxc_register_device(&mxci2c_devices[0], &mxci2c_data); |