diff options
author | Ley Foon Tan <ley.foon.tan@intel.com> | 2019-11-08 05:38:19 +0300 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2020-01-07 16:38:33 +0300 |
commit | bb25aca1343304e0334e9eebfb9d350eaf276882 (patch) | |
tree | 00e8e1c3b79e4a6175bfeccf716d106ec02593cc /arch/arm/mach-socfpga/spl_s10.c | |
parent | dd72cbd9e91dfa80f04a5921546d19e189bb2361 (diff) | |
download | u-boot-bb25aca1343304e0334e9eebfb9d350eaf276882.tar.xz |
arm: socfpga: Convert reset manager from struct to defines
Convert reset manager for Gen5, Arria 10 and Stratix 10 from struct
to defines.
Change to get reset manager base address from DT node instead of using
#define.
spl_early_init() initializes the DT setup. So, move spl_early_init() to
beginning of function and before get base address from DT.
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Diffstat (limited to 'arch/arm/mach-socfpga/spl_s10.c')
-rw-r--r-- | arch/arm/mach-socfpga/spl_s10.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-socfpga/spl_s10.c b/arch/arm/mach-socfpga/spl_s10.c index ec65e1ce64..5859973ba8 100644 --- a/arch/arm/mach-socfpga/spl_s10.c +++ b/arch/arm/mach-socfpga/spl_s10.c @@ -14,6 +14,7 @@ #include <asm/arch/clock_manager.h> #include <asm/arch/firewall_s10.h> #include <asm/arch/mailbox_s10.h> +#include <asm/arch/misc.h> #include <asm/arch/reset_manager.h> #include <asm/arch/system_manager.h> #include <watchdog.h> @@ -120,6 +121,12 @@ void board_init_f(ulong dummy) const struct cm_config *cm_default_cfg = cm_get_default_config(); int ret; + ret = spl_early_init(); + if (ret) + hang(); + + socfpga_get_managers_addr(); + #ifdef CONFIG_HW_WATCHDOG /* Ensure watchdog is paused when debugging is happening */ writel(SYSMGR_WDDBG_PAUSE_ALL_CPU, &sysmgr_regs->wddbg); @@ -145,11 +152,6 @@ void board_init_f(ulong dummy) socfpga_per_reset(SOCFPGA_RESET(UART0), 0); debug_uart_init(); #endif - ret = spl_early_init(); - if (ret) { - debug("spl_early_init() failed: %d\n", ret); - hang(); - } preloader_console_init(); cm_print_clock_quick_summary(); |