[U-Boot] [PATCH 3/4] powerpc: mpc85xx: crypto: Implement mpc85xxx specific job-ring fix

Bryan O'Donoghue bryan.odonoghue at linaro.org
Tue Apr 23 10:19:47 UTC 2019


The mpc85xxx has more than one sec block. As a result we need to have an
architecture specific version of:

void sec_set_jr_context_secure(void);
void sec_set_jr_context_normal(void);

This patch implements those functions.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
---
 arch/powerpc/cpu/mpc85xx/cpu_init.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index cbcd62e19a..7f007f4f88 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -1056,3 +1056,25 @@ int board_late_init(void)
 	return 0;
 }
 #endif
+
+#if defined(CONFIG_ARCH_C29X)
+void sec_set_jr_context_secure(void)
+{
+	if ((SVR_SOC_VER(svr) == SVR_C292) ||
+	    (SVR_SOC_VER(svr) == SVR_C293))
+		sec_set_jr_context_secure(1);
+
+	if (SVR_SOC_VER(svr) == SVR_C293)
+		sec_set_jr_context_secure(2);
+}
+
+void sec_set_jr_context_normal(void)
+{
+	if ((SVR_SOC_VER(svr) == SVR_C292) ||
+	    (SVR_SOC_VER(svr) == SVR_C293))
+		sec_set_jr_context_normal(1);
+
+	if (SVR_SOC_VER(svr) == SVR_C293)
+		sec_set_jr_context_normal(2);
+}
+#endif
-- 
2.20.1



More information about the U-Boot mailing list