Subject: Re: PCI-PCI bridge scanning broken on 460EX

From: Felix Radensky <[email-masked]>
Date: Mon, 11 Jan 2010 18:46:07 +0200

Hi Stef

Felix Radensky wrote:
> Hi Stef,
>
> Stef van Os wrote:
>> Hello Felix,
>>
>> I had a problem similar to this on the 440GX, the PCI code was not
>> sending type 1 transactions when scanning behind bridges. Perhaps you
>> could try this:
>>
>> Index: linux/arch/powerpc/sysdev/ppc4xx_pci.c
>> ===================================================================
>> --- linux/arch/powerpc/sysdev/ppc4xx_pci.c      (revision 26)
>> +++ linux/arch/powerpc/sysdev/ppc4xx_pci.c      (revision 27)
>> @@ -569,7 +569,7 @@
>>         hose->last_busno = bus_range ? bus_range[1] : 0xff;
>>
>>         /* Setup config space */
>> -       setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4,
>> 0);
>> +       setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 0x4,
>> PPC_INDIRECT_TYPE_SET_CFG_TYPE);
>>
>>         /* Disable all windows */
>>         writel(0, reg + PCIX0_POM0SA);
>>
>>
>>
>> With kind regards / Met vriendelijke groet,
>>
>> Stef van Os
>>
>> Prodrive B.V.
>>
>>   
>
> I think you patch is a valid one, and should be applied, but 
> unfortunately it doesn't fix by problem.
> BTW, in u-boot transaction type bit is set correctly.
>
>

It seems I was wrong. I've manually applied the patch at the wrong 
place. After patching the correct function
I'm not getting hard resets any more, which is a great improvement ! 
Thanks a lot, I really appreciate your help !

Unfortunately not all problems are gone. PLX is now identified 
correctly, but device behind it is not detected,
although u-boot detects it correctly. See below.

PCI: Probing PCI hardware
pci_bus 0000:00: scanning bus
pci 0000:00:02.0: found [3388:0020] class 000604 header type 01
pci 0000:00:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:00:02.0: calling quirk_resource_alignment+0x0/0x200
pci 0000:00:02.0: supports D1 D2
pci 0000:00:02.0: PME# supported from D0 D1 D2 D3hot
pci 0000:00:02.0: PME# disabled
pci_bus 0000:00: fixups for bus
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 0
pci_bus 0000:01: scanning bus
pci 0000:01:02.0: found [3388:0020] class 000604 header type 01
pci 0000:01:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci 0000:01:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci 0000:01:02.0: calling quirk_resource_alignment+0x0/0x200
pci 0000:01:02.0: supports D1 D2
pci 0000:01:02.0: PME# supported from D0 D1 D2 D3hot
pci 0000:01:02.0: PME# disabled
pci_bus 0000:01: fixups for bus
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0:   bridge window [mem 0x80000000-0x8c0fffff]
pci 0000:01:02.0: scanning behind bridge, config 010100, pass 0
pci 0000:01:02.0: bus configuration invalid, reconfiguring
pci 0000:01:02.0: scanning behind bridge, config 010100, pass 1
pci_bus 0000:01: bus scan returning with max=01
pci 0000:00:02.0: scanning behind bridge, config 010100, pass 1
pci_bus 0000:00: bus scan returning with max=01
pci 0000:00:02.0: disabling bridge window [mem 0xd80000000-0xd8c0fffff] 
to [bus 01-01] (unused)
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0:   bridge window [io  disabled]
pci 0000:00:02.0:   bridge window [mem disabled]
pci 0000:00:02.0:   bridge window [mem pref disabled]
pci_bus 0000:00: resource 0 [io  0x0000-0xffff]
pci_bus 0000:00: resource 1 [mem 0xd80000000-0xdffffffff]
pci_bus 0000:01: resource 1 [??? 57982058496-58184433663 flags 0x0]

Any ideas what could be wrong now ?

Thanks a lot.

Felix.