[U-Boot] [PATCH] fsl/pci: Add workaround for erratum A-005434

Chunhe Lan Chunhe.Lan at freescale.com
Mon Apr 28 08:21:32 CEST 2014


For BSC9132 platform, all PEX inbound windows PEX_PEXIWARn[TRGT]
defaults to 0xF, which is mapped to CCSRBAR. However, for other
products, 0xF is mapped to the local memory. Therefore, for the
BSC9132, any default PCI Express access to the local memory (DDR)
will now access the CCSRBAR.

This patch can change the mapping of targets of inbound windows
PEX_PEXIWARn[TRGT] to the following value:

	Local address space – 0x0 (from 0xF)

Signed-off-by: Minghuan Lian <Minghuan.Lian at freescale.com>
Signed-off-by: Chunhe Lan <Chunhe.Lan at freescale.com>
---
 arch/powerpc/cpu/mpc85xx/cmd_errata.c     |    3 +++
 arch/powerpc/include/asm/config_mpc85xx.h |    1 +
 drivers/pci/fsl_pci_init.c                |    4 ++++
 3 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 8b79c05..4bf5bc7 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -277,6 +277,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	if (has_erratum_a006261())
 		puts("Work-around for Erratum A006261 enabled\n");
 #endif
+#ifdef CONFIG_SYS_FSL_ERRATUM_A005434
+	puts("Work-around for Erratum A-005434 enabled\n");
+#endif
 	return 0;
 }
 
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h
index df44451..94c769d 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -583,6 +583,7 @@
 #define CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK
 #define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v2.2"
 #define CONFIG_SYS_FSL_ERRATUM_A005125
+#define CONFIG_SYS_FSL_ERRATUM_A005434
 #define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
 #define CONFIG_SYS_FSL_A004447_SVR_REV	0x11
 #define CONFIG_ESDHC_HC_BLK_ADDR
diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 6317fb1..f82ded4 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -52,6 +52,10 @@ static void set_inbound_window(volatile pit_t *pi,
 	u32 flag = PIWAR_EN | PIWAR_LOCAL |
 			PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
 
+#ifdef CONFIG_SYS_FSL_ERRATUM_A005434
+	flag = PIWAR_EN | PIWAR_READ_SNOOP | PIWAR_WRITE_SNOOP;
+#endif
+
 	out_be32(&pi->pitar, r->phys_start >> 12);
 	out_be32(&pi->piwbar, r->bus_start >> 12);
 #ifdef CONFIG_SYS_PCI_64BIT
-- 
1.7.6.5



More information about the U-Boot mailing list