Skip to content

Commit

Permalink
overlays: Add pcie-32bit-dma overlay
Browse files Browse the repository at this point in the history
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: #4197
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
  • Loading branch information
Nicolas Saenz Julienne authored and pelwell committed Mar 15, 2021
1 parent 4e05f95 commit 16991af
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,13 @@ Params: addr I2C address of expander. Default 0x20.
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. ]


Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/overlays/overlay_map.dts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
deprecated = "use gpio-ir";
};

pcie-32bit-dma {
bcm2711;
};

pi3-act-led {
renamed = "act-led";
};
Expand Down
18 changes: 18 additions & 0 deletions arch/arm/boot/dts/overlays/pcie-32bit-dma-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* pcie-32bit-dma-overlay.dts
*/

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2711";

fragment@0 {
target-path = "/aliases";
__overlay__ {
pcie0 = "";
};
};

};

0 comments on commit 16991af

Please sign in to comment.