linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "yuan tian" <ioecas@gmail.com>
To: linuxppc-embedded@ozlabs.org
Subject: linux can't read pci bus configure space of a scsi controller (lsi53c1020)
Date: Mon, 10 Sep 2007 15:03:09 +0800	[thread overview]
Message-ID: <5a65c5e70709100003w3d40013eoa2fe189dafa4a977@mail.gmail.com> (raw)

[-- 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 --]

                 reply	other threads:[~2007-09-10  7:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a65c5e70709100003w3d40013eoa2fe189dafa4a977@mail.gmail.com \
    --to=ioecas@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).