Skip to contentSkip to conversation

ARM: zynq: add Zynq specific lowlevel CPU init function

PATCH Applied Lucas Stach 2 participants 3 messages Jan 6, 2020 – Jan 8, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ARM: zynq: add Zynq specific lowlevel CPU init function

This adds a Zynq specific CPU lowlevel init function, which applies the required workarounds for the Cortex A9 r3p0 core.

---
 arch/arm/mach-zynq/Makefile            |  1 +
 arch/arm/mach-zynq/cpu_init.c          | 15 +++++++++++++++
 arch/arm/mach-zynq/include/mach/init.h |  8 ++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 arch/arm/mach-zynq/cpu_init.c
 create mode 100644 arch/arm/mach-zynq/include/mach/init.h
arch/arm/mach-zynq/Makefile +1 -0
index c88ab4666f0f..06c2ce996cfa 100644
@@ -1 +1,2 @@
 obj-y += zynq.o bootm-zynqimg.o
+lwl-y += cpu_init.o
arch/arm/mach-zynq/cpu_init.c new file +15 -0
new file mode 100644
index 000000000000..ec5ee59e169d
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <common.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/errata.h>
+#include <mach/init.h>
+
+void zynq_cpu_lowlevel_init(void)
+{
+	arm_cpu_lowlevel_init();
+
+	enable_arm_errata_761320_war();
+	enable_arm_errata_794072_war();
+	enable_arm_errata_845369_war();
+}
arch/arm/mach-zynq/include/mach/init.h new file +8 -0
new file mode 100644
index 000000000000..c458f602e4d7
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+#ifndef __MACH_INIT_H
+#define __MACH_INIT_H
+
+void zynq_cpu_lowlevel_init(void);
+
+#endif
Signature · 7 lines
2.24.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 2/2 ARM: zynq: zed: use zynq_cpu_lowlevel_init()

Make sure the required workarounds for CPU errata are applied.

---
 arch/arm/boards/avnet-zedboard/lowlevel.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boards/avnet-zedboard/lowlevel.c +2 -1
index 58f9e40d11c9..c987db75b068 100644
@@ -20,6 +20,7 @@
 #include <io.h>
 #include <asm/barebox-arm.h>
 #include <asm/barebox-arm-head.h>
+#include <mach/init.h>
 #include <mach/zynq7000-regs.h>
 
 #define DCI_DONE	(1 << 13)
@@ -283,7 +284,7 @@ ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
 
 	void *fdt = __dtb_zynq_zed_start + get_runtime_offset();
 
-	arm_cpu_lowlevel_init();
+	zynq_cpu_lowlevel_init();
 
 	avnet_zedboard_ps7_init();
 
Signature · 7 lines
2.24.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#2 lore raw
In reply to Lucas Stach
Quoted 11 lines · Lucas Stach

This adds a Zynq specific CPU lowlevel init function, which applies the required workarounds for the Cortex A9 r3p0 core.

---
 arch/arm/mach-zynq/Makefile            |  1 +
 arch/arm/mach-zynq/cpu_init.c          | 15 +++++++++++++++
 arch/arm/mach-zynq/include/mach/init.h |  8 ++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 arch/arm/mach-zynq/cpu_init.c
 create mode 100644 arch/arm/mach-zynq/include/mach/init.h

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox