spl: fix assignment of board info to global data
Commit
15eb1d43bf47 ("spl: reorder the assignment of board info to
global data") intended to move assignment of board info earlier,
into board_init_r(). However, function preload_console_init() is
called either from spl_board_init() or from board_init_f(). For the
latter case, the board info assignment is much earlier than proposed
board_init_r(). Create a new function to fill gd->bd and call this
function when needed.
Signed-off-by: York Sun <[email protected]>
CC: Lokesh Vutla <[email protected]>
CC: Ravi Babu <[email protected]>
CC: Lukasz Majewski <[email protected]>
CC: Tom Rini <[email protected]>
Reviewed-by: Simon Glass <[email protected]>