Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2df02bd authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branches 'pci/host-altera', 'pci/host-designware', 'pci/host-generic',...

Merge branches 'pci/host-altera', 'pci/host-designware', 'pci/host-generic', 'pci/host-imx6', 'pci/host-iproc', 'pci/host-mvebu', 'pci/host-rcar', 'pci/host-tegra' and 'pci/host-xgene' into next

* pci/host-altera:
  PCI: altera: Add Altera PCIe MSI driver
  PCI: altera: Add Altera PCIe host controller driver
  ARM: Add msi.h to Kbuild

* pci/host-designware:
  PCI: designware: Make "clocks" and "clock-names" optional DT properties
  PCI: designware: Make driver arch-agnostic
  ARM/PCI: Replace pci_sys_data->align_resource with global function pointer
  PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT
  Revert "PCI: designware: Program ATU with untranslated address"
  PCI: designware: Move calculation of bus addresses to DRA7xx
  PCI: designware: Make "num-lanes" an optional DT property
  PCI: designware: Require config accesses to be naturally aligned
  PCI: designware: Simplify dw_pcie_cfg_read/write() interfaces
  PCI: designware: Use exact access size in dw_pcie_cfg_read()
  PCI: spear: Fix dw_pcie_cfg_read/write() usage
  PCI: designware: Set up high part of MSI target address
  PCI: designware: Make get_msi_addr() return phys_addr_t, not u32
  PCI: designware: Implement multivector MSI IRQ setup
  PCI: designware: Factor out MSI msg setup
  PCI: Add msi_controller setup_irqs() method for special multivector setup
  PCI: designware: Fix PORT_LOGIC_LINK_WIDTH_MASK

* pci/host-generic:
  PCI: generic: Fix address window calculation for non-zero starting bus
  PCI: generic: Pass starting bus number to pci_scan_root_bus()
  PCI: generic: Allow multiple hosts with different map_bus() methods
  arm64: dts: Drop linux,pci-probe-only from the Seattle DTS
  powerpc/PCI: Fix lookup of linux,pci-probe-only property
  PCI: generic: Fix lookup of linux,pci-probe-only property
  of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

* pci/host-imx6:
  PCI: imx6: Add PCIE_PHY_RX_ASIC_OUT_VALID definition
  PCI: imx6: Return real error code from imx6_add_pcie_port()

* pci/host-iproc:
  PCI: iproc: Fix header comment "Corporation" misspelling
  PCI: iproc: Add outbound mapping support
  PCI: iproc: Update PCIe device tree bindings
  PCI: iproc: Improve link detection logic
  PCI: iproc: Fix PCIe reset logic
  PCI: iproc: Call pci_fixup_irqs() for ARM64 as well as ARM
  PCI: iproc: Remove unused struct iproc_pcie.irqs[]
  PCI: iproc: Fix code comment to match code

* pci/host-mvebu:
  PCI: mvebu: Remove code restricting accesses to slot 0
  PCI: mvebu: Add PCI Express root complex capability block
  PCI: mvebu: Improve clock/reset handling
  PCI: mvebu: Use gpio_desc to carry around gpio
  PCI: mvebu: Use devm_kcalloc() to allocate an array
  PCI: mvebu: Use gpio_set_value_cansleep()
  PCI: mvebu: Split port parsing and resource claiming from  port setup
  PCI: mvebu: Fix memory leaks and refcount leaks
  PCI: mvebu: Move port parsing and resource claiming to  separate function
  PCI: mvebu: Use port->name rather than "PCIe%d.%d"
  PCI: mvebu: Report full node name when reporting a DT error
  PCI: mvebu: Use for_each_available_child_of_node() to walk child nodes
  PCI: mvebu: Use of_get_available_child_count()
  PCI: mvebu: Use exact config access size; don't read/modify/write
  PCI: mvebu: Return zero for reserved or unimplemented config space

* pci/host-rcar:
  PCI: rcar: Fix I/O offset for multiple host bridges
  PCI: rcar: Set root bus nr to that provided in DT
  PCI: rcar: Remove dependency on ARM-specific struct hw_pci
  PCI: rcar: Make PCI aware of the I/O resources
  PCI: rcar: Build pcie-rcar.c only on ARM
  PCI: rcar: Build pci-rcar-gen2.c only on ARM

* pci/host-tegra:
  PCI: tegra: Wrap static pgprot_t initializer with __pgprot()

* pci/host-xgene:
  PCI/MSI: xgene: Remove msi_controller assignment
Loading
+28 −0
Original line number Diff line number Diff line
* Altera PCIe MSI controller

Required properties:
- compatible:	should contain "altr,msi-1.0"
- reg:		specifies the physical base address of the controller and
		the length of the memory mapped region.
- reg-names:	must include the following entries:
		"csr": CSR registers
		"vector_slave": vectors slave port region
- interrupt-parent:	interrupt source phandle.
- interrupts:	specifies the interrupt source of the parent interrupt
		controller. The format of the interrupt specifier depends on the
		parent interrupt controller.
