: Add 8548 pcie bus number workaround
PATCH 1/1 : Add 8548 pcie bus number workaround
From: Zang Roy-r61911 <[email protected]>
Remove legacy pcie support for 8641 chip.
General PCI code can fully support 8641 Rev2.0 chip. For 8548 PEX controller, PCIE host controller configure space can only be accessed as "bus->number = 0" in the PCI architecture. So "bus->number == hose->bus_offset" judgment is added.
Some minor space indentation clean up.
---
Please ignore the previous and pick up this one. Sorry for it!
arch/powerpc/sysdev/fsl_pcie.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-)
arch/powerpc/sysdev/fsl_pcie.c +14 -14
@@ -47,16 +47,16 @@ indirect_read_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset,return PCIBIOS_DEVICE_NOT_FOUND ;PCIE_FIX ; -if (bus->number ==0xff ) { +if (bus->number == hose->bus_offset) {PCI_CFG_OUT (hose->cfg_addr, - (0x80000000 | ((offset &0xf00 ) <<16 ) | - ((bus->number - hose->bus_offset) <<16 ) - | (devfn <<8 ) | ((offset &0xfc ) ))); + (0x80000000 | ((offset &0xf00 ) <<16 ) | + ((bus->number - hose->bus_offset) <<16 ) + | (devfn <<8 ) | ((offset &0xfc ) ))); }else {PCI_CFG_OUT (hose->cfg_addr, - (0x80000001 | ((offset &0xf00 ) <<16 ) | - ((bus->number - hose->bus_offset) <<16 ) - | (devfn <<8 ) | ((offset &0xfc ) ))); + (0x80000000 | ((offset &0xf00 ) <<16 ) | + (bus->number <<16 ) + | (devfn <<8 ) | ((offset &0xfc ) ))); }/*
@@ -98,16 +98,16 @@ indirect_write_config_pcie(struct pci_bus *bus, unsigned int devfn, int offset,return PCIBIOS_DEVICE_NOT_FOUND ;PCIE_FIX ; -if (bus->number ==0xff ) { +if (bus->number == hose->bus_offset) {PCI_CFG_OUT (hose->cfg_addr, - (0x80000000 | ((offset &0xf00 ) <<16 ) | - ((bus->number - hose->bus_offset) <<16 ) - | (devfn <<8 ) | ((offset &0xfc ) ))); + (0x80000000 | ((offset &0xf00 ) <<16 ) | + ((bus->number - hose->bus_offset) <<16 ) + | (devfn <<8 ) | ((offset &0xfc ) ))); }else {PCI_CFG_OUT (hose->cfg_addr, - (0x80000001 | ((offset &0xf00 ) <<16 ) | - ((bus->number - hose->bus_offset) <<16 ) - | (devfn <<8 ) | ((offset &0xfc ) ))); + (0x80000000 | ((offset &0xf00 ) <<16 ) | + (bus->number <<16 ) + | (devfn <<8 ) | ((offset &0xfc ) ))); }/*
Signature · 1 line
1.5.1
Quoted 9 lines · On Jun 6, 2007, at 10:19 PM, Zang Roy-r61911 wrote:
From: Zang Roy-r61911 <[email protected]>
Remove legacy pcie support for 8641 chip.
General PCI code can fully support 8641 Rev2.0 chip. For 8548 PEX controller, PCIE host controller configure space can only be accessed as "bus->number= 0" in the PCI architecture. So "bus->number==hose->bus_offset" judgment is added.
Uugh, I'm completely confused. Does 8548 rev 2.x have some errata (or 'feature') that 8641 doesn't have?
- k
MPC8641 v2.0 have fixed the errata. And v1.0 is not supported.
Wei.
Quoted 31 lines
-----Original Message-----
From: [email protected]=20 [mailto:[email protected] g] On Behalf Of Kumar Gala
Sent: Thursday, June 07, 2007 2:49 PM
To: Zang Roy-r61911
Cc: linuxppc-dev list; Paul Mackerras
Subject: Re: [PATCH]: Add 8548 pcie bus number workaround =20
=20
On Jun 6, 2007, at 10:19 PM, Zang Roy-r61911 wrote:
=20Quoted 9 lines
From: Zang Roy-r61911 <[email protected]>
Remove legacy pcie support for 8641 chip.
General PCI code can fully support 8641 Rev2.0 chip. For 8548 PEX controller, PCIE host controller configure space can only be accessed as "bus->number=3D 0" in the PCI architecture. So "bus->number=3D=3Dhose->bus_offset" judgment is added.=20
Uugh, I'm completely confused. Does 8548 rev 2.x have some errata =20 (or 'feature') that 8641 doesn't have?
=20
- k
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
=20
Quoted 12 lines · Kumar Gala
Quoted 9 lines · On Jun 6, 2007, at 10:19 PM, Zang Roy-r61911 wrote:
From: Zang Roy-r61911 <[email protected]>
Remove legacy pcie support for 8641 chip.
General PCI code can fully support 8641 Rev2.0 chip. For 8548 PEX controller, PCIE host controller configure space can only be accessed as "bus->number= 0" in the PCI architecture. So "bus->number==hose->bus_offset" judgment is added.
Quoted 2 lines
Uugh, I'm completely confused. Does 8548 rev 2.x have some errata (or 'feature') that 8641 doesn't have?
NO! I do not think so!
It is a story about the 85xx/86xx pcie road map. Originally, fsl_pcie.c is based on the pcie support code for 86xx (1.x or later).
Jdl and I separate this part of code for the purpose to support both 85xx/86xx pcie. So this part of code contains some garbage code for legacy 86xx pcie support or debug information. I have discussed this with the original developer.
So in this patch I remove the unused code. Is it wrong?
Now this file is target to support 8548 rev 1.x and 2.x pcie controller. Now, I am working to put some common code to support 85xx/86xx pcie in this file, such as atmu init and link status check.
Moer patches will be posted to provide a completely pcie support for 85xx/86xx.
Thanks.
Roy