linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* linux can't read pci bus configure space of a scsi controller (lsi53c1020)
@ 2007-09-10  7:03 yuan tian
  0 siblings, 0 replies; only message in thread
From: yuan tian @ 2007-09-10  7:03 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2224 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-10  7:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10  7:03 linux can't read pci bus configure space of a scsi controller (lsi53c1020) yuan tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).