Are PCI bridges automatically configured?

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Fri Feb 25 20:04:11 UTC 2005


Peter Dufault wrote:
> Are PCI bridges automatically configured without any special code?

On a board with a nice Rom monitor like PPCBug, it is
quite possible that it was initialized by the Bug.

> I changed the hardwired number of busses from 2 to BusCountPCI() in the 
> mvme5500 pcifinddevice.c, and now I am seeing the PCI bus on the other 
> side of the DEC 21150 bridge:
> 
> cexp_main>BSP_pciFindDevice(0x16d5,0x4d4d,0,pbus,pdev,pfun)
> BSP_pciFindDevice: found 0x643011AB at 0/0/0
> BSP_pciFindDevice: found 0x643011AB at 0/0/1
> BSP_pciFindDevice: found 0x643011AB at 0/0/2
> BSP_pciFindDevice: found 0x643011AB at 0/0/3
> BSP_pciFindDevice: found 0x643011AB at 0/0/4
> BSP_pciFindDevice: found 0x643011AB at 0/0/5
> BSP_pciFindDevice: found 0x643011AB at 0/0/6
> BSP_pciFindDevice: found 0x643011AB at 0/0/7
> BSP_pciFindDevice: found 0x445716D5 at 0/6/0
> BSP_pciFindDevice: found 0x00263388 at 0/10/0
> BSP_pciFindDevice: found 0x000010E3 at 1/0/0
> BSP_pciFindDevice: found 0x00221011 at 1/4/0
> BSP_pciFindDevice: found 0x4D4D16D5 at 2/2/0
> 0x00000000 (0)
> cexp_main>
> 
> so that last entry is my Acromag PMC341 card.
 >
> So now I guess I follow what I see in the libchip/network drivers for 
> setting things up using "pci_write_config_foo"?  I don't need any DEC 
> 21150 specific code anywhere?  

I can't guarantee that but is is quite likely.

 > Do the "pci_write_config_word" calls
> allocate resources?

No.  They just hide the procedure used to access the configuration space 
on the PCI bus.  It knows where it is mapped in local memory, proper
endianness, special timing, etc.

> Any "heads up" appreciated, I'm just getting started on this part.

Converting the pci calls in the BSP to use the regular pci_ ones and
specify the bus number would go a long way to helping. :)

--joel



More information about the users mailing list