Re: [PATCH v2 2/2] pci, pcie-thunder-pem: Add PCIe host driver for ThunderX processors.

2016-01-04 Thread David Daney
On 12/29/2015 12:37 PM, Rob Herring wrote: On Tue, Dec 22, 2015 at 03:43:52PM -0800, David Daney wrote: From: David Daney <david.da...@cavium.com> Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config

Re: [PATCH 2/2] pci, pcie-thunder-pem: Add PCIe host driver for ThunderX processors.

2015-12-22 Thread David Daney
On 12/22/2015 02:03 AM, Will Deacon wrote: On Mon, Dec 21, 2015 at 05:53:42PM -0800, David Daney wrote: From: David Daney <david.da...@cavium.com> Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config

Re: [PATCH 1/2] PCI: generic: Refactor code to enable reuse by other drivers.

2015-12-22 Thread David Daney
On 12/22/2015 02:07 AM, Will Deacon wrote: On Mon, Dec 21, 2015 at 05:53:41PM -0800, David Daney wrote: From: David Daney <david.da...@cavium.com> No change in functionality. Move structure definitions into a separate header file. Split probe function in to two parts: - a small

[PATCH v2 1/2] PCI: generic: Refactor code to enable reuse by other drivers.

2015-12-22 Thread David Daney
From: David Daney <david.da...@cavium.com> No change in functionality. Move structure definitions into a separate header file. Move common code to new file with Kconfig machinery to build it. Split probe function in to two parts: - a small driver specific probe function (gen_pci

[PATCH v2 2/2] pci, pcie-thunder-pem: Add PCIe host driver for ThunderX processors.

2015-12-22 Thread David Daney
From: David Daney <david.da...@cavium.com> Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config space accessor functions. The pci-host-common code is used to configure the PCI machinery. Signed-off-by:

Re: [PATCH 2/2] pci, pcie-thunder-pem: Add PCIe host driver for ThunderX processors.

2015-12-22 Thread David Daney
On 12/22/2015 11:18 AM, David Daney wrote: On 12/22/2015 02:03 AM, Will Deacon wrote: On Mon, Dec 21, 2015 at 05:53:42PM -0800, David Daney wrote: From: David Daney <david.da...@cavium.com> [...] diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig index f131ba9..16ed9c3

[PATCH v2 0/2] pci: Add host controller driver for Cavium ThunderX PCIe

2015-12-22 Thread David Daney
From: David Daney <david.da...@cavium.com> Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. There are two patches: 1) Refactor code in pci-host-generic so that it can more easily be used by other drivers. This splits the driver f

[PATCH 1/2] PCI: generic: Refactor code to enable reuse by other drivers.

2015-12-21 Thread David Daney
From: David Daney <david.da...@cavium.com> No change in functionality. Move structure definitions into a separate header file. Split probe function in to two parts: - a small driver specific probe function (gen_pci_probe) - a common probe that can be used by other d

[PATCH 0/2] pci: Add host controller driver for Cavium ThunderX PCIe

2015-12-21 Thread David Daney
From: David Daney <david.da...@cavium.com> Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. There are two patches: 1) Refactor code in pci-host-generic so that it can more easily be used by other drivers. 2) Add the ThunderX PCIe

[PATCH 2/2] pci, pcie-thunder-pem: Add PCIe host driver for ThunderX processors.

2015-12-21 Thread David Daney
From: David Daney <david.da...@cavium.com> Some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config space accessor functions. The pci-host-generic driver code is used to configure the PCI machinery. Sign

Re: [PATCH v2] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-12-07 Thread David Daney
On 12/07/2015 02:43 PM, Bjorn Helgaas wrote: Hi David, On Tue, Sep 22, 2015 at 05:16:55PM -0700, David Daney wrote: From: David Daney <david.da...@cavium.com> The config space for external PCIe root complexes on some Cavium ThunderX SoCs is very similar to CAM and ECAM, but d

Re: [PATCH v4] mmc: OCTEON: Add host driver for OCTEON MMC controller

2015-11-24 Thread David Daney
devices. Device parameters are configured from device tree data. eMMC, MMC and SD devices are supported. Tested-by: Aaro Koskinen <aaro.koski...@iki.fi> Signed-off-by: Chandrakala Chavva <ccha...@caviumnetworks.com> Signed-off-by: David Daney <david.da...@cavium.com> Signed-off-b

Re: [PATCH v5 1/4] Docs: dt: Add PCI MSI map bindings

