linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Prashant Bhole <prashantsmailcenter@gmail.com>
Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: Kernel cannot see PCI device
Date: Thu, 19 May 2011 11:58:54 -0600	[thread overview]
Message-ID: <BANLkTimoyzERHjw_kQ5SAbNWudWJoX7yMA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinNSXCQJ=WJm6CkfttOgpVz1XOCBQ@mail.gmail.com>

On Thu, May 19, 2011 at 6:41 AM, Prashant Bhole
<prashantsmailcenter@gmail.com> wrote:
> On Wed, May 18, 2011 at 7:44 PM, Bjorn Helgaas <bhelgaas@google.com> wrot=
e:
>> On Wed, May 18, 2011 at 4:02 AM, Prashant Bhole
>> <prashantsmailcenter@gmail.com> wrote:
>>> On Mon, May 2, 2011 at 10:21 AM, Prashant Bhole
>>> <prashantsmailcenter@gmail.com> wrote:
>>>>
>>>> I have a custom made powerpc 460EX board. On that board u-boot
>>>> can see a PCI device but Linux kernel cannot see it. What could be the=
 problem?
>>>>
>>>> On u-boot "pci =A02" commands displays following device:
>>>> Scanning PCI devices on bus 2
>>>> BusDevFun =A0VendorId =A0 DeviceId =A0 Device Class =A0 =A0 =A0 Sub-Cl=
ass
>>>> _____________________________________________________________
>>>> 02.00.00 =A0 0x1000 =A0 =A0 0x0072 =A0 =A0 Mass storage controller 0x0=
0
>>>>
>>>> And when the kernel is booted, there is only one pci device (bridge):
>>>> #ls /sys/bus/pci/devices
>>>> 0000:80:00.0
>>>
>>> a call to pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l) retu=
rns
>>> positive value in the function pci_scan_device(), which means VENDOR_ID=
 reading
>>> failed. I could not find the reason. Any hints?
>>
>> My guess would be that Linux didn't find the host bridge to the
>> hierarchy containing bus 2. =A0I would guess the host bridge info is
>> supposed to come from OF. =A0More information, like the complete u-boot
>> PCI scan and the kernel dmesg log, would be useful. =A0And maybe u-boot
>> has a way to dump the OF device tree?
>
> I am not using OF for booting u-boot. OF is being used for booting the ke=
rnel.
> Not sure whether the host bridge info is coming from OF.
> Device tree has two pciex nodes with following property:
>
> compatible =3D "ibm,plb-pciex-460ex", "ibm,plb-pciex"
> I think that node represents a pciex bus not the bridge.

I think you have three PCI host bridges:

  PCIE1 to domain 0000 [bus 80-bf]  /plb/pciex@d20000000
  PCIX0 to domain 0001 [bus 00-3f]  /plb/pci@c0ec00000
  PCIE0 to [bus 40-7f] ("disabled via device-tree")

The scan below PCIE1 seems to work; at least, we found a P2P bridge at
0000:80:00.0.

The scan below PCIX0 (bus 0001:00) doesn't find anything.  You really
need a powerpc expert to help here, but in their absence, my guess
would be something's wrong with config space access, so I would start
by just adding some printks to ppc4xx_probe_pcix_bridge() to see if
the rsrc_cfg address looks reasonable.  You might need a chip spec or
maybe you can compare it to the device tree (I have no idea what the
relation between the device tree and OF is).

You mentioned the u-boot "pci 2" command earlier.  It found a device
on bus 2, which means there must be at least one P2P bridge to get you
from bus 0 to bus 2.  So the output of "pci 0", "pci 1", "pci 80", and
"pci 81" (to compare with what Linux found) would be interesting.

Bjorn

  reply	other threads:[~2011-05-19 17:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BANLkTimm98Xxx8y9qM8DUSR4rTDPSFpgHw@mail.gmail.com>
     [not found] ` <BANLkTi=tvyOPoN3f3v_C+NuVOwr+YKaRJA@mail.gmail.com>
2011-05-18 14:14   ` Kernel cannot see PCI device Bjorn Helgaas
2011-05-19 12:41     ` Prashant Bhole
2011-05-19 17:58       ` Bjorn Helgaas [this message]
2011-05-19 23:12         ` Benjamin Herrenschmidt
2011-05-19 23:19           ` Bjorn Helgaas
2011-05-24  4:55             ` Prashant Bhole
2011-05-24 21:43               ` Benjamin Herrenschmidt
2011-05-25  9:57                 ` Stefan Roese
2011-05-25 10:48                   ` Prashant Bhole

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=BANLkTimoyzERHjw_kQ5SAbNWudWJoX7yMA@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=prashantsmailcenter@gmail.com \
    /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).