27cd2aff50f9d5f47a2860920e5690d9573d0adc
[openwrt/staging/dedeckeh.git] / target / linux / brcm2708 / patches-4.19 / 950-0709-ARM-bcm283x-Enable-DMA-support-for-SPI-controller.patch
1 From cce15c51f1afbb1aa9d5f7779c9f7c0a17b39701 Mon Sep 17 00:00:00 2001
2 From: Lukas Wunner <lukas@wunner.de>
3 Date: Thu, 9 May 2019 19:03:00 +0200
4 Subject: [PATCH] ARM: bcm283x: Enable DMA support for SPI controller
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Without this, the driver for the BCM2835 SPI controller uses interrupt
10 mode instead of DMA mode, incurring a significant performance penalty.
11 The Foundation's device tree has had these attributes for years, but for
12 some reason they were never upstreamed.
13
14 They were originally contributed by Noralf Trønnes and Martin Sperl:
15 https://github.com/raspberrypi/linux/commit/25f3e064afc8
16 https://github.com/raspberrypi/linux/commit/e0edb52b47e6
17
18 The DREQ numbers 6 and 7 are documented in section 4.2.1.3 of:
19 https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
20
21 Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
22 Signed-off-by: Lukas Wunner <lukas@wunner.de>
23 Reviewed-by: Eric Anholt <eric@anholt.net>
24 Reviewed-by: Martin Sperl <kernel@martin.sperl.org>
25 Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
26 Cc: Martin Sperl <kernel@martin.sperl.org>
27 Cc: Noralf Trønnes <noralf@tronnes.org>
28 ---
29 arch/arm/boot/dts/bcm283x.dtsi | 2 ++
30 1 file changed, 2 insertions(+)
31
32 --- a/arch/arm/boot/dts/bcm283x.dtsi
33 +++ b/arch/arm/boot/dts/bcm283x.dtsi
34 @@ -403,6 +403,8 @@
35 reg = <0x7e204000 0x200>;
36 interrupts = <2 22>;
37 clocks = <&clocks BCM2835_CLOCK_VPU>;
38 + dmas = <&dma 6>, <&dma 7>;
39 + dma-names = "tx", "rx";
40 #address-cells = <1>;
41 #size-cells = <0>;
42 status = "disabled";