From: Nicolin Chen <Guangyu.Chen@freescale.com>
To: vinod.koul@intel.com, dan.j.williams@intel.com,
kernel@pengutronix.de, shawn.guo@linaro.org,
fabio.estevam@freescale.com
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] dma: imx-sdma: Assign a default script number for ROM firmware cases
Date: Wed, 8 Jan 2014 16:45:56 +0800 [thread overview]
Message-ID: <1389170756-22351-3-git-send-email-Guangyu.Chen@freescale.com> (raw)
In-Reply-To: <1389170756-22351-1-git-send-email-Guangyu.Chen@freescale.com>
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>
---
drivers/dma/imx-sdma.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 1522476..4e79183 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];
--
1.8.4
next prev parent reply other threads:[~2014-01-08 8:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 8:45 [PATCH 0/2] Fix SSI audio function regression when using ROM firmware Nicolin Chen
[not found] ` <1389170756-22351-1-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-01-08 8:45 ` [PATCH 1/2] Revert "ARM: dts: imx: use dual-fifo sdma script for ssi" Nicolin Chen
2014-01-08 12:03 ` Fabio Estevam
2014-01-10 2:44 ` Shawn Guo
2014-01-13 9:20 ` Vinod Koul
2014-01-13 9:22 ` [PATCH 0/2] Fix SSI audio function regression when using ROM firmware Vinod Koul
2014-01-08 8:45 ` Nicolin Chen [this message]
[not found] ` <1389170756-22351-3-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-01-08 12:03 ` [PATCH 2/2] dma: imx-sdma: Assign a default script number for ROM firmware cases Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389170756-22351-3-git-send-email-Guangyu.Chen@freescale.com \
--to=guangyu.chen@freescale.com \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=fabio.estevam@freescale.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@linaro.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).