[PATCH 3/5] Float the pci bus number on MPC8641HPCN board.

Zhang Wei-r63237 Wei.Zhang at freescale.com
Fri Jun 1 12:01:20 EST 2007


Hi, Kumar, 

> 
> Can this be fixed by just setting hose->bus_offset in add_bridge?
> 
> Doing this in exclude is very bad.

That's my original doing. If there a PCI bridge card be pluged into PCI
slot of hose0, I can not ensue the bus_offset number of hose1.

Wei.

> 
> - k
> 
> >> -----Original Message-----
> >> From: Wade Farnsworth [mailto:wfarnsworth at mvista.com]
> >> Subject: Re: [PATCH 3/5] Float the pci bus number on
> >> MPC8641HPCN board.
> >>
> >> On Tue, 2007-05-22 at 11:38 +0800, Zhang Wei wrote:
> >>>  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;
> >>>  }
> >>
> >> What is the purpose of this code and why put it in
> >> mpc86xx_exclude_device?
> >>
> >> --Wade
> >>
> >>
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev at ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
> 
> 



More information about the Linuxppc-dev mailing list