summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/sdma
diff options
context:
space:
mode:
authorZeng Zhaoming <b32542@freescale.com>2010-10-15 09:09:00 +0800
committerZeng Zhaoming <b32542@freescale.com>2010-10-18 05:55:47 +0800
commitbb0e9ecb6138b79c8355ca1d78106685a9146d46 (patch)
treee0fc579dd51afd6282c087925d7a6baf122ebb2f /arch/arm/plat-mxc/sdma
parent021d31454b7cebff5645702f88bb1834e0441c5a (diff)
ENGR00131932-1 MX51, MX53, sdma: Upgrade SDMA scripts to v1.1.0 version
Upgrade sdma mx51 script to v1.1 http://compass.freescale.net/go/220269616 Upgrade sdma mx53 script to v1.1 http://compass.freescale.net/go/211002731 These new scripts support ssi dual fifo. Pan Qihong-B30266 provide the usage: ----------- mcu_2_ssiapp and ssiapp_2_mcu are supporting SSI tx/rx residing on peripheral DMA region. mcu_2_ssish and ssish_2_mcu are supporting SSI tx/rx residing on shared peripheral DMA region. With all these 4 scripts, will support all the 3 SSIs. ---------- Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/sdma')
-rw-r--r--arch/arm/plat-mxc/sdma/sdma.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/sdma/sdma.c b/arch/arm/plat-mxc/sdma/sdma.c
index 596810283431..a8191dabc4b3 100644
--- a/arch/arm/plat-mxc/sdma/sdma.c
+++ b/arch/arm/plat-mxc/sdma/sdma.c
@@ -303,8 +303,12 @@ static unsigned short sdma_get_pc(sdma_periphT peripheral_type,
default:
res = -EINVAL;
}
+#ifdef CONFIG_MXC_SSI_DUAL_FIFO
+ } else if (peripheral_type == CSPI || peripheral_type == EXT) {
+#else
} else if (peripheral_type == CSPI || peripheral_type == EXT ||
peripheral_type == SSI) {
+#endif
switch (transfer_type) {
case per_2_int:
res = sdma_script_addrs.mxc_sdma_app_2_per_addr;
@@ -321,9 +325,15 @@ static unsigned short sdma_get_pc(sdma_periphT peripheral_type,
default:
res = -EINVAL;
}
+#ifdef CONFIG_MXC_SSI_DUAL_FIFO
+ } else if (peripheral_type == MMC ||
+ peripheral_type == SDHC || peripheral_type == CSPI_SP ||
+ peripheral_type == ESAI || peripheral_type == MSHC_SP) {
+#else
} else if (peripheral_type == SSI_SP || peripheral_type == MMC ||
peripheral_type == SDHC || peripheral_type == CSPI_SP ||
peripheral_type == ESAI || peripheral_type == MSHC_SP) {
+#endif
switch (transfer_type) {
case per_2_int:
res = sdma_script_addrs.mxc_sdma_shp_2_per_addr;
@@ -392,6 +402,42 @@ static unsigned short sdma_get_pc(sdma_periphT peripheral_type,
} else {
res = -EINVAL;
}
+#ifdef CONFIG_MXC_SSI_DUAL_FIFO
+ } else if (peripheral_type == SSI) {
+ switch (transfer_type) {
+ case per_2_int:
+ res = sdma_script_addrs.mxc_sdma_ssiapp_2_mcu_addr;
+ break;
+ case per_2_emi:
+ res = sdma_script_addrs.mxc_sdma_ssiapp_2_mcu_addr;
+ break;
+ case int_2_per:
+ res = sdma_script_addrs.mxc_sdma_mcu_2_ssiapp_addr;
+ break;
+ case emi_2_per:
+ res = sdma_script_addrs.mxc_sdma_mcu_2_ssiapp_addr;
+ break;
+ default:
+ res = -EINVAL;
+ }
+ } else if (peripheral_type == SSI_SP) {
+ switch (transfer_type) {
+ case per_2_int:
+ res = sdma_script_addrs.mxc_sdma_ssish_2_mcu_addr;
+ break;
+ case int_2_per:
+ res = sdma_script_addrs.mxc_sdma_mcu_2_ssish_addr;
+ break;
+ case per_2_emi:
+ res = sdma_script_addrs.mxc_sdma_ssish_2_mcu_addr;
+ break;
+ case emi_2_per:
+ res = sdma_script_addrs.mxc_sdma_mcu_2_ssish_addr;
+ break;
+ default:
+ res = -EINVAL;
+ }
+#endif
}
if (res < 0) {