Skip to content

Commit

Permalink
PCI: Move OF-related PCI functions into PCI core
Browse files Browse the repository at this point in the history
Following what has been done for other subsystems, move the remaining PCI
related code out of drivers/of/ and into drivers/pci/of.c

With this, we can kill a few kconfig symbols.

Signed-off-by: Rob Herring <robh@kernel.org>
[bhelgaas: minor whitespace, comment cleanups]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Frank Rowand <frowand.list@gmail.com>
  • Loading branch information
Rob Herring authored and Bjorn Helgaas committed Jan 17, 2018
1 parent 1291a0d commit 4670d61
Show file tree
Hide file tree
Showing 8 changed files with 517 additions and 542 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-mvebu/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ menuconfig ARCH_MVEBU
select ZONE_DMA if ARM_LPAE
select GPIOLIB
select PCI_QUIRKS if PCI
select OF_ADDRESS_PCI

if ARCH_MVEBU

Expand Down
16 changes: 0 additions & 16 deletions drivers/of/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ config OF_DYNAMIC
config OF_ADDRESS
def_bool y
depends on !SPARC && HAS_IOMEM
select OF_ADDRESS_PCI if PCI

config OF_ADDRESS_PCI
bool

config OF_IRQ
def_bool y
Expand All @@ -82,18 +78,6 @@ config OF_MDIO
help
OpenFirmware MDIO bus (Ethernet PHY) accessors

config OF_PCI
def_tristate PCI
depends on PCI
help
OpenFirmware PCI bus accessors

config OF_PCI_IRQ
def_tristate PCI
depends on OF_PCI && OF_IRQ
help
OpenFirmware PCI IRQ routing helpers

config OF_RESERVED_MEM
depends on OF_EARLY_FLATTREE
bool
Expand Down
2 changes: 0 additions & 2 deletions drivers/of/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ obj-$(CONFIG_OF_IRQ) += irq.o
obj-$(CONFIG_OF_NET) += of_net.o
obj-$(CONFIG_OF_UNITTEST) += unittest.o
obj-$(CONFIG_OF_MDIO) += of_mdio.o
obj-$(CONFIG_OF_PCI) += of_pci.o
obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o
obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
obj-$(CONFIG_OF_RESOLVE) += resolver.o
obj-$(CONFIG_OF_OVERLAY) += overlay.o
Expand Down
8 changes: 3 additions & 5 deletions drivers/of/address.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr)
return IORESOURCE_MEM;
}

#ifdef CONFIG_OF_ADDRESS_PCI
#ifdef CONFIG_PCI
/*
* PCI bus specific translator
*/
Expand Down Expand Up @@ -171,9 +171,7 @@ static int of_bus_pci_translate(__be32 *addr, u64 offset, int na)
{
return of_bus_default_translate(addr + 1, offset, na - 1);
}
#endif /* CONFIG_OF_ADDRESS_PCI */

#ifdef CONFIG_PCI
const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
unsigned int *flags)
{
Expand Down Expand Up @@ -426,7 +424,7 @@ static unsigned int of_bus_isa_get_flags(const __be32 *addr)
*/

static struct of_bus of_busses[] = {
#ifdef CONFIG_OF_ADDRESS_PCI
#ifdef CONFIG_PCI
/* PCI */
{
.name = "pci",
Expand All @@ -437,7 +435,7 @@ static struct of_bus of_busses[] = {
.translate = of_bus_pci_translate,
.get_flags = of_bus_pci_get_flags,
},
#endif /* CONFIG_OF_ADDRESS_PCI */
#endif /* CONFIG_PCI */
/* ISA */
{
.name = "isa",
Expand Down
Loading

0 comments on commit 4670d61

Please sign in to comment.