summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-06-22 22:41:31 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2011-07-07 10:01:12 +0200
commit2e534b21a51bad9d1fad125adac6ad49e64e1d7a (patch)
tree5320494ec94dd8a7a243c76d0cd93d663e2d23c3 /arch/arm/mach-imx
parent3622360430e90d47a0d028dd5333a13771589331 (diff)
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 <shawn.guo@linaro.org> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/mm-imx25.c3
-rw-r--r--arch/arm/mach-imx/mm-imx31.c9
-rw-r--r--arch/arm/mach-imx/mm-imx35.c9
3 files changed, 13 insertions, 8 deletions
diff --git a/arch/arm/mach-imx/mm-imx25.c b/arch/arm/mach-imx/mm-imx25.c
index 0c545207ce00..1e0c95651c23 100644
--- a/arch/arm/mach-imx/mm-imx25.c
+++ b/arch/arm/mach-imx/mm-imx25.c
@@ -80,8 +80,7 @@ static struct sdma_script_start_addrs imx25_sdma_script __initdata = {
static struct sdma_platform_data imx25_sdma_pdata __initdata = {
.sdma_version = 2,
- .cpu_name = "imx25",
- .to_version = 1,
+ .fw_name = "sdma-imx25.bin",
.script_addrs = &imx25_sdma_script,
};
diff --git a/arch/arm/mach-imx/mm-imx31.c b/arch/arm/mach-imx/mm-imx31.c
index 6af8519d3d6c..a1ff96f249d1 100644
--- a/arch/arm/mach-imx/mm-imx31.c
+++ b/arch/arm/mach-imx/mm-imx31.c
@@ -70,7 +70,7 @@ static struct sdma_script_start_addrs imx31_to2_sdma_script __initdata = {
static struct sdma_platform_data imx31_sdma_pdata __initdata = {
.sdma_version = 1,
- .cpu_name = "imx31",
+ .fw_name = "sdma-imx31-to2.bin",
.script_addrs = &imx31_to2_sdma_script,
};
@@ -82,8 +82,11 @@ void __init imx31_soc_init(void)
mxc_register_gpio(1, MX31_GPIO2_BASE_ADDR, SZ_16K, MX31_INT_GPIO2, 0);
mxc_register_gpio(2, MX31_GPIO3_BASE_ADDR, SZ_16K, MX31_INT_GPIO3, 0);
- imx31_sdma_pdata.to_version = to_version;
- if (to_version == 1)
+ if (to_version == 1) {
+ strncpy(imx31_sdma_pdata.fw_name, "sdma-imx31-to1.bin",
+ strlen(imx31_sdma_pdata.fw_name));
imx31_sdma_pdata.script_addrs = &imx31_to1_sdma_script;
+ }
+
imx_add_imx_sdma(MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
}
diff --git a/arch/arm/mach-imx/mm-imx35.c b/arch/arm/mach-imx/mm-imx35.c
index 9891adb52458..da530ca48aea 100644
--- a/arch/arm/mach-imx/mm-imx35.c
+++ b/arch/arm/mach-imx/mm-imx35.c
@@ -87,7 +87,7 @@ static struct sdma_script_start_addrs imx35_to2_sdma_script __initdata = {
static struct sdma_platform_data imx35_sdma_pdata __initdata = {
.sdma_version = 2,
- .cpu_name = "imx35",
+ .fw_name = "sdma-imx35-to2.bin",
.script_addrs = &imx35_to2_sdma_script,
};
@@ -99,8 +99,11 @@ void __init imx35_soc_init(void)
mxc_register_gpio(1, MX35_GPIO2_BASE_ADDR, SZ_16K, MX35_INT_GPIO2, 0);
mxc_register_gpio(2, MX35_GPIO3_BASE_ADDR, SZ_16K, MX35_INT_GPIO3, 0);
- imx35_sdma_pdata.to_version = to_version;
- if (to_version == 1)
+ if (to_version == 1) {
+ strncpy(imx35_sdma_pdata.fw_name, "sdma-imx35-to1.bin",
+ strlen(imx35_sdma_pdata.fw_name));
imx35_sdma_pdata.script_addrs = &imx35_to1_sdma_script;
+ }
+
imx_add_imx_sdma(MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata);
}