diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-01-08 09:45:56 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-01-13 10:22:04 +0100 |
commit | 70dabaede806e12881a527ef9460b293ec15af59 (patch) | |
tree | b7286fed3e60c6a785a24e5ef9a9eb41497ffc1b /drivers/dma | |
parent | Revert "ARM: dts: imx: use dual-fifo sdma script for ssi" (diff) | |
download | linux-70dabaede806e12881a527ef9460b293ec15af59.tar.xz linux-70dabaede806e12881a527ef9460b293ec15af59.zip |
dma: imx-sdma: Assign a default script number for ROM firmware cases
i.MX series have inner firmware in its ROM code: when SDMA isn't provided
any firmware from Kernel or rootfs, the default inner ROM firmware will be
activated. However the current driver doesn't assign any script number to
this situation, and those platform running in this case would be broken.
Thus this patch adds a default script number when no external firmware being
loaded so that people would continue to be able to use basic scripts to run
their platform without any firmware.
Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 152247675feb..4e7918339b12 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1252,6 +1252,10 @@ static void sdma_add_scripts(struct sdma_engine *sdma, s32 *saddr_arr = (u32 *)sdma->script_addrs; int i; + /* use the default firmware in ROM if missing external firmware */ + if (!sdma->script_number) + sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1; + for (i = 0; i < sdma->script_number; i++) if (addr_arr[i] > 0) saddr_arr[i] = addr_arr[i]; |