- num-vectors:	number of vectors, range 1 to 32.
- msi-controller:	indicates that this is MSI controller node


Example
msi0: msi@0xFF200000 {
	compatible = "altr,msi-1.0";
	reg = <0xFF200000 0x00000010
		0xFF200010 0x00000080>;
	reg-names = "csr", "vector_slave";
	interrupt-parent = <&hps_0_arm_gic_0>;
	interrupts = <0 42 4>;
	msi-controller;
	num-vectors = <32>;
};
+49 −0
Original line number Diff line number Diff line
* Altera PCIe controller

Required properties:
- compatible :	should contain "altr,pcie-root-port-1.0"
- reg:		a list of physical base address and length for TXS and CRA.
- reg-names:	must include the following entries:
		"Txs": TX slave port region
		"Cra": Control register access region
- interrupt-parent:	interrupt source phandle.
- interrupts:	specifies the interrupt source of the parent interrupt controller.
		The format of the interrupt specifier depends on the parent interrupt
		controller.
- device_type:	must be "pci"
- #address-cells:	set to <3>
- #size-cells:	set to <2>
- #interrupt-cells:	set to <1>
- ranges:		describes the translation of addresses for root ports and standard
		PCI regions.
- interrupt-map-mask and interrupt-map: standard PCI properties to define the
		mapping of the PCIe interface to interrupt numbers.

Optional properties:
- msi-parent:	Link to the hardware entity that serves as the MSI controller for this PCIe
		controller.
- bus-range:	PCI bus numbers covered

Example
	pcie_0: pcie@0xc00000000 {
		compatible = "altr,pcie-root-port-1.0";
		reg = <0xc0000000 0x20000000>,
			<0xff220000 0x00004000>;
		reg-names = "Txs", "Cra";
		interrupt-parent = <&hps_0_arm_gic_0>;
		interrupts = <0 40 4>;
		interrupt-controller;
		#interrupt-cells = <1>;
		bus-range = <0x0 0xFF>;
		device_type = "pci";
		msi-parent = <&msi_to_gic_gen_0>;
		#address-cells = <3>;
		#size-cells = <2>;
		interrupt-map-mask = <0 0 0 7>;
		interrupt-map = <0 0 0 1 &pcie_0 1>,
			            <0 0 0 2 &pcie_0 2>,
			            <0 0 0 3 &pcie_0 3>,
			            <0 0 0 4 &pcie_0 4>;
		ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000
			    0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>;
	};
+20 −0
Original line number Diff line number Diff line
@@ -17,6 +17,21 @@ Optional properties:
- phys: phandle of the PCIe PHY device
- phy-names: must be "pcie-phy"

- brcm,pcie-ob: Some iProc SoCs do not have the outbound address mapping done
by the ASIC after power on reset. In this case, SW needs to configure it

If the brcm,pcie-ob property is present, the following properties become
effective:

Required:
- brcm,pcie-ob-axi-offset: The offset from the AXI address to the internal
address used by the iProc PCIe core (not the PCIe address)
- brcm,pcie-ob-window-size: The outbound address mapping window size (in MB)

Optional:
- brcm,pcie-ob-oarr-size: Some iProc SoCs need the OARR size bit to be set to
increase the outbound window size

Example:
	pcie0: pcie@18012000 {
		compatible = "brcm,iproc-pcie";
@@ -38,6 +53,11 @@ Example:

		phys = <&phy 0 5>;
		phy-names = "pcie-phy";

		brcm,pcie-ob;
		brcm,pcie-ob-oarr-size;
		brcm,pcie-ob-axi-offset = <0x00000000>;
		brcm,pcie-ob-window-size = <256>;
	};

	pcie1: pcie@18013000 {
+7 −5
Original line number Diff line number Diff line
@@ -15,14 +15,16 @@ Required properties:
	to define the mapping of the PCIe interface to interrupt
	numbers.
- num-lanes: number of lanes to use
- clocks: Must contain an entry for each entry in clock-names.
	See ../clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
	- "pcie"
	- "pcie_bus"

Optional properties:
- num-lanes: number of lanes to use (this property should be specified unless
  the link is brought already up in BIOS)
- reset-gpio: gpio pin number of power good signal
- bus-range: PCI bus numbers covered (it is recommended for new devicetrees to
  specify this property, to keep backwards compatibility a range of 0x00-0xff
  is assumed if not present)
- clocks: Must contain an entry for each entry in clock-names.
	See ../clocks/clock-bindings.txt for details.
- clock-names: Must include the following entries:
	- "pcie"
	- "pcie_bus"
+3 −2
Original line number Diff line number Diff line
@@ -34,8 +34,9 @@ Properties of the host controller node:
- #size-cells    : Must be 2.

- reg            : The Configuration Space base address and size, as accessed
                   from the parent bus.

                   from the parent bus.  The base address corresponds to
                   the first bus in the "bus-range" property.  If no
                   "bus-range" is specified, this will be bus 0 (the default).

Properties of the /chosen node:

Loading