[PATCH 2/6] riscv: sifive/fu540: spl: Drop our own version of board_init_f()

Rick Chen rickchen36 at gmail.com
Tue Aug 4 05:36:30 CEST 2020


> From: Bin Meng [mailto:bmeng.cn at gmail.com]
> Sent: Monday, August 03, 2020 2:09 PM
> To: Rick Jian-Zhi Chen(陳建志); Pragnesh Patel; U-Boot Mailing List
> Cc: Bin Meng
> Subject: [PATCH 2/6] riscv: sifive/fu540: spl: Drop our own version of board_init_f()
>
> From: Bin Meng <bin.meng at windriver.com>
>
> Use the generic board_init_f() provided by the RISC-V library codes.
>
> Signed-off-by: Bin Meng <bin.meng at windriver.com>
> ---

Reviewed-by: Rick Chen <rick at andestech.com>

>
>  board/sifive/fu540/spl.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)
>
> diff --git a/board/sifive/fu540/spl.c b/board/sifive/fu540/spl.c index 55325cf..31d315d 100644
> --- a/board/sifive/fu540/spl.c
> +++ b/board/sifive/fu540/spl.c
> @@ -17,7 +17,7 @@
>
>  #define GEM_PHY_RESET  SIFIVE_GENERIC_GPIO_NR(0, 12)
>
> -int init_clk_and_ddr(void)
> +int spl_board_init_f(void)
>  {
>         int ret;
>
> @@ -55,20 +55,3 @@ int init_clk_and_ddr(void)
>
>         return 0;
>  }
> -
> -void board_init_f(ulong dummy)
> -{
> -       int ret;
> -
> -       ret = spl_early_init();
> -       if (ret)
> -               panic("spl_early_init() failed: %d\n", ret);
> -
> -       arch_cpu_init_dm();
> -
> -       preloader_console_init();
> -
> -       ret = init_clk_and_ddr();
> -       if (ret)
> -               panic("init_clk_and_ddr() failed: %d\n", ret);
> -}
> --
> 2.7.4


More information about the U-Boot mailing list