* [PATCH] ARM: i.MX7: Initialize CSU
@ 2017-02-06 15:13 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2017-02-06 15:13 UTC (permalink / raw)
To: Barebox List
The CSU needs to be initialized, otherwise we cannot access memory
in non secure mode.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/imx7.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/mach-imx/imx7.c b/arch/arm/mach-imx/imx7.c
index 65e02d626..96a9dd244 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();
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-06 15:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 15:13 [PATCH] ARM: i.MX7: Initialize CSU Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox