Commit 7f102d61 authored by Pali Rohár's avatar Pali Rohár Committed by Michael Ellerman

powerpc/pci: Disable filling pci-OF-bus-map for non-chrp/powermac

Creating or filling pci-OF-bus-map property in the device-tree is
deprecated since May 2006 [1] and was used only in old platforms like
PowerMac.

Currently kernel code handles it only for chrp and powermac code. So
completely disable filling pci-OF-bus-map property for non-chrp and
non-powermac platforms.

[1] - https://lore.kernel.org/linuxppc-dev/1148016268.13249.14.camel@localhost.localdomain/Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220706104308.5390-5-pali@kernel.org
parent 70454458
...@@ -37,15 +37,12 @@ EXPORT_SYMBOL(isa_io_base); ...@@ -37,15 +37,12 @@ EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(pci_dram_offset); EXPORT_SYMBOL(pci_dram_offset);
static void fixup_cpc710_pci64(struct pci_dev* dev); static void fixup_cpc710_pci64(struct pci_dev* dev);
static u8* pci_to_OF_bus_map;
/* By default, we don't re-assign bus numbers. We do this only on /* By default, we don't re-assign bus numbers. We do this only on
* some pmacs * some pmacs
*/ */
static int pci_assign_all_buses; static int pci_assign_all_buses;
static int pci_bus_count;
/* This will remain NULL for now, until isa-bridge.c is made common /* This will remain NULL for now, until isa-bridge.c is made common
* to both 32-bit and 64-bit. * to both 32-bit and 64-bit.
*/ */
...@@ -65,6 +62,11 @@ fixup_cpc710_pci64(struct pci_dev* dev) ...@@ -65,6 +62,11 @@ fixup_cpc710_pci64(struct pci_dev* dev)
} }
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64);
#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP)
static u8* pci_to_OF_bus_map;
static int pci_bus_count;
/* /*
* Functions below are used on OpenFirmware machines. * Functions below are used on OpenFirmware machines.
*/ */
...@@ -221,6 +223,8 @@ pci_create_OF_bus_map(void) ...@@ -221,6 +223,8 @@ pci_create_OF_bus_map(void)
} }
#endif #endif
#endif /* defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP) */
void pcibios_setup_phb_io_space(struct pci_controller *hose) void pcibios_setup_phb_io_space(struct pci_controller *hose)
{ {
unsigned long io_offset; unsigned long io_offset;
...@@ -252,6 +256,8 @@ static int __init pcibios_init(void) ...@@ -252,6 +256,8 @@ static int __init pcibios_init(void)
if (pci_assign_all_buses || next_busno <= hose->last_busno) if (pci_assign_all_buses || next_busno <= hose->last_busno)
next_busno = hose->last_busno + pcibios_assign_bus_offset; next_busno = hose->last_busno + pcibios_assign_bus_offset;
} }
#if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_CHRP)
pci_bus_count = next_busno; pci_bus_count = next_busno;
/* OpenFirmware based machines need a map of OF bus /* OpenFirmware based machines need a map of OF bus
...@@ -260,6 +266,7 @@ static int __init pcibios_init(void) ...@@ -260,6 +266,7 @@ static int __init pcibios_init(void)
*/ */
if (pci_assign_all_buses) if (pci_assign_all_buses)
pcibios_make_OF_bus_map(); pcibios_make_OF_bus_map();
#endif
/* Call common code to handle resource allocation */ /* Call common code to handle resource allocation */
pcibios_resource_survey(); pcibios_resource_survey();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment