[U-Boot] [PATCH 05/10] arm: mvebu: Disable MBUS error propagation

Stefan Roese sr at denx.de
Thu Jul 23 10:26:15 CEST 2015


Accessing MBUS windows not backed-up by e.g. PCIe devices will
hang the SoC. Disable MBUS error propagation back to CPU allows
to read 0xffffffff instead of hanging the SoC.

Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Luka Perkov <luka.perkov at sartura.hr>
---
 arch/arm/mach-mvebu/cpu.c              | 7 +++++++
 arch/arm/mach-mvebu/include/mach/soc.h | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index 23c2a97..451f308 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -182,6 +182,8 @@ static void set_cbar(u32 addr)
 
 int arch_cpu_init(void)
 {
+	u32 reg;
+
 #ifndef CONFIG_SPL_BUILD
 	if (mvebu_soc_family() == MVEBU_SOC_A38X) {
 		struct pl310_regs *const pl310 =
@@ -241,6 +243,11 @@ int arch_cpu_init(void)
 	 */
 	mvebu_mbus_probe(windows, ARRAY_SIZE(windows));
 
+	/* Disable MBUS error propagation */
+	reg = readl(SOC_COHERENCY_FABRIC_CTRL_REG);
+	reg &= ~MBUS_ERR_PROP_EN;
+	writel(reg, SOC_COHERENCY_FABRIC_CTRL_REG);
+
 	return 0;
 }
 #endif /* CONFIG_ARCH_CPU_INIT */
diff --git a/arch/arm/mach-mvebu/include/mach/soc.h b/arch/arm/mach-mvebu/include/mach/soc.h
index 71254c5..a29e5dc 100644
--- a/arch/arm/mach-mvebu/include/mach/soc.h
+++ b/arch/arm/mach-mvebu/include/mach/soc.h
@@ -66,6 +66,9 @@
 #define MVEBU_SATA0_BASE	(MVEBU_REGISTER(0xa8000))
 #define MVEBU_SDIO_BASE		(MVEBU_REGISTER(0xd8000))
 
+#define SOC_COHERENCY_FABRIC_CTRL_REG	(MVEBU_REGISTER(0x20200))
+#define MBUS_ERR_PROP_EN	(1 << 8)
+
 #define MBUS_BRIDGE_WIN_CTRL_REG (MVEBU_REGISTER(0x20250))
 #define MBUS_BRIDGE_WIN_BASE_REG (MVEBU_REGISTER(0x20254))
 
-- 
2.4.6



More information about the U-Boot mailing list