Fwd: PCI device not working

4 messages, 2 authors, 2012-10-31 · open the first message on its own page

Fwd: PCI device not working

From: Davide Viti <hidden>
Date: 2012-10-05 08:54:02

(just realized I did not send this to the mailing list: sorry for the noise)

Hi Kumar,

2012/10/4 Kumar Gala [off-list ref]:
On Oct 4, 2012, at 7:24 AM, Davide Viti wrote:
quoted
Hi,
it turns out that if define CONFIG_PCI_NOSCAN in u-boot (as per [1]), the
device behind the second controller is detected by the  Linux kernel.

Would
you suggest any particular patch I should apply to fix this (I'm using kernel
2.6.34)

thanx alot in advance
Davide

[1] http://permalink.gmane.org/gmane.linux.ports.ppc.embedded/20140
My suggestion would be to try and dump all the controller registers between the case that works and doesn't and compare.  There's some minor setting difference that I'm guessing is causing issues.

- k
Here's a diff for the configurations for the controller, obtained via

hexdump -C /sys/bus/pci/devices/0001\:02\:00.0/config
--- cfg0_2_NOK.txt      2012-10-05 09:37:44.854607000 +0200
+++ cfg0_2_OK.txt       2012-10-05 09:36:58.337399000 +0200

 00000400  00 00 00 00 16 00 00 00  e2 04 00 00 00 00 00 00  |................|
 00000410  04 00 00 00 01 00 00 00  00 00 00 00 40 40 00 00  |............@@..|
 00000420  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-00000430  00 00 00 00 00 00 00 00  21 81 9e 00 1a 90 01 00  |........!.......|
+00000430  00 00 00 00 00 00 00 00  21 81 9e 00 83 20 08 00  |........!.... ..|
 00000440  10 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 00000450  ce d7 14 00 20 1e fc 01  00 00 00 00 5c 0c 00 00  |.... .......\...|
 00000460  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 00000470  57 19 00 01 11 00 20 0b  00 00 00 00 01 00 00 00  |W..... .........|
 00000480  44 3d 00 00 00 00 00 00  f0 07 00 00 00 00 00 00  |D=..............|
 00000490  c0 07 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
-000004a0  00 00 00 00 00 00 00 00  00 00 00 00 3c 01 00 00  |............<...|
+000004a0  00 00 00 00 00 00 00 00  00 00 00 00 7e 01 00 00  |............~...|
 000004b0  00 00 00 00 00 00 00 00  28 04 01 80 85 20 00 00  |........(.... ..|
 000004c0  ff 00 00 00 00 00 00 00  00 00 00 00 11 00 00 00  |................|
 000004d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 000004e0  00 00 00 00 01 01 00 00  01 01 00 00 00 00 00 00  |................|
-000004f0  0a 00 00 00 01 00 20 04  00 00 00 00 79 47 0e eb  |...... .....yG..|
+000004f0  4a 00 00 01 03 00 00 04  00 00 00 00 01 00 01 00  |J...............|
 00000500  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 00000510  00 00 00 00 00 00 00 00  21 01 00 00 00 00 00 00  |........!.......|
 00000520  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
Hope this mail client will not screw up the text...
Just in case,
I've pasted the entire register dumps to [1].

thank you so much for your time,
D.

[1] http://pastebin.com/zzAtzCeS

Re: PCI device not working

From: Kumar Gala <hidden>
Date: 2012-10-05 12:47:35

On Oct 5, 2012, at 3:54 AM, Davide Viti wrote:
(just realized I did not send this to the mailing list: sorry for the =
noise)
=20
Hi Kumar,
=20
2012/10/4 Kumar Gala [off-list ref]:
quoted
=20
On Oct 4, 2012, at 7:24 AM, Davide Viti wrote:
=20
quoted
Hi,
it turns out that if define CONFIG_PCI_NOSCAN in u-boot (as per =
[1]), the
quoted
quoted
device behind the second controller is detected by the  Linux =
kernel.
quoted
quoted
=20
Would
you suggest any particular patch I should apply to fix this (I'm =
using kernel
quoted
quoted
2.6.34)
=20
thanx alot in advance
Davide
=20
[1] http://permalink.gmane.org/gmane.linux.ports.ppc.embedded/20140
=20
My suggestion would be to try and dump all the controller registers =
between the case that works and doesn't and compare.  There's some minor =
setting difference that I'm guessing is causing issues.
quoted
=20
- k
When I said controller registers, I meant the FSL PCI controller and the =
CCSR registers not the PCI cfg register space

- k=

Re: PCI device not working

From: Davide <hidden>
Date: 2012-10-25 08:21:45

Hi Kumar,

On Fri, Oct 05, 2012 at 07:47:24AM -0500, Kumar Gala wrote:
On Oct 5, 2012, at 3:54 AM, Davide Viti wrote:
quoted
quoted
On Oct 4, 2012, at 7:24 AM, Davide Viti wrote:
quoted
Hi,
it turns out that if define CONFIG_PCI_NOSCAN in u-boot (as per [1]), the
device behind the second controller is detected by the  Linux kernel.

Would
you suggest any particular patch I should apply to fix this (I'm using kernel
2.6.34)

thanx alot in advance
Davide

[1] http://permalink.gmane.org/gmane.linux.ports.ppc.embedded/20140
My suggestion would be to try and dump all the controller registers between the case that works and doesn't and compare.  There's some minor setting difference that I'm guessing is causing issues.

- k
When I said controller registers, I meant the FSL PCI controller and the CCSR registers not the PCI cfg register space
I've collected a complete dump of the registers in the working and not working cases

0x9000: 0x80000048 (not working) -> 0x8003007c (ok)
0x9004: 0x00000000 (not working) -> 0x08000000 (ok)

According to the p1020 manual, the register fall in the PCI Express controller 2 area,
in particular:

0x9000 PEX_CONFIG_ADDR—PCI Express configuration address register
0x9004 PEX_CONFIG_DATA—PCI Express configuration data register

does that ring any bell?

thank you in advance
Davide

Re: PCI device not working

From: Davide <hidden>
Date: 2012-10-31 08:53:07

Hi Kumar,
I try to summarize the problem in the hope to fix it for good:
Linux Kernel (2.6.34-6) did not detect one of the two pci devices
that instead u-boot could "see".
This was worakounded by defining CONFIG_PCI_NOSCAN in u-boot as per [1]

To find out the root cause of the problem, you've suggested to dump all 
the controller registers between the case that works and doesn't and 
see what changes.

Te following registers have different values in the faulty situation (u-boot 
compiled without CONFIG_PCI_NOSCAN definition) vs the working case (u-boot
compiled with CONFIG_PCI_NOSCAN defined):

0x9000: 0x80000048 (not working) -> 0x8003007c (ok)
0x9004: 0x00000000 (not working) -> 0x08000000 (ok)

The register values were obtained with the devmem utility.

Thanx very much for your help,
Davide

[1] http://permalink.gmane.org/gmane.linux.ports.ppc.embedded/20140
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help