Skip to content

RFC Unify definations of struct pci_controller

Andrew Murray linux-pci linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3powerpc: Move struct pci_controller to asm-genericarch/powerpc/include/asm/pci-bridge.h include/asm-generic/pci-bridge.h+82 -731 reply
2/3microblaze: Use asm-generic version of pci_controllerarch/microblaze/include/asm/pci-bridge.h include/asm-generic/pci-bridge.h+16 -610 replies
3/3pci: Use common definations of INDIRECT_TYPE_*arch/microblaze/include/asm/pci-bridge.h arch/powerpc/include/asm/pci-bridge.h arch/powerpc/sysdev/fsl_pci.c +4 more+43 -670 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Unify definations of struct pci_controller

PowerPC and Microblaze have nearly identical definations of struct pci_controller - this patch unifies them in asm-generic to reduce code duplication and to allow new architectures to reuse.

This patchset follows and depends on "of/pci: Provide common support for PCI DT parsing" which provided common 'ranges' parsing code which uses an architecture defined struct pci_controller. This patch is currently in Jason Coopers mvebu-next/pcie branch.

It is hoped this will pave the way for providing common implementations of commonly duplicated functions found across the architectures such as pcibios_alloc|free_controller and pcibios_setup_phb_resources type functions.

Andrew Murray (3):
powerpc: Move struct pci_controller to asm-generic
microblaze: Use asm-generic version of pci_controller
pci: Use common definations of INDIRECT_TYPE_*

 arch/microblaze/include/asm/pci-bridge.h |   70 +-----------------------
 arch/powerpc/include/asm/pci-bridge.h    |   82 ---------------------------
 arch/powerpc/sysdev/fsl_pci.c            |   16 +++---
 arch/powerpc/sysdev/indirect_pci.c       |   20 +++---
 arch/powerpc/sysdev/ppc4xx_pci.c         |    4 +-
 arch/powerpc/sysdev/xilinx_pci.c         |    2 +-
 include/asm-generic/pci-bridge.h         |   90 ++++++++++++++++++++++++++++++
 7 files changed, 112 insertions(+), 172 deletions(-)