linux/drivers/pci/host
Kishon Vijay Abraham I f4c55c5a3f PCI: designware: Program ATU with untranslated address
In DRA7, the CPU sees 32-bit addresses, but the PCIe controller can see
only 28-bit addresses.  So whenever the CPU issues a read/write request,
the 4 most significant bits are used by L3 to determine the target
controller.  For example, the CPU reserves [mem 0x20000000-0x2fffffff]
for the PCIe controller but the PCIe controller will see only
[0x00000000-0x0fffffff].  For programming the outbound translation
window the *base* should be programmed as 0x00000000.  Whenever we try to
write to, e.g., 0x20000000, it will be translated to whatever we have
programmed in the translation window with base as 0x00000000.

This is needed when the dt node is modelled something like this:

    axi {
        compatible = "simple-bus";
        #size-cells = <1>;
        #address-cells = <1>;
        ranges = <0x0        0x20000000 0x10000000 // 28-bit bus
                  0x51000000 0x51000000 0x3000>;
        pcie@51000000 {
                reg = <0x1000 0x2000>, <0x51002000 0x14c>, <0x51000000 0x2000>;
                reg-names = "config", "ti_conf", "rc_dbics";
                #address-cells = <3>;
                #size-cells = <2>;
                ranges = <0x81000000 0 0          0x03000 0 0x00010000
                          0x82000000 0 0x20013000 0x13000 0 0xffed000>;
        };
    };

Here the CPU address for configuration space is 0x20013000 and the
controller address for configuration space is 0x13000.  The controller
address should be used while programming the ATU (in order for translation
to happen properly in DRA7xx).

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mohit Kumar <mohit.kumar@st.com>
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Arnd Bergmann <arnd@arndb.de>
2014-07-22 15:26:24 -06:00
..
Kconfig Merge branch 'pci/host-generic' into next 2014-05-30 11:40:13 -06:00
Makefile Merge branch 'pci/host-generic' into next 2014-05-30 11:40:13 -06:00
pci-exynos.c Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pci-host-generic.c PCI: generic: Add generic PCI host controller driver 2014-05-30 11:34:49 -06:00
pci-imx6.c Merge branches 'pci/host-designware', 'pci/host-imx6', 'pci/host-mvebu' and 'pci/host-tegra' into next 2014-06-03 08:45:42 -06:00
pci-mvebu.c PCI: Whitespace cleanup 2014-06-10 20:20:19 -06:00
pci-rcar-gen2.c PCI: rcar: Add gen2 device tree support 2014-05-28 07:47:55 -06:00
pci-tegra.c PCI: tegra: Use new OF interrupt mapping when possible 2014-04-14 14:56:51 -06:00
pcie-designware.c PCI: designware: Program ATU with untranslated address 2014-07-22 15:26:24 -06:00
pcie-designware.h PCI: designware: Program ATU with untranslated address 2014-07-22 15:26:24 -06:00
pcie-rcar.c PCI: Merge multi-line quoted strings 2014-06-10 20:20:42 -06:00