Skip to contentSkip to conversation

R: Re: PCI device not working

DISCUSSION Davide Viti 2 participants 2 messages Sep 27, 2012

lore
Share & tools
lore
#0 lore raw

Hi Kumar,

Quoted 3 lines

----Messaggio originale----
Da: [email protected]
Data:=20

27/09/2012 14.27

Quoted 2 lines

A: "Davide Viti"<[email protected]>
Cc: <linuxppc-dev@lists.

ozlabs.org>

Quoted 2 lines

Ogg: Re: PCI device not working

...

Quoted 1 line

Can you see what bus_no=20

actually gets set to in the case we scan 0001:03 ?

Quoted 2 lines

If its set to 03, can you=20

try hack it to 1.

is this what you mean?

---=20
a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c

        bus_no =3D (bus->number =3D=3D hose->first_busno) ?
                       =20

hose->self_busno : bus->number;

+ if (bus_no =3D=3D 3) {
+ printk
("*** force bus_no 3 -> 1 ***\n");
+ bus_no =3D 1;
+ }
+

I've=20
tested a kernel with the above patch and this is what is printed on the log= :

pci_bus 0001:03: scanning bus
-> ind_r_config - [/pcie@ffe0a000] devfn=3D0x0=20
offset=3D0x0 len=3D0x4 hose->indirect_type=3D0x16 hose->first_busno=3D0x2 b= us-

Quoted 1 line

number=3D0x3

*** force bus_no 3 -> 1 ***
-> ind_r_config [/pcie@ffe0a000] -=20
(bus_no=3D0x1 reg=3D0x0 cfg_data=3D0xff7eb004 len=3D0x4 hose->cfg_addr=3D0x= ff7eb000)=20
val=3D0xffffffff PCIBIOS_SUCCESSFUL

the entire log (132Kb) is available in [1]=20
and [2]

thanx for your help,
Davide

[1] http://pastebin.com/3mcbDzwY
[2] http:
//paste2.org/p/2274032

Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale pi= =C3=B9 di uno spot in TV. Per ogni nuovo abbonato 30 =E2=82=AC di premio pe= r te e per lui! Un amico al mese e parli e navighi sempre gratis: http://fr=
eelosophy.tiscali.it/

#1 lore raw

Re: PCI device not working

Quoted 11 lines · Davide Viti

Hi Kumar,
=20

Quoted 3 lines

----Messaggio originale----
Da: [email protected]
Data:=20

27/09/2012 14.27

Quoted 2 lines

A: "Davide Viti"<[email protected]>
Cc: <linuxppc-dev@lists.

ozlabs.org>

Quoted 2 lines

Ogg: Re: PCI device not working
=20

Quoted 8 lines

...

Quoted 1 line

Can you see what bus_no=20

actually gets set to in the case we scan 0001:03 ?

Quoted 2 lines

=20
If its set to 03, can you=20

try hack it to 1.
=20
is this what you mean?

It was, can you figure out in u-boot what exact config read on the bus = would return the correct thing.

The fact that when we probe the device at 0001:03 we should get back = something like cfg_data=3D0xabba1b65

- k

Quoted 16 lines

=20
---=20
a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
=20
=20

       bus_no =3D (bus->number =3D=3D hose->first_busno) ?

=20
hose->self_busno : bus->number;
=20

(quoted diff) +2 -0
+       if (bus_no =3D=3D 3) {
+         printk

("*** force bus_no 3 -> 1 ***\n");

(quoted diff) +3 -0
+         bus_no =3D 1;
+       }
+
Quoted 4 lines

=20
=20
I've=20
tested a kernel with the above patch and this is what is printed on =

the log:

Quoted 5 lines

=20
=20
pci_bus 0001:03: scanning bus
-> ind_r_config - [/pcie@ffe0a000] devfn=3D0x0=20 offset=3D0x0 len=3D0x4 hose->indirect_type=3D0x16 =

hose->first_busno=3D0x2 bus-

Quoted 4 lines
Quoted 1 line

number=3D0x3

*** force bus_no 3 -> 1 ***
-> ind_r_config [/pcie@ffe0a000] -=20 (bus_no=3D0x1 reg=3D0x0 cfg_data=3D0xff7eb004 len=3D0x4 =

hose->cfg_addr=3D0xff7eb000)=20

Quoted 7 lines

val=3D0xffffffff PCIBIOS_SUCCESSFUL
=20
the entire log (132Kb) is available in [1]=20
and [2]
=20
thanx for your help,
Davide

Quoted 8 lines

=20
[1] http://pastebin.com/3mcbDzwY
[2] http:
//paste2.org/p/2274032
=20
=20
=20
Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale =

pi=F9 di uno spot in TV. Per ogni nuovo abbonato 30 =80 di premio per te = e per lui! Un amico al mese e parli e navighi sempre gratis: =
http://freelosophy.tiscali.it/