[PATCH 1/4] ARM: zynq: zedboard: split out PS7 init

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

 



Move the PS7 inititalization into its own function. This helps
readability and logically splits the FPGA toolchain generated
setup from the reset of the board init.

Also execute the PS7 setup after the lowlevel CPU init, as this
is the regular order used in the Barebox codebase.

Signed-off-by: Lucas Stach <dev@xxxxxxxxxx>
---
 arch/arm/boards/avnet-zedboard/lowlevel.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
index 93e4da96ecd4..b50c36b28869 100644
--- a/arch/arm/boards/avnet-zedboard/lowlevel.c
+++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
@@ -29,11 +29,8 @@
 
 extern char __dtb_zynq_zed_start[];
 
-ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
+static void avnet_zedboard_ps7_init(void)
 {
-
-	void *fdt = __dtb_zynq_zed_start + get_runtime_offset();
-
 	/* open sesame */
 	writel(0x0000DF0D, ZYNQ_SLCR_UNLOCK);
 
@@ -260,8 +257,16 @@ ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
 
 	/* lock up. secure, secure */
 	writel(0x0000767B, ZYNQ_SLCR_LOCK);
+}
+
+ENTRY_FUNCTION(start_avnet_zedboard, r0, r1, r2)
+{
+
+	void *fdt = __dtb_zynq_zed_start + get_runtime_offset();
 
 	arm_cpu_lowlevel_init();
 
+	avnet_zedboard_ps7_init();
+
 	barebox_arm_entry(0, SZ_512M, fdt);
 }
-- 
2.23.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