]> git.ipfire.org Git - people/ms/u-boot.git/commit - common/spl/spl.c
dm: core: Handle global_data moving in SPL
authorSimon Glass <sjg@chromium.org>
Sun, 13 Nov 2016 21:21:58 +0000 (14:21 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 3 Dec 2016 03:53:19 +0000 (20:53 -0700)
commit2f11cd9121658b65a1d0789b37f290b207993a34
treec90d05480e74767fefc3b1ba0e855070a3a5c977
parenta9401b2bc93a750d1566174b18d23bcdc2a45b7b
dm: core: Handle global_data moving in SPL

When CONFIG_SPL_STACK_R is enabled, and spl_init() is called before
board_init_r(), spl_relocate_stack_gd() will move global_data to a new
place in memory. This affects driver model since it uses a list for the
uclasses. Unless this is updated the list will become invalid. When
looking for a non-existent uclass, such as when adding a new one, the loop
in uclass_find() may continue forever, thus causing a hang.

Add a function to correct this rather obscure bug.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl.c
drivers/core/root.c
include/dm/root.h