From: Tien Fong Chee Date: Tue, 5 Dec 2017 07:58:08 +0000 (+0800) Subject: ARM: socfpga: Adding SoCFPGA info for both SPL and U-Boot X-Git-Tag: v2018.07-rc1~131^2~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=011fa5f33dac4f5d7998cf7e9da904b5565691e5;p=oweals%2Fu-boot.git ARM: socfpga: Adding SoCFPGA info for both SPL and U-Boot SoC FPGA info is required in both SPL and U-Boot. Signed-off-by: Tien Fong Chee --- diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 6e0b4b3c4e..189e12a668 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -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; diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c index e1d80a5a76..47a9d50ef1 100644 --- a/arch/arm/mach-socfpga/misc_arria10.c +++ b/arch/arm/mach-socfpga/misc_arria10.c @@ -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 diff --git a/arch/arm/mach-socfpga/spl.c b/arch/arm/mach-socfpga/spl.c index 515832031a..0c9d7388e6 100644 --- a/arch/arm/mach-socfpga/spl.c +++ b/arch/arm/mach-socfpga/spl.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -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)