2015-10-09 Thread David Daney
On 10/09/2015 06:20 AM, Rob Herring wrote: On Thu, Oct 8, 2015 at 5:10 PM, David Daney <ddaney.c...@gmail.com> wrote: From: Mark Rutland <mark.rutl...@arm.com> Currently msi-parent is used by a few bindings to describe the relationship between a PCI root complex and a single MS

Re: [PATCH v4 0/5] PCI: generic: Misc. bug fixes/enhancements

2015-10-08 Thread David Daney
On 10/08/2015 08:28 AM, Bjorn Helgaas wrote: On Fri, Oct 02, 2015 at 11:43:58AM -0700, David Daney wrote: From: David Daney <david.da...@cavium.com> [...] David Daney (5): PCI: Add pci_bus_fixup_irqs(). PCI: generic: Only fixup irqs for bus we are creating. I'm hoping we won'

Re: [PATCH v4 4/5] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-10-08 Thread David Daney
driver is currently broken for non-zero starting bus numbers. David Daney -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH v5 0/4] MSI, of, irqchip/gicv3-its: Handle "msi-map" properties.

2015-10-08 Thread David Daney
From: David Daney <david.da...@cavium.com> The first patch from Mark Rutland adds the OF device tree binding description, which explains what we are attempting to do here. For MSI messages on GICv3 systems there is some side-band data that accompanies the message, this data is spe

[PATCH v5 4/4] irqchip/gic-v3-its: Add handling of PCI requester id.

2015-10-08 Thread David Daney
From: David Daney <david.da...@cavium.com> Replace open coded generation PCI/MSI requester id with call to the new function pci_msi_domain_get_msi_rid() which applies the "msi-map" to the id value. Reviewed-by: Marc Zyngier <marc.zyng...@arm.com> Signed-off-by:

[PATCH v5 1/4] Docs: dt: Add PCI MSI map bindings

2015-10-08 Thread David Daney
Mark Rutland <mark.rutl...@arm.com> Signed-off-by: David Daney <david.da...@cavium.com> --- Documentation/devicetree/bindings/pci/pci-msi.txt | 220 ++ 1 file changed, 220 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/pci-msi.txt diff --git a/

[PATCH v5 2/4] of/irq: Add new function of_msi_map_rid()

2015-10-08 Thread David Daney
From: David Daney <david.da...@cavium.com> The device tree property "msi-map" specifies how to create the PCI requester id used in some MSI controllers. Add a new function of_msi_map_rid() that finds the msi-map property and applies its translation to a given requester id. R

[PATCH v5 3/4] PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().

2015-10-08 Thread David Daney
From: David Daney <david.da...@cavium.com> Add pci_msi_domain_get_msi_rid() to return the MSI requester id (RID). Initially needed by gic-v3 based systems. It will be used by follow on patch to drivers/irqchip/irq-gic-v3-its-pci-msi.c Initially supports mapping the RID via OF devic

[PATCH] PCI: generic: Fix address window calculation for non-zero starting bus.

2015-10-08 Thread David Daney
From: David Daney <david.da...@cavium.com> Make the offset from the beginning of the "reg" property be from the starting bus number, rather than zero. Hoist the invariant size calculation out of the mapping for loop. Update host-generic-pci.txt to clarify the semantics of th

Re: [PATCH v4 1/5] PCI: Add pci_bus_fixup_irqs().

2015-10-07 Thread David Daney
On 10/07/2015 12:44 PM, Bjorn Helgaas wrote: Hi David, On Fri, Oct 02, 2015 at 11:43:59AM -0700, David Daney wrote: From: David Daney <david.da...@cavium.com> pci_bus_fixup_irqs() works like pci_fixup_irqs(), except it only does the fixups for devices on the specified bus. Follow-on

[PATCH v4 0/5] PCI: generic: Misc. bug fixes/enhancements

2015-10-02 Thread David Daney
From: David Daney <david.da...@cavium.com> While using the pci-host-generic driver to add PCI support for the Cavium ThunderX processors, several bugs were discovered. This patch set fixes the bugs, a follow-on set will add the ThunderX support. Changes from v3: - Drop "PCI: gen

[PATCH v4 2/5] PCI: generic: Only fixup irqs for bus we are creating.

2015-10-02 Thread David Daney
From: David Daney <david.da...@cavium.com> If we create multiple buses with pci-host-generic, or there are buses created by other drivers, we don't want to call pci_fixup_irqs() which operates on all devices, not just the devices on the bus being added. The consequence is that either the

[PATCH v4 5/5] PCI: generic: Pass proper starting bus number to pci_scan_root_bus().

