Commit 923b553a authored by Kumar Gala's avatar Kumar Gala Committed by Linus Torvalds

[PATCH] ppc32: Fix PCI2 support on MPC8555/41 CDS systems

This fixes an issue related to the second PCI host controller working on
MPC8555/41 systems.

We track the last PCI bus number on PCI1 so that the PCI2 host
controller can properly exclude itself at the right time, exclusion
should occur after initial setup so that the early pci config cycles in
setting PCI2 actually get to the controller. 
Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 240f91de
......@@ -281,15 +281,16 @@ mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
#define ARCADIA_HOST_BRIDGE_IDSEL 17
#define ARCADIA_2ND_BRIDGE_IDSEL 3
extern int mpc85xx_pci1_last_busno;
int
mpc85xx_exclude_device(u_char bus, u_char devfn)
{
if (bus == 0 && PCI_SLOT(devfn) == 0)
return PCIBIOS_DEVICE_NOT_FOUND;
#ifdef CONFIG_85xx_PCI2
/* With the current code we know PCI2 will be bus 2, however this may
* not be guarnteed */
if (bus == 2 && PCI_SLOT(devfn) == 0)
if (mpc85xx_pci1_last_busno)
if (bus == (mpc85xx_pci1_last_busno + 1) && PCI_SLOT(devfn) == 0)
return PCIBIOS_DEVICE_NOT_FOUND;
#endif
/* We explicitly do not go past the Tundra 320 Bridge */
......
......@@ -243,6 +243,8 @@ mpc85xx_setup_pci2(struct pci_controller *hose)
}
#endif /* CONFIG_85xx_PCI2 */
int mpc85xx_pci1_last_busno = 0;
void __init
mpc85xx_setup_hose(void)
{
......@@ -341,6 +343,9 @@ mpc85xx_setup_hose(void)
IORESOURCE_IO, "PCI2 host bridge");
hose_b->last_busno = pciauto_bus_scan(hose_b, hose_b->first_busno);
/* let board code know what the last bus number was on PCI1 */
mpc85xx_pci1_last_busno = hose_a->last_busno;
#endif
return;
}
......
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