[U-Boot] [PATCH v2 01/51] dm: timer: Correct timer init ordering after relocation
Simon Glass
sjg at chromium.org
Sat Mar 12 06:06:46 CET 2016
Commit 1057e6c broke use of the timer with driver model. If the timer is used
before relocation, then it becomes broken after relocation. This prevents
some x86 boards from booting. Fix it.
Fixes: 1057e6c (timer: Set up the real timer after driver model is available)
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2: None
common/board_r.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/common/board_r.c b/common/board_r.c
index 52a9b26..0f068bf 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -318,11 +318,13 @@ static int initr_dm(void)
/* Save the pre-reloc driver model and start a new one */
gd->dm_root_f = gd->dm_root;
gd->dm_root = NULL;
+#ifdef CONFIG_TIMER
+ gd->timer = NULL;
+#endif
ret = dm_init_and_scan(false);
if (ret)
return ret;
#ifdef CONFIG_TIMER_EARLY
- gd->timer = NULL;
ret = dm_timer_init();
if (ret)
return ret;
--
2.7.0.rc3.207.g0ac5344
More information about the U-Boot
mailing list