aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 10:54:34 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 19:07:07 +0200
commit8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch)
tree1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch
parent33b6885975ce376ff075362b7f0890326043111b (diff)
downloadupstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch b/target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch
new file mode 100644
index 0000000000..0186a0b81b
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.10/950-0508-overlays-Add-pcie-32bit-dma-overlay.patch
@@ -0,0 +1,86 @@
+From ce2860020c57a59c543139ad7b260624cd930dff Mon Sep 17 00:00:00 2001
+From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Date: Mon, 15 Mar 2021 17:25:02 +0100
+Subject: [PATCH] overlays: Add pcie-32bit-dma overlay
+
+In order to accommodate full PCI DMA access to memory on newer BCM2711
+revisions, we're forced to map PCIe's view of physical memory with an
+offset. This offset makes DMA addressing dependent on having 64bit
+support on the PCI device's side. Which isn't always the case.
+
+In order to mitigate this, introduce the pcie-32bit-dma overlay which
+will forbid firmware from updating the default inbound memory window.
+The default setting, albeit limited to accessing the lower 3GB of
+memory, will allow for 32bit DMA addresses at the expense of having to
+bounce buffers.
+
+Link: https://github.com/raspberrypi/linux/issues/4197
+Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+---
+ arch/arm/boot/dts/overlays/Makefile | 1 +
+ arch/arm/boot/dts/overlays/README | 7 +++++++
+ arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++++
+ .../dts/overlays/pcie-32bit-dma-overlay.dts | 18 ++++++++++++++++++
+ 4 files changed, 30 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -128,6 +128,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ ov9281.dtbo \
+ papirus.dtbo \
+ pca953x.dtbo \
++ pcie-32bit-dma.dtbo \
+ pibell.dtbo \
+ pifacedigital.dtbo \
+ pifi-40.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -2135,6 +2135,13 @@ Params: addr I2C addr
+ xra1202 Select the Exar XRA1202 (8 bit)
+
+
++Name: pcie-32bit-dma
++Info: Force PCIe config to support 32bit DMA addresses at the expense of
++ having to bounce buffers.
++Load: dtoverlay=pcie-32bit-dma
++Params: <None>
++
++
+ [ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ]
+
+
+--- a/arch/arm/boot/dts/overlays/overlay_map.dts
++++ b/arch/arm/boot/dts/overlays/overlay_map.dts
+@@ -37,6 +37,10 @@
+ deprecated = "use gpio-ir";
+ };
+
++ pcie-32bit-dma {
++ bcm2711;
++ };
++
+ pi3-act-led {
+ renamed = "act-led";
+ };
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts
+@@ -0,0 +1,18 @@
++/*
++ * pcie-32bit-dma-overlay.dts
++ */
++
++/dts-v1/;
++/plugin/;
++
++/ {
++ compatible = "brcm,bcm2711";
++
++ fragment@0 {
++ target-path = "/aliases";
++ __overlay__ {
++ pcie0 = "";
++ };
++ };
++
++};