Skip to content

Commit 4670d61

Browse files
robherringbjorn-helgaas
authored andcommitted
PCI: Move OF-related PCI functions into PCI core
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>
1 parent 1291a0d commit 4670d61

File tree

8 files changed

+517
-542
lines changed

8 files changed

+517
-542
lines changed

arch/arm/mach-mvebu/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ menuconfig ARCH_MVEBU
1010
select ZONE_DMA if ARM_LPAE
1111
select GPIOLIB
1212
select PCI_QUIRKS if PCI
13-
select OF_ADDRESS_PCI
1413

1514
if ARCH_MVEBU
1615

drivers/of/Kconfig

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ config OF_DYNAMIC
6262
config OF_ADDRESS
6363
def_bool y
6464
depends on !SPARC && HAS_IOMEM
65-
select OF_ADDRESS_PCI if PCI
66-
67-
config OF_ADDRESS_PCI
68-
bool
6965

7066
config OF_IRQ
7167
def_bool y
@@ -82,18 +78,6 @@ config OF_MDIO
8278
help
8379
OpenFirmware MDIO bus (Ethernet PHY) accessors
8480

85-
config OF_PCI
86-
def_tristate PCI
87-
depends on PCI
88-
help
89-
OpenFirmware PCI bus accessors
90-
91-
config OF_PCI_IRQ
92-
def_tristate PCI
93-
depends on OF_PCI && OF_IRQ
94-
help
95-
OpenFirmware PCI IRQ routing helpers
96-
9781
config OF_RESERVED_MEM
9882
depends on OF_EARLY_FLATTREE
9983
bool

drivers/of/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ obj-$(CONFIG_OF_IRQ) += irq.o
1010
obj-$(CONFIG_OF_NET) += of_net.o
1111
obj-$(CONFIG_OF_UNITTEST) += unittest.o
1212
obj-$(CONFIG_OF_MDIO) += of_mdio.o
13-
obj-$(CONFIG_OF_PCI) += of_pci.o
14-
obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o
1513
obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
1614
obj-$(CONFIG_OF_RESOLVE) += resolver.o
1715
obj-$(CONFIG_OF_OVERLAY) += overlay.o

drivers/of/address.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr)
9696
return IORESOURCE_MEM;
9797
}
9898

99-
#ifdef CONFIG_OF_ADDRESS_PCI
99+
#ifdef CONFIG_PCI
100100
/*
101101
* PCI bus specific translator
102102
*/
@@ -171,9 +171,7 @@ static int of_bus_pci_translate(__be32 *addr, u64 offset, int na)
171171
{
172172
return of_bus_default_translate(addr + 1, offset, na - 1);
173173
}
174-
#endif /* CONFIG_OF_ADDRESS_PCI */
175174

176-
#ifdef CONFIG_PCI
177175
const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size,
178176
unsigned int *flags)
179177
{
@@ -426,7 +424,7 @@ static unsigned int of_bus_isa_get_flags(const __be32 *addr)
426424
*/
427425

428426
static struct of_bus of_busses[] = {
429-
#ifdef CONFIG_OF_ADDRESS_PCI
427+
#ifdef CONFIG_PCI
430428
/* PCI */
431429
{
432430
.name = "pci",
@@ -437,7 +435,7 @@ static struct of_bus of_busses[] = {
437435
.translate = of_bus_pci_translate,
438436
.get_flags = of_bus_pci_get_flags,
439437
},
440-
#endif /* CONFIG_OF_ADDRESS_PCI */
438+
#endif /* CONFIG_PCI */
441439
/* ISA */
442440
{
443441
.name = "isa",

0 commit comments

Comments
 (0)