1. 14 Mar, 2017 1 commit
  2. 14 Nov, 2016 1 commit
  3. 16 Sep, 2016 1 commit
  4. 08 Jun, 2016 1 commit
    • Robin Murphy's avatar
      drivers: of: Fix of_pci.h header guard · 5c1d3310
      Robin Murphy authored
      The compilation of of_pci.c is governed by CONFIG_OF_PCI, but the
      corresponding declarations in of_pci.h are inconsistently guarded by
      CONFIG_OF, with the result that if CONFIG_PCI is disabled for an OF
      platform, the dangling external declarations are still active and the
      inline stub definitions not. So far this has managed to go unnoticed
      since it happens that the only references to these functions are from
      code which itself depends on CONFIG_PCI or CONFIG_OF_PCI.
      Fix this with the appropriate config guard so that any new callers
      outside PCI-specific code don't start unexpectedly breaking under
      certain configs.
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
  5. 15 Jan, 2016 1 commit
  6. 07 Nov, 2015 1 commit
  7. 17 Sep, 2015 1 commit
  8. 03 Mar, 2015 1 commit
  9. 12 Nov, 2014 1 commit
  10. 30 Sep, 2014 2 commits
    • Liviu Dudau's avatar
      of/pci: Add support for parsing PCI host bridge resources from DT · cbe4097f
      Liviu Dudau authored
      Provide a function to parse the PCI DT ranges that can be used to create a
      pci_host_bridge structure together with its associated bus.
      Signed-off-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
      [make io_base parameter optional]
      Signed-off-by: default avatarRobert Richter <rrichter@cavium.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
    • Liviu Dudau's avatar
      of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr() · 41e5c0f8
      Liviu Dudau authored
      Add pci_get_new_domain_nr() to allocate a new domain number and
      of_get_pci_domain_nr() to retrieve the PCI domain number of a given device
      from DT.  Host bridge drivers or architecture-specific code can choose to
      implement their PCI domain number policy using these two functions.
      Using of_get_pci_domain_nr() guarantees a stable PCI domain number on every
      boot provided that all host bridge controllers are assigned a number in the
      device tree using "linux,pci-domain" property.  Mixing use of
      pci_get_new_domain_nr() and of_get_pci_domain_nr() is not recommended as it
      can lead to potentially conflicting domain numbers being assigned to root
      buses behind different host bridges.
      Signed-off-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
  11. 04 Jun, 2014 1 commit
    • Arnd Bergmann's avatar
      of/irq: provide more wrappers for !CONFIG_OF · 64c5c759
      Arnd Bergmann authored
      The pci-rcar driver is enabled for compile tests, and this has
      now shown that the driver cannot build without CONFIG_OF,
      following the inclusion of f8f2fe73 "PCI: rcar: Use new OF
      interrupt mapping when possible":
      drivers/built-in.o: In function `rcar_pci_map_irq':
      :(.text+0x1cc7c): undefined reference to `of_irq_parse_and_map_pci'
      pci/host/pcie-rcar.c: In function 'pci_dma_range_parser_init':
      pci/host/pcie-rcar.c:875:2: error: implicit declaration of function 'of_n_addr_cells' [-Werror=implicit-function-declaration]
      As pointed out by Ben Dooks and Geert Uytterhoeven, this is actually
      supposed to build fine, which we can achieve if we make the
      declaration of of_irq_parse_and_map_pci conditional on CONFIG_OF
      and provide an empty inline function otherwise, as we do for
      a lot of other of interfaces.
      This lets us build the rcar_pci driver again without CONFIG_OF
      for build testing. All platforms using this driver select OF,
      so this doesn't change anything for the users.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: devicetree@vger.kernel.org
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Magnus Damm <damm@opensource.se>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ben Dooks <ben.dooks@codethink.co.uk>
      Cc: linux-pci@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      [robh: drop wrappers for of_n_addr_cells and of_n_size_cells which are
      low-level functions that should not be used for !OF]
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
  12. 24 Oct, 2013 3 commits
  13. 12 Aug, 2013 1 commit
  14. 19 May, 2013 2 commits
  15. 21 May, 2012 1 commit
  16. 07 Jun, 2011 1 commit
    • Benjamin Herrenschmidt's avatar
      pci/of: Match PCI devices to OF nodes dynamically · 98d9f30c
      Benjamin Herrenschmidt authored
      powerpc has two different ways of matching PCI devices to their
      corresponding OF node (if any) for historical reasons. The ppc64 one
      does a scan looking for matching bus/dev/fn, while the ppc32 one does a
      scan looking only for matching dev/fn on each level in order to be
      agnostic to busses being renumbered (which Linux does on some
      This removes both and instead moves the matching code to the PCI core
      itself. It's the most logical place to do it: when a pci_dev is created,
      we know the parent and thus can do a single level scan for the matching
      device_node (if any).
      The benefit is that all archs now get the matching for free. There's one
      hook the arch might want to provide to match a PHB bus to its device
      node. A default weak implementation is provided that looks for the
      parent device device node, but it's not entirely reliable on powerpc for
      various reasons so powerpc provides its own.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: default avatarMichal Simek <monstr@monstr.eu>
      Acked-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
  17. 04 Feb, 2011 1 commit