]> git.sur5r.net Git - u-boot/commitdiff
ARM: socfpga: Adding SoCFPGA info for both SPL and U-Boot
authorTien Fong Chee <tien.fong.chee@intel.com>
Tue, 5 Dec 2017 07:58:08 +0000 (15:58 +0800)
committerMarek Vasut <marex@denx.de>
Fri, 18 May 2018 08:30:47 +0000 (10:30 +0200)
SoC FPGA info is required in both SPL and U-Boot.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
arch/arm/mach-socfpga/board.c
arch/arm/mach-socfpga/misc_arria10.c
arch/arm/mach-socfpga/spl.c

index 6e0b4b3c4e6c4834f8019ff8c3841a9b371cded4..189e12a668398c02de8380dbad7558b63e05d18e 100644 (file)
@@ -10,6 +10,7 @@
 #include <fdtdec.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/arch/clock_manager.h>
+#include <asm/arch/misc.h>
 #include <asm/io.h>
 
 #include <usb.h>
@@ -30,6 +31,9 @@ int board_init(void)
 #if defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
        /* configuring the clock based on handoff */
        cm_basic_init(gd->fdt_blob);
+
+       /* Add device descriptor to FPGA device table */
+       socfpga_fpga_add();
 #endif
 
        return 0;
index e1d80a5a76a296ca8637299fc8328dc604ae3224..47a9d50ef13d61a74234ab0210ba4e668879fbb8 100644 (file)
@@ -104,11 +104,6 @@ int arch_early_init_r(void)
        /* assert reset to all except L4WD0 and L4TIMER0 */
        socfpga_per_reset_all();
 
-       /* configuring the clock based on handoff */
-       /* TODO: Add call to cm_basic_init() */
-
-       /* Add device descriptor to FPGA device table */
-       socfpga_fpga_add();
        return 0;
 }
 #else
index 515832031ac3b8be692fb48f2c3376626b259284..0c9d7388e68a00c1c5b214472c3a911abda9b2b4 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/system_manager.h>
 #include <asm/arch/freeze_controller.h>
 #include <asm/arch/clock_manager.h>
+#include <asm/arch/misc.h>
 #include <asm/arch/scan_manager.h>
 #include <asm/arch/sdram.h>
 #include <asm/arch/scu.h>
@@ -191,6 +192,11 @@ void spl_board_init(void)
 
        /* enable console uart printing */
        preloader_console_init();
+
+       WATCHDOG_RESET();
+
+       /* Add device descriptor to FPGA device table */
+       socfpga_fpga_add();
 }
 
 void board_init_f(ulong dummy)