2015-10-02 Thread David Daney
From: David Daney <david.da...@cavium.com> If the bus is being configured with a bus-range that does not start at zero, pass that starting bus number to pci_scan_root_bus(). Passing the incorrect value of zero causes attempted config accesses outside of the supported range, which ca

[PATCH v4 4/5] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-10-02 Thread David Daney
From: David Daney <david.da...@cavium.com> There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calculation is incorrect for a bus range that doesn't start at zero. Since the configuration space is relative to bu

[PATCH v4 1/5] PCI: Add pci_bus_fixup_irqs().

2015-10-02 Thread David Daney
From: David Daney <david.da...@cavium.com> pci_bus_fixup_irqs() works like pci_fixup_irqs(), except it only does the fixups for devices on the specified bus. Follow-on patch will use the new function. Signed-off-by: David Daney <david.da...@cavium.com> --- No change from v2. drive

[PATCH v4 3/5] PCI: generic: Quit clobbering our pci_ops.

2015-10-02 Thread David Daney
From: David Daney <david.da...@cavium.com> The pci-host-generic driver keeps a global struct pci_ops which it then patches with the .map_bus method appropriate for the bus device. A problem arises when the driver is used for two different types of bus devices, the .map_bus method for th

Re: [PATCH v3 3/4] PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().

2015-10-01 Thread David Daney
On 10/01/2015 02:24 AM, Marc Zyngier wrote: Hi David, On 30/09/15 23:47, David Daney wrote: From: David Daney <david.da...@cavium.com> Add pci_msi_domain_get_msi_rid() to return the MSI requester id (RID). Initially needed by gic-v3 based systems. It will be used by follow on patch to d

[PATCH v4 4/4] irqchip/gic-v3-its: Add handling of PCI requester id.

2015-10-01 Thread David Daney
From: David Daney <david.da...@cavium.com> Replace open coded generation PCI/MSI requester id with call to the new function pci_msi_domain_get_msi_rid() which applies the "msi-map" to the id value. Signed-off-by: David Daney <david.da...@cavium.com> --- drivers/irqchip/ir

[PATCH v4 2/4] of/irq: Add new function of_msi_map_rid()

2015-10-01 Thread David Daney
From: David Daney <david.da...@cavium.com> The device tree property "msi-map" specifies how to create the PCI requester id used in some MSI controllers. Add a new function of_msi_map_rid() that finds the msi-map property and applies its translation to a given requester id. R

[PATCH v4 1/4] Docs: dt: Add PCI MSI map bindings

2015-10-01 Thread David Daney
Mark Rutland <mark.rutl...@arm.com> Signed-off-by: David Daney <david.da...@cavium.com> --- Documentation/devicetree/bindings/pci/pci-msi.txt | 220 ++ 1 file changed, 220 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/pci-msi.txt diff --git a/

[PATCH v4 0/4] MSI, of, irqchip/gicv3-its: Handle "msi-map" properties.

2015-10-01 Thread David Daney
From: David Daney <david.da...@cavium.com> The first patch from Mark Rutland adds the OF device tree binding description, which explains what we are attempting to do here. For MSI messages on GICv3 systems there is some side-band data that accompanies the message, this data is spe

[PATCH v4 3/4] PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().

2015-10-01 Thread David Daney
From: David Daney <david.da...@cavium.com> Add pci_msi_domain_get_msi_rid() to return the MSI requester id (RID). Initially needed by gic-v3 based systems. It will be used by follow on patch to drivers/irqchip/irq-gic-v3-its-pci-msi.c Initially supports mapping the RID via OF devic

[PATCH v3 3/4] PCI/MSI: Add helper function pci_msi_domain_get_msi_rid().

2015-09-30 Thread David Daney
From: David Daney <david.da...@cavium.com> Add pci_msi_domain_get_msi_rid() to return the MSI requester id (RID). Initially needed by gic-v3 based systems. It will be used by follow on patch to drivers/irqchip/irq-gic-v3-its-pci-msi.c Initially supports mapping the RID via OF devic

[PATCH v3 2/4] of/irq: Add new function of_msi_map_rid()

2015-09-30 Thread David Daney
From: David Daney <david.da...@cavium.com> The device tree property "msi-map" specifies how to create the PCI requester id used in some MSI controllers. Add a new function of_msi_map_rid() that finds the msi-map property and applies its translation to a given requester id. R

[PATCH v3 4/4] irqchip/gic-v3-its: Add handling of PCI requester id.

2015-09-30 Thread David Daney
From: David Daney <david.da...@cavium.com> Replace open coded generation PCI/MSI requester id with call to the new function pci_msi_domain_get_msi_rid() which applies the "msi-map" to the id value. Signed-off-by: David Daney <david.da...@cavium.com> --- drivers/irqchip/ir

[PATCH v3 0/4] MSI, of, irqchip/gicv3-its: Handle "msi-map" properties.

2015-09-30 Thread David Daney
From: David Daney <david.da...@cavium.com> The first patch from Mark Rutland adds the OF device tree binding description, which explains what we are attempting to do here. For MSI messages on GICv3 systems there is some side-band data that accompanies the message, this data is spe

[PATCH v3 1/4] Docs: dt: Add PCI MSI map bindings

2015-09-30 Thread David Daney
Mark Rutland <mark.rutl...@arm.com> Signed-off-by: David Daney <david.da...@cavium.com> --- Documentation/devicetree/bindings/pci/pci-msi.txt | 220 ++ 1 file changed, 220 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/pci-msi.txt diff --git a/

Re: [PATCH] net: mdio-octeon: Add PCI driver binding.

2015-09-24 Thread David Daney
On 09/24/2015 02:52 PM, David Miller wrote: From: David Daney <ddaney.c...@gmail.com> Date: Tue, 22 Sep 2015 17:41:36 -0700 From: David Daney <david.da...@cavium.com> When the Cavium mdio-octeon devices appear in the Thunder family of arm64 based SoCs, they show up as PCI devic

Re: [PATCH] net: mdio-octeon: Add PCI driver binding.

2015-09-24 Thread David Daney
On 09/24/2015 03:04 PM, David Daney wrote: On 09/24/2015 02:52 PM, David Miller wrote: From: David Daney <ddaney.c...@gmail.com> Date: Tue, 22 Sep 2015 17:41:36 -0700 From: David Daney <david.da...@cavium.com> When the Cavium mdio-octeon devices appear in the Thunder family of

Re: [PATCH] net: mdio-octeon: Add PCI driver binding.

2015-09-24 Thread David Daney
On 09/24/2015 03:14 PM, David Miller wrote: From: David Daney <dda...@caviumnetworks.com> Date: Thu, 24 Sep 2015 15:04:23 -0700 On 09/24/2015 02:52 PM, David Miller wrote: From: David Daney <ddaney.c...@gmail.com> Date: Tue, 22 Sep 2015 17:41:36 -0700 From: David Dan

Re: [PATCH] net: mdio-octeon: Add PCI driver binding.

2015-09-24 Thread David Daney
On 09/24/2015 03:50 PM, David Miller wrote: From: David Daney <dda...@caviumnetworks.com> Date: Thu, 24 Sep 2015 15:45:41 -0700 2) The OF device tree nodes for PCI devices do not result in the creation of a platform device. But they are created for the children right? And that's the o

Re: [PATCH v3 3/6] PCI: generic: Quit clobbering our pci_ops.

2015-09-23 Thread David Daney
On 09/23/2015 01:21 AM, Arnd Bergmann wrote: On Tuesday 22 September 2015 16:49:14 David Daney wrote: From: David Daney <david.da...@cavium.com> The pci-host-generic driver keeps a global struct pci_ops which it then patches with the .map_bus method appropriate for the bus device. A p

Re: [PATCH v2 2/3] of/irq: Add new function of_msi_map_rid()

2015-09-23 Thread David Daney
On 09/23/2015 10:07 AM, Rob Herring wrote: On Tue, Sep 22, 2015 at 7:00 PM, David Daney <ddaney.c...@gmail.com> wrote: From: David Daney <david.da...@cavium.com> The device tree property "msi-map" specifies how to create the PCI requester id used in some MSI controller

Re: [PATCH v2 2/3] of/irq: Add new function of_msi_map_rid()

2015-09-23 Thread David Daney
On 09/23/2015 09:52 AM, Marc Zyngier wrote: On Tue, 22 Sep 2015 17:00:05 -0700 David Daney <ddaney.c...@gmail.com> wrote: From: David Daney <david.da...@cavium.com> The device tree property "msi-map" specifies how to create the PCI requester id used in some MSI c

Re: [PATCH v2 3/3] irqchip/gicv3-its: Handle OF device tree "msi-map" properties.

2015-09-23 Thread David Daney
On 09/23/2015 10:01 AM, Marc Zyngier wrote: On Tue, 22 Sep 2015 17:00:06 -0700 David Daney <ddaney.c...@gmail.com> wrote: From: David Daney <david.da...@cavium.com> Call of_msi_map_rid() to handle mapping of the requester id. Signed-off-by: David Daney <david.da...@cavium.com

