mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
common: Move autoprobe out to board init
Rather than doing autoprobe within the driver model code, move it out to the board-init code. This makes it clear that it is a separate step from binding devices. For now this is always done twice, before and after relocation, but we should discuss whether it might be possible to drop the post-relocation probe. For boards with SPL, the autoprobe is still done there as well. Note that with this change, autoprobe happens after the EVT_DM_POST_INIT_R/F events are sent, rather than before. Link: https://lore.kernel.org/u-boot/20240626235717.272219-1-marex@denx.de/ Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
21dd873572
commit
6995f2c8be
6 changed files with 62 additions and 2 deletions
|
@ -826,6 +826,10 @@ static int initf_dm(void)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = dm_autoprobe();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (IS_ENABLED(CONFIG_TIMER_EARLY)) {
|
||||
ret = dm_timer_init();
|
||||
if (ret)
|
||||
|
|
|
@ -250,7 +250,7 @@ static int initr_dm(void)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return dm_autoprobe();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -500,6 +500,10 @@ static int spl_common_init(bool setup_malloc)
|
|||
debug("dm_init_and_scan() returned error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = dm_autoprobe();
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue