From 2e534b21a51bad9d1fad125adac6ad49e64e1d7a Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Wed, 22 Jun 2011 22:41:31 +0800 Subject: dmaengine: imx-sdma: pass sdma firmware name via platform data It is not good to have cpu_name and to_version encoded into sdma firmware name as variables. For example, there are three TOs of imx51 soc, the sdma script never changes since TO1, which means all three TOs of imx51 uses TO1 version of sdma script. But we have to prepare three identical firmwares, sdma-imx51-to1.bin sdma-imx51-to2.bin and sdma-imx51-to3.bin, to have the kernel capable of running on all three TOs. The patch removes cpu_name and to_version from sdma platform data, and instead uses fw_name to pass the firmware name, so that we can pass the TO version where it's relevant and skip it where only one firmware exists. Signed-off-by: Shawn Guo Acked-by: Vinod Koul Signed-off-by: Sascha Hauer --- arch/arm/mach-mx5/mm.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-mx5') diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index aa848ea987e8..1b7059f1ac76 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c @@ -116,8 +116,7 @@ static struct sdma_script_start_addrs imx51_sdma_script __initdata = { static struct sdma_platform_data imx51_sdma_pdata __initdata = { .sdma_version = 2, - .cpu_name = "imx51", - .to_version = 1, + .fw_name = "sdma-imx51.bin", .script_addrs = &imx51_sdma_script, }; @@ -137,21 +136,17 @@ static struct sdma_script_start_addrs imx53_sdma_script __initdata = { static struct sdma_platform_data imx53_sdma_pdata __initdata = { .sdma_version = 2, - .cpu_name = "imx53", - .to_version = 1, + .fw_name = "sdma-imx53.bin", .script_addrs = &imx53_sdma_script, }; void __init imx51_soc_init(void) { - int to_version = mx51_revision() >> 4; - mxc_register_gpio(0, MX51_GPIO1_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO1_LOW, MX51_MXC_INT_GPIO1_HIGH); mxc_register_gpio(1, MX51_GPIO2_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO2_LOW, MX51_MXC_INT_GPIO2_HIGH); mxc_register_gpio(2, MX51_GPIO3_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO3_LOW, MX51_MXC_INT_GPIO3_HIGH); mxc_register_gpio(3, MX51_GPIO4_BASE_ADDR, SZ_16K, MX51_MXC_INT_GPIO4_LOW, MX51_MXC_INT_GPIO4_HIGH); - imx51_sdma_pdata.to_version = to_version; imx_add_imx_sdma(MX51_SDMA_BASE_ADDR, MX51_INT_SDMA, &imx51_sdma_pdata); } -- cgit v1.2.1