summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-01-24 08:42:35 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-02-06 16:13:10 +0100
commit1dfe9f050f54c7e9d6cfe971aff354ff531e5d91 (patch)
treee7f44f7e6726ac0ba4e627f92d9c1b817a4a676f
parent55eed47d8515e5fdaf869c2a26f495d74d30f224 (diff)
downloadbarebox-1dfe9f050f54c7e9d6cfe971aff354ff531e5d91.tar.gz
ARM: i.MX7: Initialize CSU
The CSU needs to be initialized, otherwise we cannot access memory in non secure mode. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/imx7.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx7.c b/arch/arm/mach-imx/imx7.c
index 65e02d6..96a9dd2 100644
--- a/arch/arm/mach-imx/imx7.c
+++ b/arch/arm/mach-imx/imx7.c
@@ -79,6 +79,18 @@ static int imx7_timer_init(void)
return 0;
}
+#define CSU_NUM_REGS 64
+#define CSU_INIT_SEC_LEVEL0 0x00FF00FF
+
+static void imx7_init_csu(void)
+{
+ void __iomem *csu = IOMEM(MX7_CSU_BASE_ADDR);
+ int i = 0;
+
+ for (i = 0; i < CSU_NUM_REGS; i++)
+ writel(CSU_INIT_SEC_LEVEL0, csu + i * 4);
+}
+
int imx7_init(void)
{
const char *cputypestr;
@@ -86,6 +98,8 @@ int imx7_init(void)
imx7_init_lowlevel();
+ imx7_init_csu();
+
imx7_timer_init();
imx7_boot_save_loc();