diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 20:47:33 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-24 02:11:40 +0300 |
commit | bd90b092882099afa3786829036c82d6a4241fc8 (patch) | |
tree | 062539871ab4506554a1c6251b1cfca9ebb6e6e5 /include/bootstd.h | |
parent | 3722cc973f092a6fd1724ea06bd18b205e678ddf (diff) | |
download | u-boot-bd90b092882099afa3786829036c82d6a4241fc8.tar.xz |
bootstd: Add the concept of a bootdev hunter
Some bootdevs must be enumerated before they appear. For example, USB
bootdevs are not visible until USB is enumerated.
With standard boot this needs to happen automatically, since we only
want to enumerate a bus if it is needed.
Add a way to define bootdev 'hunters' which can be used to hunt for
bootdevs of a given type. Track which ones have been used and add a
command to list them.
Include a clang work-around which seems to be needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootstd.h')
-rw-r--r-- | include/bootstd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/bootstd.h b/include/bootstd.h index bd305094fd..dddb3e1538 100644 --- a/include/bootstd.h +++ b/include/bootstd.h @@ -33,6 +33,8 @@ struct udevice; * @bootmeth_order: List of bootmeth devices to use, in order, NULL-terminated * @vbe_bootmeth: Currently selected VBE bootmeth, NULL if none * @theme: Node containing the theme information + * @hunters_used: Bitmask of used hunters, indexed by their position in the + * linker list. The bit is set if the hunter has been used already */ struct bootstd_priv { const char **prefixes; @@ -45,6 +47,7 @@ struct bootstd_priv { struct udevice **bootmeth_order; struct udevice *vbe_bootmeth; ofnode theme; + uint hunters_used; }; /** |