wwan: fix hotplug event handling
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-5.4 / 950-0438-ARM-dts-bcm2711-fix-soc-s-node-dma-ranges.patch
1 From 44d7ee4730fbe3c00aba0457489acd0b6e2937c9 Mon Sep 17 00:00:00 2001
2 From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
3 Date: Wed, 4 Dec 2019 13:56:33 +0100
4 Subject: [PATCH] ARM: dts: bcm2711: fix soc's node dma-ranges
5
6 Raspberry Pi's firmware has a feature to select how much memory to
7 reserve for its GPU called 'gpu_mem'. The possible values go from 16MB
8 to 944MB, with a default of 64MB. This memory resides in the topmost
9 part of the lower 1GB memory area and grows bigger expanding towards the
10 begging of memory.
11
12 It turns out that with low 'gpu_mem' values (16MB and 32MB) the size of
13 the memory available to the system in the lower 1GB area can outgrow the
14 interconnect's dma-range as its size was selected based on the maximum
15 system memory available given the default gpu_mem configuration. This
16 makes that memory slice unavailable for DMA. And may cause nasty kernel
17 warnings if CMA happens to include it.
18
19 Change soc's dma-ranges to really reflect it's HW limitation, which is
20 being able to only DMA to the lower 1GB area.
21
22 Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
23 Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
24 Reviewed-by: Phil Elwell <phil@raspberrypi.org>
25 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
26 ---
27 arch/arm/boot/dts/bcm2711.dtsi | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 --- a/arch/arm/boot/dts/bcm2711.dtsi
31 +++ b/arch/arm/boot/dts/bcm2711.dtsi
32 @@ -43,7 +43,7 @@
33 <0x7c000000 0x0 0xfc000000 0x02000000>,
34 <0x40000000 0x0 0xff800000 0x00800000>;
35 /* Emulate a contiguous 30-bit address range for DMA */
36 - dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>;
37 + dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>;
38
39 /*
40 * This node is the provider for the enable-method for