summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorjinghua <jinghua@marvell.com>2018-03-13 09:45:36 +0800
committerKostya Porotchkin <kostap@marvell.com>2018-03-20 14:04:57 +0200
commitef9726a9952685186b636df4b9bb83d9d0431469 (patch)
treeb807ed9f496cab050e464ac455915aedab7097b4 /drivers
parent8a3290cb8f52b1575350e03f44dc2e6785c5267a (diff)
fix: cp110: amb: enable amb window by default
AMB bridge window in CP110 needs to be enabled, otherwise all the address decode configuration in it would not work. This used to be done by BootRom in SPI boot mode, and was missing for other boot mode. This patch enables AMB window by default in cp110 init. Change-Id: I31415b7432d37149b6e83a7de993bbe1f3ee59ec Signed-off-by: jinghua <jinghua@marvell.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/51738 Tested-by: iSoC Platform CI <ykjenk@marvell.com> Reviewed-by: Hanna Hawa <hannah@marvell.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/marvell/mochi/cp110_setup.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/marvell/mochi/cp110_setup.c b/drivers/marvell/mochi/cp110_setup.c
index d88c2535..5446de0f 100644
--- a/drivers/marvell/mochi/cp110_setup.c
+++ b/drivers/marvell/mochi/cp110_setup.c
@@ -110,6 +110,10 @@ static const struct icu_config icu_config = {
#define MVEBU_SOC_CFG_REG_NUM (0)
#define MVEBU_SOC_CFG_GLOG_SECURE_EN_MASK (0xE)
+/* Bridge Windows Disable Register */
+#define MVEBU_BRIDGE_WIN_DIS_REG (MVEBU_SOC_CFGS_OFFSET + 0x10)
+#define MVEBU_BRIDGE_WIN_DIS_OFF (0x0)
+
/* SATA3 MBUS to AXI regs */
#define MVEBU_SATA_M2A_AXI_PORT_CTRL_REG (0x54ff04)
@@ -424,6 +428,15 @@ static void cp110_rtc_init(uintptr_t base)
}
}
+static void cp110_amb_adec_init(uintptr_t base)
+{
+ /* enable AXI-MBUS by clearing "Bridge Windows Disable" */
+ mmio_clrbits_32(base + MVEBU_BRIDGE_WIN_DIS_REG, (1 << MVEBU_BRIDGE_WIN_DIS_OFF));
+
+ /* configure AXI-MBUS windows for CP */
+ init_amb_adec(base);
+}
+
void cp110_init(uintptr_t cp110_base)
{
INFO("%s: Initialize CPx - base = %lx\n", __func__, cp110_base);
@@ -432,7 +445,7 @@ void cp110_init(uintptr_t cp110_base)
init_iob(cp110_base);
/* configure AXI-MBUS windows for CP0*/
- init_amb_adec(cp110_base);
+ cp110_amb_adec_init(cp110_base);
/* configure axi for CP0*/
cp110_axi_attr_init(cp110_base);