* [PATCH v2 4/9] Float the PCi bus number assignments on MPC8641HPCN board.
@ 2007-06-04 22:30 Jon Loeliger
0 siblings, 0 replies; only message in thread
From: Jon Loeliger @ 2007-06-04 22:30 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
From: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Acked-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 +
arch/powerpc/platforms/86xx/pci.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 1051702..9259788 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -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);
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c
index 07ff52c..c80d8f1 100644
--- a/arch/powerpc/platforms/86xx/pci.c
+++ b/arch/powerpc/platforms/86xx/pci.c
@@ -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;
}
--
1.5.0.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-04 22:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-04 22:30 [PATCH v2 4/9] Float the PCi bus number assignments on MPC8641HPCN board Jon Loeliger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).