Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214390 > unrolled thread
| Started by | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| First post | 2015-08-27 10:50 +0200 |
| Last post | 2015-08-27 11:00 +0200 |
| Articles | 6 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/5] Fix broken DMAFLUSHP on Rockchips platform Shawn Lin <shawn.lin@rock-chips.com> - 2015-08-27 10:50 +0200
[PATCH 5/5] Documentation: arm-pl330: add description of broken-no-flushp Shawn Lin <shawn.lin@rock-chips.com> - 2015-08-27 11:00 +0200
Re: [PATCH 5/5] Documentation: arm-pl330: add description of broken-no-flushp Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-08-27 15:10 +0200
Re: [PATCH 5/5] Documentation: arm-pl330: add description of broken-no-flushp Shawn Lin <shawn.lin@rock-chips.com> - 2015-08-27 15:20 +0200
[PATCH 4/5] ARM: dts: Add broken-no-flushp quirk for rk3xxx platform Shawn Lin <shawn.lin@rock-chips.com> - 2015-08-27 11:00 +0200
[PATCH 3/5] ARM: dts: Add broken-no-flushp quirk for rk3288 platform Shawn Lin <shawn.lin@rock-chips.com> - 2015-08-27 11:00 +0200
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2015-08-27 10:50 +0200 |
| Subject | [PATCH 0/5] Fix broken DMAFLUSHP on Rockchips platform |
| Message-ID | <q212G-7MP-5@gated-at.bofh.it> |
The purpose of the DMAFLUSHP instruction: - Tell the peripheral to clear its status and control registers. - Send a message to the peripheral to resend its level status. There are 3 timings described in PL330 Technical Reference Manual: - Timing 1: Burst request, can work well without DMAFLUSHP. - Timing 2: Single and burst request, DMAC will ignore the single transfer request. This timing happens if there are single and burst request. - Timing 3: Single transfers for a burst request, DMAC should signals datype to request the peripheral to flush the contents of any control registers. This timing happens if there is not enough MFIFO to places the burst data. A peripheral may signal a DMA request during the execution of DMAFLUSHP instruction, that cause DMA request being ignored by DMAC. But DMAC and all peripherals on RK3X SoCs DO NOT support DMAFLUSHP. It can't send a message to the peripheral to resend DMA request, and the peripheral can't acknowledge a flush request from DMAC. So all DMA requests should NOT be ignored by DMAC, and DMAC will not notify the peripheral to flush. To fix this problem, we need: - Do NOT execute DMAFLUSHP instruction. - Timing 2 and timing 3 should not happen. Because on RK3X SoCs, there are 6 or below channels and 32 MFIFO depth for DMAC_BUS, and 8 channels and 64 MFIFO depth for DMAC_PERI, it is impossible to hit the timing 3 if burst length is equal or less than 4. Since the request type signal by the peripheral can only be set by software. We can set Rockchip Soc's GRF_PERIDMAC_CON0[2:1] to select single or burst request, if it is set b01, all of the peripharals will signal a brust request. So the timing 2 will not happen, too. So DMAC on RK3X can support single or burst transfer, but can't support mixed transfer. Because burst transfer is more efficient than single transfer, this is confirmed by our ASIC team, who strongly suggest to use burst transfer. And this is confirmed by Addy's test on RK3288-Pink2 board, the speed of spi flash burst transfer will increase about two times than single transfer. Also, I have tested dw_mmc with pl330 on RK3188 platform to double confirm the result. That means burst transfer is reansonable. So we need a quirk not to execute DMAFLUSHP instruction and to use burst transfer. Note: - The Rockchip Soc default value of GRF_PERIDMAC_CON0[2:1] is b01. To support brust transfer, these bits should not be changed in bootloader. Shawn Lin (5): DMA: pl330: support burst mode for dev-to-mem and mem-to-dev transmit DMA: pl330: add quirk for broken no flushp ARM: dts: Add broken-no-flushp quirk for rk3288 platform ARM: dts: Add broken-no-flushp quirk for rk3xxx platform Documentation: arm-pl330: add description of broken-no-flushp .../devicetree/bindings/dma/arm-pl330.txt | 1 + arch/arm/boot/dts/rk3288.dtsi | 3 + arch/arm/boot/dts/rk3xxx.dtsi | 3 + drivers/dma/pl330.c | 101 +++++++++++++++------ 4 files changed, 79 insertions(+), 29 deletions(-) -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2015-08-27 11:00 +0200 |
| Subject | [PATCH 5/5] Documentation: arm-pl330: add description of broken-no-flushp |
| Message-ID | <q21cl-7Y8-9@gated-at.bofh.it> |
| In reply to | #1214390 |
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
Documentation/devicetree/bindings/dma/arm-pl330.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt
index 2675658..0f19268 100644
--- a/Documentation/devicetree/bindings/dma/arm-pl330.txt
+++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt
@@ -15,6 +15,7 @@ Optional properties:
cells in the dmas property of client device.
- dma-channels: contains the total number of DMA channels supported by the DMAC
- dma-requests: contains the total number of DMA requests supported by the DMAC
+ - broken-no-flushp: quirk for avoiding to execute DMAFLUSHP
Example:
--
2.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-08-27 15:10 +0200 |
| Subject | Re: [PATCH 5/5] Documentation: arm-pl330: add description of broken-no-flushp |
| Message-ID | <q256i-5kI-31@gated-at.bofh.it> |
| In reply to | #1214395 |
2015-08-27 17:49 GMT+09:00 Shawn Lin <shawn.lin@rock-chips.com>: > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > --- > > Documentation/devicetree/bindings/dma/arm-pl330.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt > index 2675658..0f19268 100644 > --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt > +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt > @@ -15,6 +15,7 @@ Optional properties: > cells in the dmas property of client device. > - dma-channels: contains the total number of DMA channels supported by the DMAC > - dma-requests: contains the total number of DMA requests supported by the DMAC > + - broken-no-flushp: quirk for avoiding to execute DMAFLUSHP It looks like a device or vendor specific quirk so the property should have a prefix. For example: arm,pl330-broken-no-flushp Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2015-08-27 15:20 +0200 |
| Subject | Re: [PATCH 5/5] Documentation: arm-pl330: add description of broken-no-flushp |
| Message-ID | <q25fY-5vZ-29@gated-at.bofh.it> |
| In reply to | #1214559 |
On 2015/8/27 20:59, Krzysztof Kozlowski write: > 2015-08-27 17:49 GMT+09:00 Shawn Lin <shawn.lin@rock-chips.com>: >> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> >> --- >> >> Documentation/devicetree/bindings/dma/arm-pl330.txt | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm-pl330.txt >> index 2675658..0f19268 100644 >> --- a/Documentation/devicetree/bindings/dma/arm-pl330.txt >> +++ b/Documentation/devicetree/bindings/dma/arm-pl330.txt >> @@ -15,6 +15,7 @@ Optional properties: >> cells in the dmas property of client device. >> - dma-channels: contains the total number of DMA channels supported by the DMAC >> - dma-requests: contains the total number of DMA requests supported by the DMAC >> + - broken-no-flushp: quirk for avoiding to execute DMAFLUSHP > > It looks like a device or vendor specific quirk so the property should > have a prefix. For example: > arm,pl330-broken-no-flushp > Got it. Thanks, Krzysztof. > Best regards, > Krzysztof > > > -- Best Regards Shawn Lin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2015-08-27 11:00 +0200 |
| Subject | [PATCH 4/5] ARM: dts: Add broken-no-flushp quirk for rk3xxx platform |
| Message-ID | <q21cl-7Y8-11@gated-at.bofh.it> |
| In reply to | #1214390 |
Pl330 integrated in rk3xxx platform doesn't support
DMAFLUSHP function. So we add broken-no-flushp quirk
for it.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
cc: Heiko Stuebner <heiko@sntech.de>
cc: Doug Anderson <dianders@chromium.org>
cc: Olof Johansson <olofj@google.com>
---
arch/arm/boot/dts/rk3xxx.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/rk3xxx.dtsi b/arch/arm/boot/dts/rk3xxx.dtsi
index a2ae9f3..8bf9c71 100644
--- a/arch/arm/boot/dts/rk3xxx.dtsi
+++ b/arch/arm/boot/dts/rk3xxx.dtsi
@@ -79,6 +79,7 @@
#dma-cells = <1>;
clocks = <&cru ACLK_DMA1>;
clock-names = "apb_pclk";
+ broken-no-flushp;
};
dmac1_ns: dma-controller@2001c000 {
@@ -89,6 +90,7 @@
#dma-cells = <1>;
clocks = <&cru ACLK_DMA1>;
clock-names = "apb_pclk";
+ broken-no-flushp;
status = "disabled";
};
@@ -100,6 +102,7 @@
#dma-cells = <1>;
clocks = <&cru ACLK_DMA2>;
clock-names = "apb_pclk";
+ broken-no-flushp;
};
};
--
2.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Date | 2015-08-27 11:00 +0200 |
| Subject | [PATCH 3/5] ARM: dts: Add broken-no-flushp quirk for rk3288 platform |
| Message-ID | <q21cm-7Y8-21@gated-at.bofh.it> |
| In reply to | #1214390 |
Pl330 integrated in rk3288 platform doesn't support
DMAFLUSHP function. So we add broken-no-flushp quirk
for it.
Signed-off-by: Addy Ke <addy.ke@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
cc: Heiko Stuebner <heiko@sntech.de>
cc: Doug Anderson <dianders@chromium.org>
cc: Olof Johansson <olofj@google.com>
Reviewed-and-tested-by: Sonny Rao <sonnyrao@chromium.org>
---
arch/arm/boot/dts/rk3288.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 22316d0..c7ec98a 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -144,6 +144,7 @@
#dma-cells = <1>;
clocks = <&cru ACLK_DMAC2>;
clock-names = "apb_pclk";
+ broken-no-flushp;
};
dmac_bus_ns: dma-controller@ff600000 {
@@ -155,6 +156,7 @@
clocks = <&cru ACLK_DMAC1>;
clock-names = "apb_pclk";
status = "disabled";
+ broken-no-flushp;
};
dmac_bus_s: dma-controller@ffb20000 {
@@ -165,6 +167,7 @@
#dma-cells = <1>;
clocks = <&cru ACLK_DMAC1>;
clock-names = "apb_pclk";
+ broken-no-flushp;
};
};
--
2.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web