<div>Hi,</div>
<div>I have a board based on ocotea(ppc440gx) as reference.<br>Without PCI bus,the linux system can run successfully on<br>the board. when the PCI bus is used,the system hung.<br>on the pci bus ,there are two pci devices.one
is a scsi <br>controller,the other is a fpga. i found the system hung at<br>indirect_pci.c.</div>
<p><br> indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,<br> int len, u32 *val)<br>{<br> struct pci_controller *hose = bus->sysdata;<br> volatile void __iomem *cfg_data;<br> u8 cfg_type = 0;
</p>
<p> if (ppc_md.pci_exclude_device)<br> if (ppc_md.pci_exclude_device(bus->number, devfn))<br> return PCIBIOS_DEVICE_NOT_FOUND;<br> <br> if (hose->set_cfg_type)<br> if (bus->number != hose->first_busno)<br>
cfg_type = 1;</p>
<p> PCI_CFG_OUT(hose->cfg_addr, <br> (0x80000000 | ((bus->number - hose->bus_offset) << 16)<br> | (devfn << 8) | ((offset & 0xfc) | cfg_type)));</p>
<p> /*<br> * Note: the caller has already checked that offset is<br> * suitably aligned and that len is 1, 2 or 4.<br> */<br> cfg_data = hose->cfg_data + (offset & 3);<br> switch (len) {<br> case 1:<br> *val = in_8(cfg_data);
<br> break;<br> case 2:<br> *val = in_le16(cfg_data);<br> break;<br> default:<br> *val = in_le32(cfg_data);<br> break;<br> }<br> return PCIBIOS_SUCCESSFUL;<br>}<br> the system run to *val = in_le32(cfg_data) , the board hung.
<br> when i get out scsi controller,the system can run successfully.</p>
<p> the vxworks run successfully on the board with these two pci devices.<br> so i think the board have no problem on the hardware.</p>
<p> my question is :<br> why can linux read fpga pci configure space and can't read scsi <br> controller(lsi 53c1020)?</p>
<p> any help will be appreciated!<br> <br> Regards,<br> --<br> Tom</p>