summaryrefslogtreecommitdiff
path: root/boot/bootdev-uclass.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-09-22 11:16:22 -0400
committerTom Rini <trini@konsulko.com>2023-09-22 11:16:22 -0400
commitb05a184379631d13c4a49e423aa1324dc1ae6158 (patch)
treed9937c7de598c7edc5741ebc67c98dce47ea42d5 /boot/bootdev-uclass.c
parent5d2fae79c7d60eaf7f50322e4ec125d2f58544e9 (diff)
parent5728246dfa11400d4f7aa8262ea630d8c09a85b9 (diff)
Merge tag 'x86-pull-20230922' of https://source.denx.de/u-boot/custodians/u-boot-x86 into next
- Add bootstd support to 64-bit efi payload - Fix a bug of missing setting size of initrd in pxeboot - Allow Python packages to be dropped - Reland "x86: Move FACP table into separate functions" - Fixes for chromebook_link64 and chromebook_samus_tpl - Fixes and improvements for coreboot - x86 documentation updates
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r--boot/bootdev-uclass.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 69506e3865f..974ddee5d2f 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -830,6 +830,33 @@ int bootdev_hunt(const char *spec, bool show)
return result;
}
+int bootdev_unhunt(enum uclass_id id)
+{
+ struct bootdev_hunter *start;
+ int n_ent, i;
+
+ start = ll_entry_start(struct bootdev_hunter, bootdev_hunter);
+ n_ent = ll_entry_count(struct bootdev_hunter, bootdev_hunter);
+ for (i = 0; i < n_ent; i++) {
+ struct bootdev_hunter *info = start + i;
+
+ if (info->uclass == id) {
+ struct bootstd_priv *std;
+ int ret;
+
+ ret = bootstd_get_priv(&std);
+ if (ret)
+ return log_msg_ret("std", ret);
+ if (!(std->hunters_used & BIT(i)))
+ return -EALREADY;
+ std->hunters_used &= ~BIT(i);
+ return 0;
+ }
+ }
+
+ return -ENOENT;
+}
+
int bootdev_hunt_prio(enum bootdev_prio_t prio, bool show)
{
struct bootdev_hunter *start;