[U-Boot] [PATCH v2 2/3] rockchip: allow DRAM init in SPL

Kever Yang kever.yang at rock-chips.com
Sun Nov 17 08:31:22 UTC 2019


On 2019/11/16 上午12:48, Thomas Hebb wrote:
> b7abef2ecbcc ("rockchip: rk3399: Migrate to use common spl board file")
> removed SoC-specific code for RK3399's SPL and in the process caused
> the previously-unconditional DRAM initialization in board_init_f() to
> only happen when compiling a configuration that does not support TPL,
> meaning DRAM never gets initialized if TPL is supported but disabled.
>
> Fix this by omitting the DRAM init in SPL only when we are configured to
> also build a TPL. This fixes custom configurations that have disabled
> TPL, and it should also unbreak the "ficus-rk3399", "rock960-rk3399",
> and "chromebook_bob" defconfigs, although since I don't have any of
> those devices I can't confirm they're broken now.
>
> Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>

Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/mach-rockchip/spl.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c
> index 5570bb1339..089f0a5258 100644
> --- a/arch/arm/mach-rockchip/spl.c
> +++ b/arch/arm/mach-rockchip/spl.c
> @@ -103,7 +103,7 @@ __weak int arch_cpu_init(void)
>   void board_init_f(ulong dummy)
>   {
>   	int ret;
> -#if !defined(CONFIG_SUPPORT_TPL) || defined(CONFIG_SPL_OS_BOOT)
> +#if !defined(CONFIG_TPL) || defined(CONFIG_SPL_OS_BOOT)
>   	struct udevice *dev;
>   #endif
>   
> @@ -135,7 +135,7 @@ void board_init_f(ulong dummy)
>   	/* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */
>   	timer_init();
>   #endif
> -#if !defined(CONFIG_SUPPORT_TPL) || defined(CONFIG_SPL_OS_BOOT)
> +#if !defined(CONFIG_TPL) || defined(CONFIG_SPL_OS_BOOT)
>   	debug("\nspl:init dram\n");
>   	ret = uclass_get_device(UCLASS_RAM, 0, &dev);
>   	if (ret) {




More information about the U-Boot mailing list