[PATCH] ARM: i.MX7: Initialize CSU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The CSU needs to be initialized, otherwise we cannot access memory
in non secure mode.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux