summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <festevam@gmail.com>2011-05-28 16:05:08 -0300
committerSascha Hauer <s.hauer@pengutronix.de>2011-06-06 09:50:04 +0200
commit5f85e931278ff80aa3ea7861a73a6c6ce940f2e9 (patch)
tree4306b5a86c5b23563bc1bf92552779dfdf87f69c
parentad377c630864e2609c54385907493dbf68a34295 (diff)
downloadop-kernel-dev-5f85e931278ff80aa3ea7861a73a6c6ce940f2e9.zip
op-kernel-dev-5f85e931278ff80aa3ea7861a73a6c6ce940f2e9.tar.gz
ARM: mx51/sdma: Check the chip revision in run-time
Check the MX51 chip revision in run-time so that the correct SDMA firmware can be loaded. While at it also remove the silicon revision from the sdma_script_start_addrs structure name for MX51. All the MX51 revisions share the same SDMA start addresses. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/plat-mxc/devices/platform-imx-dma.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-imx-dma.c b/arch/arm/plat-mxc/devices/platform-imx-dma.c
index 3538b85e..b130f60 100644
--- a/arch/arm/plat-mxc/devices/platform-imx-dma.c
+++ b/arch/arm/plat-mxc/devices/platform-imx-dma.c
@@ -139,7 +139,7 @@ static struct sdma_script_start_addrs addr_imx35_to2 = {
#endif
#ifdef CONFIG_SOC_IMX51
-static struct sdma_script_start_addrs addr_imx51_to1 = {
+static struct sdma_script_start_addrs addr_imx51 = {
.ap_2_ap_addr = 642,
.uart_2_mcu_addr = 817,
.mcu_2_app_addr = 747,
@@ -196,7 +196,9 @@ static int __init imxXX_add_imx_dma(void)
#if defined(CONFIG_SOC_IMX51)
if (cpu_is_mx51()) {
- imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51_to1;
+ int to_version = mx51_revision() >> 4;
+ imx51_imx_sdma_data.pdata.to_version = to_version;
+ imx51_imx_sdma_data.pdata.script_addrs = &addr_imx51;
ret = imx_add_imx_sdma(&imx51_imx_sdma_data);
} else
#endif
OpenPOWER on IntegriCloud