diff mbox

ARM: dts: rockchip: setup DMA-channels for mmc0 and emmc for rk3188

Message ID 1490109227-4006-1-git-send-email-al.kochet@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alexander Kochetkov March 21, 2017, 3:13 p.m. UTC
This commit enable DMA-based transfers for SD/eMMC card adapters
and reduce number of interrupts produced by SD-card/eMMC-card
adapters.

Sometimes interrupts from SD-card/eMMC-card adapters running in
PIO mode blocks execution of hrtimers and I2S DMA callbacks for
a long periods (100 ms or more).

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
 arch/arm/boot/dts/rk3188.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Heiko Stübner March 22, 2017, 3:54 p.m. UTC | #1
Hi Alexander,

Am Dienstag, 21. März 2017, 18:13:47 CET schrieb Alexander Kochetkov:
> This commit enable DMA-based transfers for SD/eMMC card adapters
> and reduce number of interrupts produced by SD-card/eMMC-card
> adapters.
> 
> Sometimes interrupts from SD-card/eMMC-card adapters running in
> PIO mode blocks execution of hrtimers and I2S DMA callbacks for
> a long periods (100 ms or more).
> 
> Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>

I've applied a slightly different variant in [0] with your commit message and
moved the dma properties to the mmc/emmc nodes in rk3xxx.dtsi - as the dma
channels are the same on both rk3188 and rk3066.

While at it, I've also added the sdio dma as there is no need to leave it out.


Also when changing the devicetree, please do not append stuff at the bottom
but instead sort new nodes (the &mmc &emmc in this case) and properties
alphabetically.


Thanks
Heiko

[0] https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/commit/?id=94bbdd77247d8c16eed5f55dddcf1cbc38d06cc4
Alexander Kochetkov March 22, 2017, 4:20 p.m. UTC | #2
Hello, Heiko!

> 22 марта 2017 г., в 18:54, Heiko Stuebner <heiko@sntech.de> написал(а):
> 
> I've applied a slightly different variant in [0] with your commit message and
> moved the dma properties to the mmc/emmc nodes in rk3xxx.dtsi - as the dma
> channels are the same on both rk3188 and rk3066.

Thank you! I had changes in the rk3xxx.dtsi initially, but them moved them
into rk3188. Don’t know why I did that. May be because I don’t have rk3066
based board to test on.

> While at it, I've also added the sdio dma as there is no need to leave it out.

I’ve tested mmc0 and emm and they work great. I haven’t tested sdio.

> 
> Also when changing the devicetree, please do not append stuff at the bottom
> but instead sort new nodes (the &mmc &emmc in this case) and properties
> alphabetically.

Ok. Thank you.

I have working settings for eMMC for radxa rock. What do you think, is it good idea to add them
to the kernel DT? As Radxa Rock doesn’t come with eMMC, but eMMC can be soldered manually.

Alexander.
Heiko Stübner March 22, 2017, 4:35 p.m. UTC | #3
Hi,

Am Mittwoch, 22. März 2017, 19:20:56 CET schrieb Alexander Kochetkov:
> Hello, Heiko!
> 
> > 22 марта 2017 г., в 18:54, Heiko Stuebner <heiko@sntech.de> написал(а):
> I have working settings for eMMC for radxa rock. What do you think, is it
> good idea to add them to the kernel DT? As Radxa Rock doesn’t come with
> eMMC, but eMMC can be soldered manually.

No, the Rock comes with a nand flash, which we hopefully will support at some 
point in the future. And in the mainline kernel we want to support the stock 
boards as people can buy them, not something people have soldered around on.


Heiko
diff mbox

Patch

diff --git a/arch/arm/boot/dts/rk3188.dtsi b/arch/arm/boot/dts/rk3188.dtsi
index 44da3d42..de786f8 100644
--- a/arch/arm/boot/dts/rk3188.dtsi
+++ b/arch/arm/boot/dts/rk3188.dtsi
@@ -638,3 +638,13 @@ 
 &wdt {
 	compatible = "rockchip,rk3188-wdt", "snps,dw-wdt";
 };
+
+&mmc0 {
+	dmas = <&dmac2 1>;
+	dma-names = "rx-tx";
+};
+
+&emmc {
+	dmas = <&dmac2 4>;
+	dma-names = "rx-tx";
+};