[U-Boot] [PATCH 00/23] ARM: tegra: Add PCIe support

Thierry Reding
2014-08-18T07:16:13Z

From: Thierry Reding <treding@nvidia.com>

This series adds PCIe support for Tegra20, Tegra30 and Tegra124. The size is
mostly due to the large number of infrastructure that's added (libfdt, Tegra
specific drivers required by the PCIe driver).

Patches 1-5 add various FDT helpers to make it easier to parse complex device
trees.

Patch 6 is a minor cleanup to the PCI command that prevents a spew of error
messages if a bus does not exist. Patch 7 modifies the PCI enumeration code
to honor theh restrictions encoded within a host controller driver's
pci_ski_dev() implementation. This is required to prevent exceptions from
the NVIDIA Tegra PCIe controller.

Patch 8 imports the pr_fmt() macro used within the Linux kernel to reduce
the number of characters consumed by literal strings by allowing a source
file to specify a prefix or suffix that should be applied to all format
strings in the file. It is currently used by the debug() and error() macros.

Patches 9-14 are preparatory work for the Tegra PCIe controller. They add
missing clock driver functionality as well as drivers for the Tegra powergate
and XUSB pad controller blocks.

Patch 15 adds the PCIe controller driver for Tegra20, Tegra30 and Tegra124.

Finally, patches 16-23 add the various device tree nodes and configuration
options to enable PCIe on the TrimSlice (Tegra20), Beaver, Cardhu (Tegra30)
and Jetson TK1 (Tegra124) boards.

The above boards all have an ethernet NIC connected to PCIe, which is what
I tested with. There are some cache maintenance issues related to that, but
a separate series will shortly be sent out to address those.

Thierry

Thierry Reding (23):
fdt: Add functions to query a node's #address- and #size-cells
fdt: Add a function to get the index of a string
fdt: Add resource parsing functions
fdt: Add a function to return PCI BDF triplet
fdt: Add a subnodes iterator macro
pci: Abort early if bus does not exist
pci: Honour pci_skip_dev()
Add pr_fmt() macro
ARM: tegra: Implement tegra_plle_enable()
ARM: tegra: Provide PCIEXCLK reset ID
ARM: tegra: Implement powergate support
ARM: tegra: Implement XUSB pad controller
ARM: tegra: Add XUSB pad controller on Tegra124
ARM: tegra: Enable XUSB pad controller on Jetson TK1
pci: tegra: Add Tegra PCIe driver
ARM: tegra: Add Tegra20 PCIe device tree node
ARM: tegra: Enable PCIe on TrimSlice
ARM: tegra: Add Tegra30 PCIe device tree node
ARM: tegra: Enable PCIe on Beaver
ARM: tegra: Enable PCIe on Cardhu
ARM: tegra: Add GIC for Tegra124
ARM: tegra: Add Tegra124 PCIe device tree node
ARM: tegra: Enable PCIe on Jetson TK1

arch/arm/cpu/tegra-common/Makefile | 2 +
arch/arm/cpu/tegra-common/powergate.c | 80 ++
arch/arm/cpu/tegra-common/xusb-padctl.c | 39 +
arch/arm/cpu/tegra124-common/Makefile | 1 +
arch/arm/cpu/tegra124-common/clock.c | 109 +++
arch/arm/cpu/tegra124-common/xusb-padctl.c | 766 +++++++++++++++
arch/arm/cpu/tegra20-common/clock.c | 141 ++-
arch/arm/cpu/tegra30-common/clock.c | 155 +++
arch/arm/dts/tegra124-jetson-tk1.dts | 373 +++++++
arch/arm/dts/tegra124.dtsi | 90 ++
arch/arm/dts/tegra20-trimslice.dts | 35 +
arch/arm/dts/tegra20.dtsi | 56 ++
arch/arm/dts/tegra30-beaver.dts | 166 ++++
arch/arm/dts/tegra30-cardhu.dts | 357 +++++++
arch/arm/dts/tegra30.dtsi | 71 ++
arch/arm/include/asm/arch-tegra/powergate.h | 27 +
arch/arm/include/asm/arch-tegra/xusb-padctl.h | 14 +
arch/arm/include/asm/arch-tegra114/powergate.h | 6 +
arch/arm/include/asm/arch-tegra114/xusb-padctl.h | 6 +
arch/arm/include/asm/arch-tegra124/clock.h | 2 +
arch/arm/include/asm/arch-tegra124/powergate.h | 6 +
arch/arm/include/asm/arch-tegra124/xusb-padctl.h | 6 +
arch/arm/include/asm/arch-tegra20/clock-tables.h | 2 +-
arch/arm/include/asm/arch-tegra20/clock.h | 2 +
arch/arm/include/asm/arch-tegra20/powergate.h | 6 +
arch/arm/include/asm/arch-tegra20/xusb-padctl.h | 6 +
arch/arm/include/asm/arch-tegra30/clock.h | 2 +
arch/arm/include/asm/arch-tegra30/powergate.h | 6 +
arch/arm/include/asm/arch-tegra30/xusb-padctl.h | 6 +
board/compulab/trimslice/trimslice.c | 8 +
board/nvidia/cardhu/cardhu.c | 56 ++
board/nvidia/common/board.c | 3 +
board/nvidia/jetson-tk1/jetson-tk1.c | 218 +++++
common/cmd_pci.c | 7 +
drivers/pci/Makefile | 1 +
drivers/pci/pci.c | 3 +
drivers/pci/pci_tegra.c | 1133 ++++++++++++++++++++++
include/common.h | 14 +-
include/configs/beaver.h | 10 +
include/configs/cardhu.h | 10 +
include/configs/jetson-tk1.h | 10 +
include/configs/trimslice.h | 10 +
include/dt-bindings/clock/tegra124-car.h | 341 +++++++
include/dt-bindings/clock/tegra20-car.h | 158 +++
include/dt-bindings/clock/tegra30-car.h | 265 +++++
include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h | 7 +
include/fdtdec.h | 64 ++
include/libfdt.h | 59 ++
include/pci.h | 1 +
lib/fdtdec.c | 61 ++
lib/libfdt/fdt_ro.c | 64 ++
51 files changed, 5033 insertions(+), 8 deletions(-)
create mode 100644 arch/arm/cpu/tegra-common/powergate.c
create mode 100644 arch/arm/cpu/tegra-common/xusb-padctl.c
create mode 100644 arch/arm/cpu/tegra124-common/xusb-padctl.c
create mode 100644 arch/arm/include/asm/arch-tegra/powergate.h
create mode 100644 arch/arm/include/asm/arch-tegra/xusb-padctl.h
create mode 100644 arch/arm/include/asm/arch-tegra114/powergate.h
create mode 100644 arch/arm/include/asm/arch-tegra114/xusb-padctl.h
create mode 100644 arch/arm/include/asm/arch-tegra124/powergate.h
create mode 100644 arch/arm/include/asm/arch-tegra124/xusb-padctl.h
create mode 100644 arch/arm/include/asm/arch-tegra20/powergate.h
create mode 100644 arch/arm/include/asm/arch-tegra20/xusb-padctl.h
create mode 100644 arch/arm/include/asm/arch-tegra30/powergate.h
create mode 100644 arch/arm/include/asm/arch-tegra30/xusb-padctl.h
create mode 100644 drivers/pci/pci_tegra.c
create mode 100644 include/dt-bindings/clock/tegra124-car.h
create mode 100644 include/dt-bindings/clock/tegra20-car.h
create mode 100644 include/dt-bindings/clock/tegra30-car.h
create mode 100644 include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h

--
2.0.4