Skip to content

Commit 2a027b4

Browse files
tokunoriamalon
authored andcommitted
MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum
The erratum and workaround are described by BCM5300X-ES300-RDS.pdf as below. R10: PCIe Transactions Periodically Fail Description: The BCM5300X PCIe does not maintain transaction ordering. This may cause PCIe transaction failure. Fix Comment: Add a dummy PCIe configuration read after a PCIe configuration write to ensure PCIe configuration access ordering. Set ES bit of CP0 configu7 register to enable sync function so that the sync instruction is functional. Resolution: hndpci.c: extpci_write_config() hndmips.c: si_mips_init() mipsinc.h CONF7_ES This is fixed by the CFE MIPS bcmsi chipset driver also for BCM47XX. Also the dummy PCIe configuration read is already implemented in the Linux BCMA driver. Enable ExternalSync in Config7 when CONFIG_BCMA_DRIVER_PCI_HOSTMODE=y too so that the sync instruction is externalised. Signed-off-by: Tokunori Ikegami <[email protected]> Reviewed-by: Paul Burton <[email protected]> Acked-by: Hauke Mehrtens <[email protected]> Cc: Chris Packham <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/19461/ Signed-off-by: James Hogan <[email protected]>
1 parent 326345f commit 2a027b4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

arch/mips/bcm47xx/setup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ static int __init bcm47xx_cpu_fixes(void)
212212
*/
213213
if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
214214
cpu_wait = NULL;
215+
216+
/*
217+
* BCM47XX Erratum "R10: PCIe Transactions Periodically Fail"
218+
* Enable ExternalSync for sync instruction to take effect
219+
*/
220+
set_c0_config7(MIPS_CONF7_ES);
215221
break;
216222
#endif
217223
}

arch/mips/include/asm/mipsregs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,8 @@
681681
#define MIPS_CONF7_WII (_ULCAST_(1) << 31)
682682

683683
#define MIPS_CONF7_RPS (_ULCAST_(1) << 2)
684+
/* ExternalSync */
685+
#define MIPS_CONF7_ES (_ULCAST_(1) << 8)
684686

685687
#define MIPS_CONF7_IAR (_ULCAST_(1) << 10)
686688
#define MIPS_CONF7_AR (_ULCAST_(1) << 16)
@@ -2765,6 +2767,7 @@ __BUILD_SET_C0(status)
27652767
__BUILD_SET_C0(cause)
27662768
__BUILD_SET_C0(config)
27672769
__BUILD_SET_C0(config5)
2770+
__BUILD_SET_C0(config7)
27682771
__BUILD_SET_C0(intcontrol)
27692772
__BUILD_SET_C0(intctl)
27702773
__BUILD_SET_C0(srsmap)

0 commit comments

Comments
 (0)