Rob,
On 18/02/2020 19:22, Rob Herring wrote:
On Tue, Feb 18, 2020 at 2:28 AM Roger Quadros <rogerq@xxxxxx> wrote:
Chrishtoph,
The branch works fine for SATA on DRA7 with CONFIG_LPAE once I
have the below DT fix.
Do you intend to send these fixes to -stable?
------------------------- arch/arm/boot/dts/dra7.dtsi -------------------------
index d78b684e7fca..853ecf3cfb37 100644
@@ -645,6 +645,8 @@
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ sata: sata@4a141100 {
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ compatible = "snps,dwc-ahci";
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ reg = <0x4a140000 0x1100>, <0x4a141100 0x7>;
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ #size-cells = <2>;
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ dma-ranges = <0x00000000 0x00000000 0x1 0x00000000>;
dma-ranges should be in the parent (bus) node, not the device node.
I didn't understand why.
There are many devices on the parent bus node and all devices might not have the 32-bit DMA limit
the SATA controller has.
SATA controller is the bus master and the ATA devices are children of the SATA controller.
From Documentation/devicetree/booting-without-of.txt
* DMA Bus master
Optional property:
- dma-ranges: <prop-encoded-array> encoded as arbitrary number of triplets of
ÂÂÂÂÂÂÂ (child-bus-address, parent-bus-address, length). Each triplet specified
ÂÂÂÂÂÂÂ describes a contiguous DMA address range.
ÂÂÂÂÂÂÂ The dma-ranges property is used to describe the direct memory access (DMA)
ÂÂÂÂÂÂÂ structure of a memory-mapped bus whose device tree parent can be accessed
ÂÂÂÂÂÂÂ from DMA operations originating from the bus. It provides a means of
ÂÂÂÂÂÂÂ defining a mapping or translation between the physical address space of
ÂÂÂÂÂÂÂ the bus and the physical address space of the parent of the bus.
ÂÂÂÂÂÂÂ (for more information see the Devicetree Specification)
* DMA Bus child
Optional property:
- dma-ranges: <empty> value. if present - It means that DMA addresses
ÂÂÂÂÂÂÂ translation has to be enabled for this device.