Re: [PATCH v3 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-23 Thread David Daney
On 09/23/2015 01:01 AM, Arnd Bergmann wrote: On Tuesday 22 September 2015 16:49:15 David Daney wrote: From: David Daney <david.da...@cavium.com> There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calcu

Re: [PATCH 2/3] PCI: Add quirks for devices found on Cavium ThunderX SoCs.

2015-09-23 Thread David Daney
On 09/22/2015 06:19 AM, Bjorn Helgaas wrote: Hi David, On Fri, Sep 18, 2015 at 06:00:28PM -0700, David Daney wrote: On 09/18/2015 12:45 PM, Arnd Bergmann wrote: On Friday 18 September 2015 10:00:32 David Daney wrote: On 09/18/2015 12:19 AM, Arnd Bergmann wrote: On Thursday 17 September 2015

Re: [PATCH v2 4/5] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-23 Thread David Daney
On 09/23/2015 11:01 AM, Will Deacon wrote: On Thu, Sep 17, 2015 at 11:02:11PM +0100, David Daney wrote: [...] Properties of the /chosen node: diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c index 77cf4bd..0a9c453 100644 --- a/drivers/pci/host/pci

Re: [PATCH 3/3] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-22 Thread David Daney
On 09/22/2015 11:52 AM, Will Deacon wrote: On Thu, Sep 17, 2015 at 11:41:34PM +0100, David Daney wrote: From: David Daney <david.da...@cavium.com> The config space for external PCIe root complexes on some Cavium ThunderX SoCs is very similar to CAM and ECAM, but differs in the shift

Re: [PATCH 3/3] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-22 Thread David Daney
On 09/22/2015 09:40 AM, Lorenzo Pieralisi wrote: On Tue, Sep 22, 2015 at 05:13:45PM +0100, David Daney wrote: On 09/22/2015 09:05 AM, Lorenzo Pieralisi wrote: On Thu, Sep 17, 2015 at 11:41:34PM +0100, David Daney wrote: [...] Properties of the host controller node: -- compatible

Re: [PATCH 3/3] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-22 Thread David Daney
On 09/22/2015 09:05 AM, Lorenzo Pieralisi wrote: On Thu, Sep 17, 2015 at 11:41:34PM +0100, David Daney wrote: From: David Daney <david.da...@cavium.com> The config space for external PCIe root complexes on some Cavium ThunderX SoCs is very similar to CAM and ECAM, but differs in the

[PATCH] net: mdio-octeon: Add PCI driver binding.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> When the Cavium mdio-octeon devices appear in the Thunder family of arm64 based SoCs, they show up as PCI devices. Add PCI driver wrapping so the driver is bound in the standard PCI device scan. When in this form, a single PCI device may have mor

[PATCH v2 1/3] Docs: dt: Add PCI MSI map bindings

2015-09-22 Thread David Daney
to MSI controllers. This document covers msi-parent, and a new msi-map property (specific to PCI*) which may be used to map devices (identified by their Requester ID) to sideband data for each MSI controller that they may target. Signed-off-by: Mark Rutland <mark.rutl...@arm.com> Signed-off-by:

[PATCH v2 2/3] of/irq: Add new function of_msi_map_rid()

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> The device tree property "msi-map" specifies how to create the PCI requester id used in some MSI controllers. Add a new function of_msi_map_rid() that finds the msi-map property and applies its translation to a given requester id. Sign

[PATCH v2 3/3] irqchip/gicv3-its: Handle OF device tree "msi-map" properties.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> Call of_msi_map_rid() to handle mapping of the requester id. Signed-off-by: David Daney <david.da...@cavium.com> --- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irq

[PATCH v2 0/3] of, irqchip/gicv3-its: Handle "msi-map" properties.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> The first patch from Mark Rutland adds the OF device tree binding description, which explains what we are attempting to do here. For MSI messages on GICv3 systems there is some side-band data that accompanies the message, this data is spe

[PATCH v3 2/6] PCI: generic: Only fixup irqs for bus we are creating.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> If we create multiple buses with pci-host-generic, or there are buses created by other drivers, we don't want to call pci_fixup_irqs() which operates on all devices, not just the devices on the bus being added. The consequence is that either the

[PATCH v3 3/6] PCI: generic: Quit clobbering our pci_ops.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> The pci-host-generic driver keeps a global struct pci_ops which it then patches with the .map_bus method appropriate for the bus device. A problem arises when the driver is used for two different types of bus devices, the .map_bus method for th

[PATCH v3 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calculation is incorrect for a bus range that doesn't start at zero. Since the configuration space is relative to bu

[PATCH v3 1/6] PCI: Add pci_bus_fixup_irqs().

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> pci_bus_fixup_irqs() works like pci_fixup_irqs(), except it only does the fixups for devices on the specified bus. Follow-on patch will use the new function. Signed-off-by: David Daney <david.da...@cavium.com> --- No change from v2. This

[PATCH v3 6/6] PCI: generic: Claim device resources if PCI_PROBE_ONLY

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> In the case where the PCI_PROBE_ONLY flag is set, we need to claim the resources for all PCI devices added to the bus. Failure to claim SRIOV BAR resources prevents SRIOV devices from being being enabled. So, when the PCI_PROBE_ONLY flag is set,

[PATCH v3 0/6] PCI: generic: Misc. bug fixes/enhancements

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> While using the pci-host-generic driver to add PCI support for the Cavium ThunderX processors, several bugs were discovered. This patch set fixes the bugs, a follow-on set will add the ThunderX support. Changes from v2: - Added " PCI: gen

[PATCH v3 5/6] PCI: generic: Pass proper starting bus number to pci_scan_root_bus().

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> If the bus is being configured with a bus-range that does not start at zero, pass that starting bus number to pci_scan_root_bus(). Passing the incorrect value of zero causes attempted config accesses outside of the supported range, which ca

[PATCH v2] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-22 Thread David Daney
From: David Daney <david.da...@cavium.com> The config space for external PCIe root complexes on some Cavium ThunderX SoCs is very similar to CAM and ECAM, but differs in the shift values that have to be applied to the bus and devfn numbers to compose that address window offset. Thes

Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties.

2015-09-21 Thread David Daney
On 09/21/2015 08:58 AM, Marc Zyngier wrote: On Fri, 18 Sep 2015 10:54:02 -0700 David Daney <dda...@caviumnetworks.com> wrote: On 09/18/2015 01:51 AM, Marc Zyngier wrote: On Thu, 17 Sep 2015 11:00:59 -0700 David Daney <ddaney.c...@gmail.com> wrote: Hi David, From: David Dan

Re: [PATCH 2/3] PCI: Add quirks for devices found on Cavium ThunderX SoCs.

2015-09-18 Thread David Daney
On 09/18/2015 12:45 PM, Arnd Bergmann wrote: On Friday 18 September 2015 10:00:32 David Daney wrote: On 09/18/2015 12:19 AM, Arnd Bergmann wrote: On Thursday 17 September 2015 15:41:33 David Daney wrote: From: David Daney <david.da...@cavium.com> The on-chip devices all have fixed bar

Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties.

2015-09-18 Thread David Daney
On 09/18/2015 01:51 AM, Marc Zyngier wrote: On Thu, 17 Sep 2015 11:00:59 -0700 David Daney <ddaney.c...@gmail.com> wrote: Hi David, From: David Daney <david.da...@cavium.com> Search up the device hierarchy to find devices with a "msi-map" property, if found apply

Re: [PATCH 2/3] PCI: Add quirks for devices found on Cavium ThunderX SoCs.

2015-09-18 Thread David Daney
On 09/18/2015 12:19 AM, Arnd Bergmann wrote: On Thursday 17 September 2015 15:41:33 David Daney wrote: From: David Daney <david.da...@cavium.com> The on-chip devices all have fixed bars. So, fix them up. Signed-off-by: David Daney <david.da...@cavium.com> You should be able

Re: [PATCH 2/6] PCI: generic: Only fixup irqs for bus we are creating.

2015-09-17 Thread David Daney
On 09/16/2015 03:32 AM, Lorenzo Pieralisi wrote: On Tue, Sep 15, 2015 at 06:49:24PM +0100, David Daney wrote: On 09/15/2015 10:36 AM, Will Deacon wrote: Hi David, On Sat, Sep 12, 2015 at 12:21:55AM +0100, David Daney wrote: From: David Daney <david.da...@cavium.com> Use pci_wa

[PATCH 1/2] Docs: dt: Add PCI MSI map bindings

2015-09-17 Thread David Daney
to MSI controllers. This document covers msi-parent, and a new msi-map property (specific to PCI*) which may be used to map devices (identified by their Requester ID) to sideband data for each MSI controller that they may target. Signed-off-by: Mark Rutland <mark.rutl...@arm.com> Signed-off-by:

[PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> Search up the device hierarchy to find devices with a "msi-map" property, if found apply the mapping to the GIC device id. Signed-off-by: David Daney <david.da...@cavium.com> --- drivers/irqchip/irq-gic

[PATCH 0/2] irqchip/gicv3-its: Handle "msi-map" properties.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> The first patch from Mark Rutland adds the OF device tree binding description, which explains what we are attempting to do here. For MSI messages on GICv3 systems there is some side-band data that accompanies the message, this data is spe

[PATCH v2 4/5] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calculation is incorrect for a bus range that doesn't start at zero. Since the configuration space is relative to bu

[PATCH v2 1/5] PCI: Add pci_bus_fixup_irqs().

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> pci_bus_fixup_irqs() works like pci_fixup_irqs(), except it only does the fixups for devices on the specified bus. Follow-on patch will use the new function. Signed-off-by: David Daney <david.da...@cavium.com> --- This patch didn't

[PATCH v2 3/5] PCI: generic: Quit clobbering our pci_ops.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> The pci-host-generic driver keeps a global struct pci_ops which it then patches with the .map_bus method appropriate for the bus device. A problem arises when the driver is used for two different types of bus devices, the .map_bus method for th

[PATCH v2 5/5] PCI: generic: Pass proper starting bus number to pci_scan_root_bus().

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> If the bus is being configured with a bus-range that does not start at zero, pass that starting bus number to pci_scan_root_bus(). Passing the incorrect value of zero causes attempted config accesses outside of the supported range, which ca

[PATCH v2 0/5] PCI: generic: Misc. bug fixes

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> While using the pci-host-generic driver to add PCI support for the Cavium ThunderX processors, several bugs were discovered. This patch set fixes the bugs, a follow-on set will add the ThunderX support. Changes from v1: - "PCI: generic

[PATCH v2 2/5] PCI: generic: Only fixup irqs for bus we are creating.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> If we create multiple buses with pci-host-generic, or there are buses created by other drivers, we don't want to call pci_fixup_irqs() which operates on all devices, not just the devices on the bus being added. The consequence is that either the

[PATCH 3/3] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> The config space for external PCIe root complexes on some Cavium ThunderX SoCs is very similar to CAM and ECAM, but differs in the shift values that have to be applied to the bus and devfn numbers to compose that address window offset. Thes

[PATCH 2/3] PCI: Add quirks for devices found on Cavium ThunderX SoCs.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> The on-chip devices all have fixed bars. So, fix them up. Signed-off-by: David Daney <david.da...@cavium.com> --- drivers/pci/host/Kconfig | 6 +++ drivers/pci/host/Makefile | 1 + drivers/pci/host/quirks-th

[PATCH 1/3] PCI: Allow quirks to override SRIOV BARs.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> Devices with fixed BARs can install BAR resources with IORESOURCE_PCI_FIXED from the header fixup. Allow this to work with the SRIOV BARs as well by testing if the BAR resource has already been set before attempting to read it from the config

[PATCH 0/3] PCI: Add support for Cavium ThunderX RC and on-SoC devices.

2015-09-17 Thread David Daney
From: David Daney <david.da...@cavium.com> The Cavium ThunderX arm64 based SoC needs a little bit of special handling for both its PCIe Root Complexes as well as on-SoC devices (which all appear as PCIe devices). 1/3 - Small change to allow SRIOV BARs to be given fixed add

Re: [PATCH 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-16 Thread David Daney
r non-zero start_bus. I anticipate sending a new version of the patch set later today (PDT). I will add any Acked-by/Reviewed-by that I receive to the new set. David Daney -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 0/6] PCI: generic: Misc. bug fixes and enhanced support for MSI.

2015-09-15 Thread David Daney
On 09/11/2015 04:21 PM, David Daney wrote: From: David Daney <david.da...@cavium.com> While using the pci-host-generic driver to add PCI support for the Cavium ThunderX processors, several bugs were discovered. We also need the ability to specify a per-bus MSI controller, so s

Re: [PATCH 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-15 Thread David Daney
On 09/15/2015 11:35 AM, Will Deacon wrote: On Tue, Sep 15, 2015 at 07:02:54PM +0100, David Daney wrote: On 09/15/2015 10:49 AM, Will Deacon wrote: On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote: /* Limit the bus-range to fit within reg */ - bus_max = pci

Re: [PATCH 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-15 Thread David Daney
On 09/15/2015 10:49 AM, Will Deacon wrote: On Sat, Sep 12, 2015 at 12:21:57AM +0100, David Daney wrote: From: David Daney <david.da...@cavium.com> There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calcu

Re: [PATCH 6/6] PCI: generic: Allow bus default MSI controller to be specified.

2015-09-15 Thread David Daney
On 09/15/2015 10:53 AM, Will Deacon wrote: On Sat, Sep 12, 2015 at 12:21:59AM +0100, David Daney wrote: From: David Daney <david.da...@cavium.com> If the device tree node for the bus has a "msi-parent" property, use that as the default MSI controller for devices on the bus.

Re: [PATCH 2/6] PCI: generic: Only fixup irqs for bus we are creating.

2015-09-15 Thread David Daney
On 09/15/2015 10:36 AM, Will Deacon wrote: Hi David, On Sat, Sep 12, 2015 at 12:21:55AM +0100, David Daney wrote: From: David Daney <david.da...@cavium.com> Use pci_walk_bus() to restrict the fixup irq actions to only the bus being created. If we create multiple buses with pci-host-g

[PATCH 6/6] PCI: generic: Allow bus default MSI controller to be specified.

2015-09-11 Thread David Daney
From: David Daney <david.da...@cavium.com> If the device tree node for the bus has a "msi-parent" property, use that as the default MSI controller for devices on the bus. Add device tree binding documentation describing the new property. This allows the pci-host-generic d

[PATCH 0/6] PCI: generic: Misc. bug fixes and enhanced support for MSI.

2015-09-11 Thread David Daney
From: David Daney <david.da...@cavium.com> While using the pci-host-generic driver to add PCI support for the Cavium ThunderX processors, several bugs were discovered. We also need the ability to specify a per-bus MSI controller, so support for that was added. David Daney (6): PCI

[PATCH 1/6] PCI: Make global and export pdev_fixup_irq().

2015-09-11 Thread David Daney
From: David Daney <david.da...@cavium.com> Follow-on patch will use pdev_fixup_irq(). So, make it visible and export it. Signed-off-by: David Daney <david.da...@cavium.com> --- drivers/pci/setup-irq.c | 7 --- include/linux/pci.h | 3 +++ 2 files changed, 7 insertions(+),

[PATCH 4/6] PCI: generic: Correct, and avoid overflow, in bus_max calculation.

2015-09-11 Thread David Daney
From: David Daney <david.da...@cavium.com> There are two problems with the bus_max calculation: 1) The u8 data type can overflow for large config space windows. 2) The calculation is incorrect for a bus range that doesn't start at zero. Since the configuration space is relative to bu

[PATCH 3/6] PCI: generic: Quit clobbering our pci_ops.

2015-09-11 Thread David Daney
From: David Daney <david.da...@cavium.com> The pci-host-generic driver keeps a global struct pci_ops which it then patches with the .map_bus method appropriate for the bus device. A problem arises when the driver is used for two different types of bus devices, the .map_bus method for th

[PATCH] PCI: generic: Add support for Cavium ThunderX PCIe root complexes.

2015-09-11 Thread David Daney
From: David Daney <david.da...@cavium.com> The config space for external PCIe root complexes on some Cavium ThunderX SoCs is very similar to CAM and ECAM, but differs in the shift values that have to be applied to the bus and devfn numbers to compose that address window offset. Thes

Re: [PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.

2015-09-09 Thread David Daney
On 09/09/2015 10:44 AM, Frank Rowand wrote: Second attempt at this reply. The first reply was mangled. On 9/8/2015 11:28 AM, David Daney wrote: From: David Daney <david.da...@cavium.com> It is perfectly legitimate for a PCI device to have an PCI_INTERRUPT_PIN value of zero. This h

Re: _DSD standardization note (WAS: Re: [PATCH 2/2] net, thunder, bgx: Add support for ACPI binding.)

2015-09-08 Thread David Daney
wrote: Hi David, On Sat, Aug 8, 2015 at 2:11 AM, David Daney <dda...@caviumnetworks.com> wrote: On 08/07/2015 05:05 PM, Rafael J. Wysocki wrote: [cut] It is actually useful to people as far as I can say. Also, if somebody is going to use properties with ACPI, why whould th

[PATCH v2] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.

2015-09-08 Thread David Daney
From: David Daney <david.da...@cavium.com> It is perfectly legitimate for a PCI device to have an PCI_INTERRUPT_PIN value of zero. This happens if the device doesn't use interrupts, or on PCIe devices, where only MSI/MSI-X are supported. Silence the annoying "of_irq_parse_pci() fai

[PATCH] of_pci_irq: Silence bogus "of_irq_parse_pci() failed ..." messages.

2015-09-04 Thread David Daney
From: David Daney <david.da...@cavium.com> It is perfectly legitimate for a PCI device to have an PCI_INTERRUPT_PIN value of zero. This happens if the device doesn't use interrupts, or on PCIe devices, where only MSI/MSI-X are supported. Silence the annoying "of_irq_parse_pci() fai

  1   2   >