Re: [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled

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

 



Hi Jagan,


On 05/08/2019 02:39 PM, Jagan Teki wrote:
> DRAM init would require in
> - TPL stage if target support TPL and
> - SPL stage if target support SPL alone
>
> So, don't initialize the dram in SPL if TPL defined and at
> the same time enable it if TPL undefined which is SPL alone.
>
> Tested in TPL and SPL supported boards.
>
> Signed-off-by: Jagan Teki <jagan@xxxxxxxxxxxxxxxxxxxx>
> ---
>  arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
> index 3eea73ef33..a439e09b61 100644
> --- a/arch/arm/mach-rockchip/rk3399-board-spl.c
> +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
> @@ -198,11 +198,13 @@ void board_init_f(ulong dummy)
>  		return;
>  	}
>  
> +#if !defined(SUPPORT_TPL)
>  	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
>  	if (ret) {
>  		pr_err("DRAM init failed: %d\n", ret);
>  		return;
>  	}
> +#endif

We still need to init DRAM driver in SPL so that we can get correct ram
info,
but we don't need to run the dram init program, which should have been
handled in DRAM driver.

Thanks,
- Kever
>  }
>  
>  #if defined(SPL_GPIO_SUPPORT)




_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-rockchip



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux