* [PATCH 0/2] Fix SSI audio function regression when using ROM firmware
@ 2014-01-08 8:45 Nicolin Chen
[not found] ` <1389170756-22351-1-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-01-08 8:45 ` [PATCH 2/2] dma: imx-sdma: Assign a default script number for ROM firmware cases Nicolin Chen
0 siblings, 2 replies; 8+ messages in thread
From: Nicolin Chen @ 2014-01-08 8:45 UTC (permalink / raw)
To: vinod.koul-ral2JQCrhuEAvxtiuMwx3w,
dan.j.williams-ral2JQCrhuEAvxtiuMwx3w,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, shawn.guo-QSEj5FYQhm4dnm+yROfE0A,
fabio.estevam-KZfg59tc24xl57MIdRCFDg
Cc: dmaengine-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Previously we added dual-fifo script support for SSI and SDMA, meanwhile, we
switched the default script in DT to this new script. However, there're still
quite a few people using the old version or even ROM firmware which means they
don't provide any firmware to SDMA driver. In these cases, the SDMA driver'd
fail to load essential script then the audio function broken.
This series of patches mainly fix this issue by assigning a default script
number for ROM firmware case and reverting the default script in DT so that
all kinds of users would continue to run it with or without firmware.
We might later need to figure out a better solution to ensure both SDMA driver
and SSI driver could adaptively switch the new script to the old one when V2
firmware isn't provided.
This series of patches are based on Vinod's repository.
Nicolin Chen (2):
Revert "ARM: dts: imx: use dual-fifo sdma script for ssi"
dma: imx-sdma: Assign a default script number for ROM firmware cases
arch/arm/boot/dts/imx51.dtsi | 4 ++--
arch/arm/boot/dts/imx53.dtsi | 4 ++--
arch/arm/boot/dts/imx6qdl.dtsi | 12 ++++++------
arch/arm/boot/dts/imx6sl.dtsi | 12 ++++++------
drivers/dma/imx-sdma.c | 4 ++++
5 files changed, 20 insertions(+), 16 deletions(-)
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] Revert "ARM: dts: imx: use dual-fifo sdma script for ssi"
[not found] ` <1389170756-22351-1-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-01-08 8:45 ` Nicolin Chen
2014-01-08 12:03 ` Fabio Estevam
2014-01-10 2:44 ` Shawn Guo
2014-01-13 9:22 ` [PATCH 0/2] Fix SSI audio function regression when using ROM firmware Vinod Koul
1 sibling, 2 replies; 8+ messages in thread
From: Nicolin Chen @ 2014-01-08 8:45 UTC (permalink / raw)
To: vinod.koul-ral2JQCrhuEAvxtiuMwx3w,
dan.j.williams-ral2JQCrhuEAvxtiuMwx3w,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, shawn.guo-QSEj5FYQhm4dnm+yROfE0A,
fabio.estevam-KZfg59tc24xl57MIdRCFDg
Cc: dmaengine-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
This reverts commit b1d27c79c8377df1880447375deffa3bb82c7bd3.
Previously we switched the SSI scriprt to dual-fifo mode to reduce playback
underrun issue, which is only included by SDMA firmware version 2. However,
there are quite a lot people still using version 1 or default firmware in
the ROM code of SoC while these two kinds of firmwares do not support the
dual-fifo script and the audio function on their platform would be broken.
Thus this patch provisionally reverts the dual-fifo script to the original
single fifo script to meet all kinds of users' requirements, including the
version 1/2 or inner ROM firmware.
Reported-by: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Signed-off-by: Nicolin Chen <Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
arch/arm/boot/dts/imx51.dtsi | 4 ++--
arch/arm/boot/dts/imx53.dtsi | 4 ++--
arch/arm/boot/dts/imx6qdl.dtsi | 12 ++++++------
arch/arm/boot/dts/imx6sl.dtsi | 12 ++++++------
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 5be2837..4bcdd3a 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -159,8 +159,8 @@
reg = <0x70014000 0x4000>;
interrupts = <30>;
clocks = <&clks 49>;
- dmas = <&sdma 24 22 0>,
- <&sdma 25 22 0>;
+ dmas = <&sdma 24 1 0>,
+ <&sdma 25 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 7208fde..4307e80 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -153,8 +153,8 @@
reg = <0x50014000 0x4000>;
interrupts = <30>;
clocks = <&clks 49>;
- dmas = <&sdma 24 22 0>,
- <&sdma 25 22 0>;
+ dmas = <&sdma 24 1 0>,
+ <&sdma 25 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
fsl,ssi-dma-events = <25 24 23 22>; /* TX0 RX0 TX1 RX1 */
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index e9534f2..fb28b2e 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -236,8 +236,8 @@
reg = <0x02028000 0x4000>;
interrupts = <0 46 0x04>;
clocks = <&clks 178>;
- dmas = <&sdma 37 22 0>,
- <&sdma 38 22 0>;
+ dmas = <&sdma 37 1 0>,
+ <&sdma 38 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
fsl,ssi-dma-events = <38 37>;
@@ -249,8 +249,8 @@
reg = <0x0202c000 0x4000>;
interrupts = <0 47 0x04>;
clocks = <&clks 179>;
- dmas = <&sdma 41 22 0>,
- <&sdma 42 22 0>;
+ dmas = <&sdma 41 1 0>,
+ <&sdma 42 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
fsl,ssi-dma-events = <42 41>;
@@ -262,8 +262,8 @@
reg = <0x02030000 0x4000>;
interrupts = <0 48 0x04>;
clocks = <&clks 180>;
- dmas = <&sdma 45 22 0>,
- <&sdma 46 22 0>;
+ dmas = <&sdma 45 1 0>,
+ <&sdma 46 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
fsl,ssi-dma-events = <46 45>;
diff --git a/arch/arm/boot/dts/imx6sl.dtsi b/arch/arm/boot/dts/imx6sl.dtsi
index 7b57fec..28558f1 100644
--- a/arch/arm/boot/dts/imx6sl.dtsi
+++ b/arch/arm/boot/dts/imx6sl.dtsi
@@ -199,8 +199,8 @@
reg = <0x02028000 0x4000>;
interrupts = <0 46 0x04>;
clocks = <&clks IMX6SL_CLK_SSI1>;
- dmas = <&sdma 37 22 0>,
- <&sdma 38 22 0>;
+ dmas = <&sdma 37 1 0>,
+ <&sdma 38 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
status = "disabled";
@@ -211,8 +211,8 @@
reg = <0x0202c000 0x4000>;
interrupts = <0 47 0x04>;
clocks = <&clks IMX6SL_CLK_SSI2>;
- dmas = <&sdma 41 22 0>,
- <&sdma 42 22 0>;
+ dmas = <&sdma 41 1 0>,
+ <&sdma 42 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
status = "disabled";
@@ -223,8 +223,8 @@
reg = <0x02030000 0x4000>;
interrupts = <0 48 0x04>;
clocks = <&clks IMX6SL_CLK_SSI3>;
- dmas = <&sdma 45 22 0>,
- <&sdma 46 22 0>;
+ dmas = <&sdma 45 1 0>,
+ <&sdma 46 1 0>;
dma-names = "rx", "tx";
fsl,fifo-depth = <15>;
status = "disabled";
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] dma: imx-sdma: Assign a default script number for ROM firmware cases
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 ` Nicolin Chen
[not found] ` <1389170756-22351-3-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
1 sibling, 1 reply; 8+ messages in thread
From: Nicolin Chen @ 2014-01-08 8:45 UTC (permalink / raw)
To: vinod.koul, dan.j.williams, kernel, shawn.guo, fabio.estevam
Cc: dmaengine, linux-kernel, devicetree, linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "ARM: dts: imx: use dual-fifo sdma script for ssi"
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
1 sibling, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2014-01-08 12:03 UTC (permalink / raw)
To: Nicolin Chen
Cc: Vinod Koul, Dan Williams, Sascha Hauer, Shawn Guo, Fabio Estevam,
dmaengine, devicetree@vger.kernel.org, linux-kernel,
linux-arm-kernel@lists.infradead.org
On Wed, Jan 8, 2014 at 6:45 AM, Nicolin Chen <Guangyu.Chen@freescale.com> wrote:
> This reverts commit b1d27c79c8377df1880447375deffa3bb82c7bd3.
>
> Previously we switched the SSI scriprt to dual-fifo mode to reduce playback
> underrun issue, which is only included by SDMA firmware version 2. However,
> there are quite a lot people still using version 1 or default firmware in
> the ROM code of SoC while these two kinds of firmwares do not support the
> dual-fifo script and the audio function on their platform would be broken.
>
> Thus this patch provisionally reverts the dual-fifo script to the original
> single fifo script to meet all kinds of users' requirements, including the
> version 1/2 or inner ROM firmware.
>
> Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Thanks, Nicolin.
This fixes audio playback without additional SDMA firmware:
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] dma: imx-sdma: Assign a default script number for ROM firmware cases
[not found] ` <1389170756-22351-3-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2014-01-08 12:03 ` Fabio Estevam
0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2014-01-08 12:03 UTC (permalink / raw)
To: Nicolin Chen
Cc: Vinod Koul, Dan Williams, Sascha Hauer, Shawn Guo, Fabio Estevam,
dmaengine-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
On Wed, Jan 8, 2014 at 6:45 AM, Nicolin Chen <Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org> wrote:
> 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-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Signed-off-by: Nicolin Chen <Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Thanks, Nicolin.
This fixes audio playback without additional SDMA firmware:
Tested-by: Fabio Estevam <fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "ARM: dts: imx: use dual-fifo sdma script for ssi"
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
1 sibling, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2014-01-10 2:44 UTC (permalink / raw)
To: Nicolin Chen
Cc: vinod.koul, dan.j.williams, kernel, fabio.estevam, dmaengine,
linux-kernel, devicetree, linux-arm-kernel
On Wed, Jan 08, 2014 at 04:45:55PM +0800, Nicolin Chen wrote:
> This reverts commit b1d27c79c8377df1880447375deffa3bb82c7bd3.
>
> Previously we switched the SSI scriprt to dual-fifo mode to reduce playback
> underrun issue, which is only included by SDMA firmware version 2. However,
> there are quite a lot people still using version 1 or default firmware in
> the ROM code of SoC while these two kinds of firmwares do not support the
> dual-fifo script and the audio function on their platform would be broken.
>
> Thus this patch provisionally reverts the dual-fifo script to the original
> single fifo script to meet all kinds of users' requirements, including the
> version 1/2 or inner ROM firmware.
>
> Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
If Vinod's tree can be rebased, the patch can just be dropped.
Otherwise,
Acked-by: Shawn Guo <shawn.guo@linaro.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "ARM: dts: imx: use dual-fifo sdma script for ssi"
2014-01-10 2:44 ` Shawn Guo
@ 2014-01-13 9:20 ` Vinod Koul
0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2014-01-13 9:20 UTC (permalink / raw)
To: Shawn Guo
Cc: Nicolin Chen, dan.j.williams, kernel, fabio.estevam, dmaengine,
linux-kernel, devicetree, linux-arm-kernel
On Fri, Jan 10, 2014 at 10:44:03AM +0800, Shawn Guo wrote:
> On Wed, Jan 08, 2014 at 04:45:55PM +0800, Nicolin Chen wrote:
> > This reverts commit b1d27c79c8377df1880447375deffa3bb82c7bd3.
> >
> > Previously we switched the SSI scriprt to dual-fifo mode to reduce playback
> > underrun issue, which is only included by SDMA firmware version 2. However,
> > there are quite a lot people still using version 1 or default firmware in
> > the ROM code of SoC while these two kinds of firmwares do not support the
> > dual-fifo script and the audio function on their platform would be broken.
> >
> > Thus this patch provisionally reverts the dual-fifo script to the original
> > single fifo script to meet all kinds of users' requirements, including the
> > version 1/2 or inner ROM firmware.
> >
> > Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
> > Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
>
> If Vinod's tree can be rebased, the patch can just be dropped.
Nope dont want Linus's ire due to rebaseing tree so late in cyle!
--
~Vinod
> Otherwise,
>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
>
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] Fix SSI audio function regression when using ROM firmware
[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-13 9:22 ` Vinod Koul
1 sibling, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2014-01-13 9:22 UTC (permalink / raw)
To: Nicolin Chen
Cc: dan.j.williams-ral2JQCrhuEAvxtiuMwx3w,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ, shawn.guo-QSEj5FYQhm4dnm+yROfE0A,
fabio.estevam-KZfg59tc24xl57MIdRCFDg,
dmaengine-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Wed, Jan 08, 2014 at 04:45:54PM +0800, Nicolin Chen wrote:
> Previously we added dual-fifo script support for SSI and SDMA, meanwhile, we
> switched the default script in DT to this new script. However, there're still
> quite a few people using the old version or even ROM firmware which means they
> don't provide any firmware to SDMA driver. In these cases, the SDMA driver'd
> fail to load essential script then the audio function broken.
>
> This series of patches mainly fix this issue by assigning a default script
> number for ROM firmware case and reverting the default script in DT so that
> all kinds of users would continue to run it with or without firmware.
>
> We might later need to figure out a better solution to ensure both SDMA driver
> and SSI driver could adaptively switch the new script to the old one when V2
> firmware isn't provided.
Applied both,
Thanks
--
~Vinod
>
> This series of patches are based on Vinod's repository.
>
> Nicolin Chen (2):
> Revert "ARM: dts: imx: use dual-fifo sdma script for ssi"
> dma: imx-sdma: Assign a default script number for ROM firmware cases
>
> arch/arm/boot/dts/imx51.dtsi | 4 ++--
> arch/arm/boot/dts/imx53.dtsi | 4 ++--
> arch/arm/boot/dts/imx6qdl.dtsi | 12 ++++++------
> arch/arm/boot/dts/imx6sl.dtsi | 12 ++++++------
> drivers/dma/imx-sdma.c | 4 ++++
> 5 files changed, 20 insertions(+), 16 deletions(-)
>
> --
> 1.8.4
>
>
--
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-01-13 9:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] dma: imx-sdma: Assign a default script number for ROM firmware cases Nicolin Chen
[not found] ` <1389170756-22351-3-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-01-08 12:03 ` Fabio Estevam
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).