Float the PCi bus number assignments on MPC8641HPCN board.
PATCH 4/8 Float the PCi bus number assignments on MPC8641HPCN board.
From: Zhang Wei <[email protected]>
Admittedly this is a non-ideal solution, but fixing it properly might require systemic PCI bus renumbering changes that we are not prepared to do yet.
Signed-off-by Zhang Wei <[email protected]>
Acked-by Roy Zang <[email protected]>
Signed-off-by Jon Loeliger <[email protected]>
---
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 + arch/powerpc/platforms/86xx/pci.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +1 -0
@@ -363,6 +363,7 @@ mpc86xx_hpcn_setup_arch(void) }#ifdef CONFIG_PCI + pci_assign_all_buses =1 ;for (np =NULL ; (np =of_find_node_by_type (np,"pci" )) !=NULL ;)add_bridge (np);
arch/powerpc/platforms/86xx/pci.c +12 -0
@@ -136,6 +136,18 @@ mpc86xx_setup_pcie(struct pci_controller *hose, u32 pcie_offset, u32 pcie_size)int mpc86xx_exclude_device (u_char bus,u_char devfn) { +struct pci_controller *hose; + + hose =pci_bus_to_hose (bus); +if (unlikely (!hose)) +return PCIBIOS_DEVICE_NOT_FOUND ; + +/* Correcting the hose->bus_offset value. */ +out_be32 (hose->cfg_addr,0x80000000 | ((hose->first_busno + - hose->bus_offset) <<16 )); +if (unlikely (in_le32 (hose->cfg_data) ==0xffffffff )) + hose->bus_offset = hose->bus_offset ?0 : hose->first_busno; +return PCIBIOS_SUCCESSFUL ; }
Signature · 1 line
1.5.0.3