diff options
author | Simon Glass <sjg@chromium.org> | 2016-03-12 05:06:46 (GMT) |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-03-17 02:27:24 (GMT) |
commit | d74d6b444c9f1596c24d492e57af9423efbd113b (patch) | |
tree | 20de40deb6f12c7913f0855685bc9dd52abcd2fd /common | |
parent | 5a34957c39c9526b88c658b740fc4e9a3012e58b (diff) | |
download | u-boot-fsl-qoriq-d74d6b444c9f1596c24d492e57af9423efbd113b.tar.xz |
dm: timer: Correct timer init ordering after relocation
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@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/board_r.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/board_r.c b/common/board_r.c index 2cb6836..ad02549 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -322,11 +322,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; |