linux can't read pci bus configure space of a scsi controller (lsi53c1020)
yuan tian
ioecas at gmail.com
Mon Sep 10 17:03:09 EST 2007
Hi,
I have a board based on ocotea(ppc440gx) as reference.
Without PCI bus,the linux system can run successfully on
the board. when the PCI bus is used,the system hung.
on the pci bus ,there are two pci devices.one is a scsi
controller,the other is a fpga. i found the system hung at
indirect_pci.c.
indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 *val)
{
struct pci_controller *hose = bus->sysdata;
volatile void __iomem *cfg_data;
u8 cfg_type = 0;
if (ppc_md.pci_exclude_device)
if (ppc_md.pci_exclude_device(bus->number, devfn))
return PCIBIOS_DEVICE_NOT_FOUND;
if (hose->set_cfg_type)
if (bus->number != hose->first_busno)
cfg_type = 1;
PCI_CFG_OUT(hose->cfg_addr,
(0x80000000 | ((bus->number - hose->bus_offset) << 16)
| (devfn << 8) | ((offset & 0xfc) | cfg_type)));
/*
* Note: the caller has already checked that offset is
* suitably aligned and that len is 1, 2 or 4.
*/
cfg_data = hose->cfg_data + (offset & 3);
switch (len) {
case 1:
*val = in_8(cfg_data);
break;
case 2:
*val = in_le16(cfg_data);
break;
default:
*val = in_le32(cfg_data);
break;
}
return PCIBIOS_SUCCESSFUL;
}
the system run to *val = in_le32(cfg_data) , the board hung.
when i get out scsi controller,the system can run successfully.
the vxworks run successfully on the board with these two pci devices.
so i think the board have no problem on the hardware.
my question is :
why can linux read fpga pci configure space and can't read scsi
controller(lsi 53c1020)?
any help will be appreciated!
Regards,
--
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070910/4556efc5/attachment.htm
More information about the Linuxppc-embedded
mailing list