forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'pci-v3.16-changes' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/helgaas/pci into next Pull PCI changes from Bjorn Helgaas: "Enumeration - Notify driver before and after device reset (Keith Busch) - Use reset notification in NVMe (Keith Busch) NUMA - Warn if we have to guess host bridge node information (Myron Stowe) - Work around AMD Fam15h BIOSes that fail to provide _PXM (Suravee Suthikulpanit) - Clean up and mark early_root_info_init() as deprecated (Suravee Suthikulpanit) Driver binding - Add "driver_override" for force specific binding (Alex Williamson) - Fail "new_id" addition for devices we already know about (Bandan Das) Resource management - Support BAR sizes up to 8GB (Nikhil Rao, Alan Cox) - Don't move IORESOURCE_PCI_FIXED resources (Bjorn Helgaas) - Mark SBx00 HPET BAR as IORESOURCE_PCI_FIXED (Bjorn Helgaas) - Fail safely if we can't handle BARs larger than 4GB (Bjorn Helgaas) - Reject BAR above 4GB if dma_addr_t is too small (Bjorn Helgaas) - Don't convert BAR address to resource if dma_addr_t is too small (Bjorn Helgaas) - Don't set BAR to zero if dma_addr_t is too small (Bjorn Helgaas) - Don't print anything while decoding is disabled (Bjorn Helgaas) - Don't add disabled subtractive decode bus resources (Bjorn Helgaas) - Add resource allocation comments (Bjorn Helgaas) - Restrict 64-bit prefetchable bridge windows to 64-bit resources (Yinghai Lu) - Assign i82875p_edac PCI resources before adding device (Yinghai Lu) PCI device hotplug - Remove unnecessary "dev->bus" test (Bjorn Helgaas) - Use PCI_EXP_SLTCAP_PSN define (Bjorn Helgaas) - Fix rphahp endianess issues (Laurent Dufour) - Acknowledge spurious "cmd completed" event (Rajat Jain) - Allow hotplug service drivers to operate in polling mode (Rajat Jain) - Fix cpqphp possible NULL dereference (Rickard Strandqvist) MSI - Replace pci_enable_msi_block() by pci_enable_msi_exact() (Alexander Gordeev) - Replace pci_enable_msix() by pci_enable_msix_exact() (Alexander Gordeev) - Simplify populate_msi_sysfs() (Jan Beulich) Virtualization - Add Intel Patsburg (X79) root port ACS quirk (Alex Williamson) - Mark RTL8110SC INTx masking as broken (Alex Williamson) Generic host bridge driver - Add generic PCI host controller driver (Will Deacon) Freescale i.MX6 - Use new clock names (Lucas Stach) - Drop old IRQ mapping (Lucas Stach) - Remove optional (and unused) IRQs (Lucas Stach) - Add support for MSI (Lucas Stach) - Fix imx6_add_pcie_port() section mismatch warning (Sachin Kamat) Renesas R-Car - Add gen2 device tree support (Ben Dooks) - Use new OF interrupt mapping when possible (Lucas Stach) - Add PCIe driver (Phil Edworthy) - Add PCIe MSI support (Phil Edworthy) - Add PCIe device tree bindings (Phil Edworthy) Samsung Exynos - Remove unnecessary OOM messages (Jingoo Han) - Fix add_pcie_port() section mismatch warning (Sachin Kamat) Synopsys DesignWare - Make MSI ISR shared IRQ aware (Lucas Stach) Miscellaneous - Check for broken config space aliasing (Alex Williamson) - Update email address (Ben Hutchings) - Fix Broadcom CNB20LE unintended sign extension (Bjorn Helgaas) - Fix incorrect vgaarb conditional in WARN_ON() (Bjorn Helgaas) - Remove unnecessary __ref annotations (Bjorn Helgaas) - Add arch/x86/kernel/quirks.c to MAINTAINERS PCI file patterns (Bjorn Helgaas) - Fix use of uninitialized MPS value (Bjorn Helgaas) - Tidy x86/gart messages (Bjorn Helgaas) - Fix return value from pci_user_{read,write}_config_*() (Gavin Shan) - Turn pcibios_penalize_isa_irq() into a weak function (Hanjun Guo) - Remove unused serial device IDs (Jean Delvare) - Use designated initialization in PCI_VDEVICE (Mark Rustad) - Fix powerpc NULL dereference in pci_root_buses traversal (Mike Qiu) - Configure MPS on ARM (Murali Karicheri) - Remove unnecessary includes of <linux/init.h> (Paul Gortmaker) - Move Open Firmware devspec attribute to PCI common code (Sebastian Ott) - Use pdev->dev.groups for attribute creation on s390 (Sebastian Ott) - Remove pcibios_add_platform_entries() (Sebastian Ott) - Add new ID for Intel GPU "spurious interrupt" quirk (Thomas Jarosch) - Rename pci_is_bridge() to pci_has_subordinate() (Yijing Wang) - Add and use new pci_is_bridge() interface (Yijing Wang) - Make pci_bus_add_device() void (Yijing Wang) DMA API - Clarify physical/bus address distinction in docs (Bjorn Helgaas) - Fix typos in docs (Emilio López) - Update dma_pool_create ()and dma_pool_alloc() descriptions (Gioh Kim) - Change dma_declare_coherent_memory() CPU address to phys_addr_t (Bjorn Helgaas) - Pass GAPSPCI_DMA_BASE CPU & bus address to dma_declare_coherent_memory() (Bjorn Helgaas)" * tag 'pci-v3.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (92 commits) MAINTAINERS: Add generic PCI host controller driver PCI: generic: Add generic PCI host controller driver PCI: imx6: Add support for MSI PCI: designware: Make MSI ISR shared IRQ aware PCI: imx6: Remove optional (and unused) IRQs PCI: imx6: Drop old IRQ mapping PCI: imx6: Use new clock names i82875p_edac: Assign PCI resources before adding device ARM/PCI: Call pcie_bus_configure_settings() to set MPS PCI: imx6: Fix imx6_add_pcie_port() section mismatch warning PCI: Make pci_bus_add_device() void PCI: exynos: Fix add_pcie_port() section mismatch warning PCI: Introduce new device binding path using pci_dev.driver_override PCI: rcar: Add gen2 device tree support PCI: cpqphp: Fix possible null pointer dereference PCI: rcar: Add R-Car PCIe device tree bindings PCI: rcar: Add MSI support for PCIe PCI: rcar: Add Renesas R-Car PCIe driver PCI: Fix return value from pci_user_{read,write}_config_*() PCI: exynos: Remove unnecessary OOM messages ...
- Loading branch information
Showing
98 changed files
with
2,710 additions
and
824 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,3 +250,24 @@ Description: | |
valid. For example, writing a 2 to this file when sriov_numvfs | ||
is not 0 and not 2 already will return an error. Writing a 10 | ||
when the value of sriov_totalvfs is 8 will return an error. | ||
|
||
What: /sys/bus/pci/devices/.../driver_override | ||
Date: April 2014 | ||
Contact: Alex Williamson <[email protected]> | ||
Description: | ||
This file allows the driver for a device to be specified which | ||
will override standard static and dynamic ID matching. When | ||
specified, only a driver with a name matching the value written | ||
to driver_override will have an opportunity to bind to the | ||
device. The override is specified by writing a string to the | ||
driver_override file (echo pci-stub > driver_override) and | ||
may be cleared with an empty string (echo > driver_override). | ||
This returns the device to standard matching rules binding. | ||
Writing to driver_override does not automatically unbind the | ||
device from its current driver or make any attempt to | ||
automatically load the specified driver. If no driver with a | ||
matching name is currently loaded in the kernel, the device | ||
will not bind to any driver. This also allows devices to | ||
opt-out of driver binding using a driver_override name such as | ||
"none". Only a single driver may be specified in the override, | ||
there is no support for parsing delimiters. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
Documentation/devicetree/bindings/pci/host-generic-pci.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
* Generic PCI host controller | ||
|
||
Firmware-initialised PCI host controllers and PCI emulations, such as the | ||
virtio-pci implementations found in kvmtool and other para-virtualised | ||
systems, do not require driver support for complexities such as regulator | ||
and clock management. In fact, the controller may not even require the | ||
configuration of a control interface by the operating system, instead | ||
presenting a set of fixed windows describing a subset of IO, Memory and | ||
Configuration Spaces. | ||
|
||
Such a controller can be described purely in terms of the standardized device | ||
tree bindings communicated in pci.txt: | ||
|
||
|
||
Properties of the host controller node: | ||
|
||
- compatible : Must be "pci-host-cam-generic" or "pci-host-ecam-generic" | ||
depending on the layout of configuration space (CAM vs | ||
ECAM respectively). | ||
|
||
- device_type : Must be "pci". | ||
|
||
- ranges : As described in IEEE Std 1275-1994, but must provide | ||
at least a definition of non-prefetchable memory. One | ||
or both of prefetchable Memory and IO Space may also | ||
be provided. | ||
|
||
- bus-range : Optional property (also described in IEEE Std 1275-1994) | ||
to indicate the range of bus numbers for this controller. | ||
If absent, defaults to <0 255> (i.e. all buses). | ||
|
||
- #address-cells : Must be 3. | ||
|
||
- #size-cells : Must be 2. | ||
|
||
- reg : The Configuration Space base address and size, as accessed | ||
from the parent bus. | ||
|
||
|
||
Properties of the /chosen node: | ||
|
||
- linux,pci-probe-only | ||
: Optional property which takes a single-cell argument. | ||
If '0', then Linux will assign devices in its usual manner, | ||
otherwise it will not try to assign devices and instead use | ||
them as they are configured already. | ||
|
||
Configuration Space is assumed to be memory-mapped (as opposed to being | ||
accessed via an ioport) and laid out with a direct correspondence to the | ||
geography of a PCI bus address by concatenating the various components to | ||
form an offset. | ||
|
||
For CAM, this 24-bit offset is: | ||
|
||
cfg_offset(bus, device, function, register) = | ||
bus << 16 | device << 11 | function << 8 | register | ||
|
||
Whilst ECAM extends this by 4 bits to accomodate 4k of function space: | ||
|
||
cfg_offset(bus, device, function, register) = | ||
bus << 20 | device << 15 | function << 12 | register | ||
|
||
Interrupt mapping is exactly as described in `Open Firmware Recommended | ||
Practice: Interrupt Mapping' and requires the following properties: | ||
|
||
- #interrupt-cells : Must be 1 | ||
|
||
- interrupt-map : <see aforementioned specification> | ||
|
||
- interrupt-map-mask : <see aforementioned specification> | ||
|
||
|
||
Example: | ||
|
||
pci { | ||
compatible = "pci-host-cam-generic" | ||
device_type = "pci"; | ||
#address-cells = <3>; | ||
#size-cells = <2>; | ||
bus-range = <0x0 0x1>; | ||
|
||
// CPU_PHYSICAL(2) SIZE(2) | ||
reg = <0x0 0x40000000 0x0 0x1000000>; | ||
|
||
// BUS_ADDRESS(3) CPU_PHYSICAL(2) SIZE(2) | ||
ranges = <0x01000000 0x0 0x01000000 0x0 0x01000000 0x0 0x00010000>, | ||
<0x02000000 0x0 0x41000000 0x0 0x41000000 0x0 0x3f000000>; | ||
|
||
|
||
#interrupt-cells = <0x1>; | ||
|
||
// PCI_DEVICE(3) INT#(1) CONTROLLER(PHANDLE) CONTROLLER_DATA(3) | ||
interrupt-map = < 0x0 0x0 0x0 0x1 &gic 0x0 0x4 0x1 | ||
0x800 0x0 0x0 0x1 &gic 0x0 0x5 0x1 | ||
0x1000 0x0 0x0 0x1 &gic 0x0 0x6 0x1 | ||
0x1800 0x0 0x0 0x1 &gic 0x0 0x7 0x1>; | ||
|
||
// PCI_DEVICE(3) INT#(1) | ||
interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Renesas AHB to PCI bridge | ||
------------------------- | ||
|
||
This is the bridge used internally to connect the USB controllers to the | ||
AHB. There is one bridge instance per USB port connected to the internal | ||
OHCI and EHCI controllers. | ||
|
||
Required properties: | ||
- compatible: "renesas,pci-r8a7790" for the R8A7790 SoC; | ||
"renesas,pci-r8a7791" for the R8A7791 SoC. | ||
- reg: A list of physical regions to access the device: the first is | ||
the operational registers for the OHCI/EHCI controllers and the | ||
second is for the bridge configuration and control registers. | ||
- interrupts: interrupt for the device. | ||
- clocks: The reference to the device clock. | ||
- bus-range: The PCI bus number range; as this is a single bus, the range | ||
should be specified as the same value twice. | ||
- #address-cells: must be 3. | ||
- #size-cells: must be 2. | ||
- #interrupt-cells: must be 1. | ||
- interrupt-map: standard property used to define the mapping of the PCI | ||
interrupts to the GIC interrupts. | ||
- interrupt-map-mask: standard property that helps to define the interrupt | ||
mapping. | ||
|
||
Example SoC configuration: | ||
|
||
pci0: pci@ee090000 { | ||
compatible = "renesas,pci-r8a7790"; | ||
clocks = <&mstp7_clks R8A7790_CLK_EHCI>; | ||
reg = <0x0 0xee090000 0x0 0xc00>, | ||
<0x0 0xee080000 0x0 0x1100>; | ||
interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; | ||
status = "disabled"; | ||
|
||
bus-range = <0 0>; | ||
#address-cells = <3>; | ||
#size-cells = <2>; | ||
#interrupt-cells = <1>; | ||
interrupt-map-mask = <0xff00 0 0 0x7>; | ||
interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH | ||
0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH | ||
0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; | ||
|
||
pci@0,1 { | ||
reg = <0x800 0 0 0 0>; | ||
device_type = "pci"; | ||
phys = <&usbphy 0 0>; | ||
phy-names = "usb"; | ||
}; | ||
|
||
pci@0,2 { | ||
reg = <0x1000 0 0 0 0>; | ||
device_type = "pci"; | ||
phys = <&usbphy 0 0>; | ||
phy-names = "usb"; | ||
}; | ||
}; | ||
|
||
Example board setup: | ||
|
||
&pci0 { | ||
status = "okay"; | ||
pinctrl-0 = <&usb0_pins>; | ||
pinctrl-names = "default"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
* Renesas RCar PCIe interface | ||
|
||
Required properties: | ||
- compatible: should contain one of the following | ||
"renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791" | ||
- reg: base address and length of the pcie controller registers. | ||
- #address-cells: set to <3> | ||
- #size-cells: set to <2> | ||
- bus-range: PCI bus numbers covered | ||
- device_type: set to "pci" | ||
- ranges: ranges for the PCI memory and I/O regions. | ||
- dma-ranges: ranges for the inbound memory regions. | ||
- interrupts: two interrupt sources for MSI interrupts, followed by interrupt | ||
source for hardware related interrupts (e.g. link speed change). | ||
- #interrupt-cells: set to <1> | ||
- interrupt-map-mask and interrupt-map: standard PCI properties | ||
to define the mapping of the PCIe interface to interrupt | ||
numbers. | ||
- clocks: from common clock binding: clock specifiers for the PCIe controller | ||
and PCIe bus clocks. | ||
- clock-names: from common clock binding: should be "pcie" and "pcie_bus". | ||
|
||
Example: | ||
|
||
SoC specific DT Entry: | ||
|
||
pcie: pcie@fe000000 { | ||
compatible = "renesas,pcie-r8a7791"; | ||
reg = <0 0xfe000000 0 0x80000>; | ||
#address-cells = <3>; | ||
#size-cells = <2>; | ||
bus-range = <0x00 0xff>; | ||
device_type = "pci"; | ||
ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000 | ||
0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000 | ||
0x02000000 0 0x30000000 0 0x30000000 0 0x08000000 | ||
0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>; | ||
dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000 | ||
0x42000000 2 0x00000000 2 0x00000000 0 0x40000000>; | ||
interrupts = <0 116 4>, <0 117 4>, <0 118 4>; | ||
#interrupt-cells = <1>; | ||
interrupt-map-mask = <0 0 0 0>; | ||
interrupt-map = <0 0 0 0 &gic 0 116 4>; | ||
clocks = <&mstp3_clks R8A7791_CLK_PCIE>, <&pcie_bus_clk>; | ||
clock-names = "pcie", "pcie_bus"; | ||
status = "disabled"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6710,6 +6710,7 @@ F: Documentation/PCI/ | |
F: drivers/pci/ | ||
F: include/linux/pci* | ||
F: arch/x86/pci/ | ||
F: arch/x86/kernel/quirks.c | ||
|
||
PCI DRIVER FOR IMX6 | ||
M: Richard Zhu <[email protected]> | ||
|
@@ -6757,6 +6758,14 @@ L: [email protected] | |
S: Maintained | ||
F: drivers/pci/host/*designware* | ||
|
||
PCI DRIVER FOR GENERIC OF HOSTS | ||
M: Will Deacon <[email protected]> | ||
L: [email protected] | ||
L: [email protected] (moderated for non-subscribers) | ||
S: Maintained | ||
F: Documentation/devicetree/bindings/pci/host-generic-pci.txt | ||
F: drivers/pci/host/pci-host-generic.c | ||
|
||
PCMCIA SUBSYSTEM | ||
P: Linux PCMCIA Team | ||
L: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.