rockchip: allow DRAM init in SPL
authorThomas Hebb <tommyhebb@gmail.com>
Fri, 15 Nov 2019 16:48:56 +0000 (08:48 -0800)
committerKever Yang <kever.yang@rock-chips.com>
Sun, 17 Nov 2019 10:54:29 +0000 (18:54 +0800)
commit857d638ca65362619600600acaa34fdd11594311
treefc0848aec294247d209d77a0da72bbba4caa919d
parent220697a3174c080dd45c0435f5c9e78fb2de8299
rockchip: allow DRAM init in SPL

The common SPL 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.

Fixes: b7abef2ecbcc ("rockchip: rk3399: Migrate to use common spl board file")

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/spl.c