diff options
author | Simon Glass <sjg@chromium.org> | 2022-07-30 15:52:29 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-12 08:17:11 -0400 |
commit | 2ff5490d7dee933eaf0b73d4d50d76660e5da6ff (patch) | |
tree | fd2dc157bc698cb29c127b5847703f4b75a500a2 /boot/system_bootdev.c | |
parent | bd18b69de10d1a681e760f2ee65b3de29d3006fd (diff) |
bootstd: Drop the system bootdev
This was a work-around for the fact that global bootmeths such as EFI
bootmgr and VBE don't use a particular bootdev, or at least select it
themselves so that we don't need to scan all bootdevs when using that
bootmeth.
Drop the system bootdev entirely.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/system_bootdev.c')
-rw-r--r-- | boot/system_bootdev.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/boot/system_bootdev.c b/boot/system_bootdev.c deleted file mode 100644 index 432d2034780..00000000000 --- a/boot/system_bootdev.c +++ /dev/null @@ -1,66 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Bootdevice for system, used for bootmeths not tied to any partition device - * - * Copyright 2021 Google LLC - * Written by Simon Glass <sjg@chromium.org> - */ - -#define LOG_CATEGORY UCLASS_BOOTSTD - -#include <common.h> -#include <bootdev.h> -#include <bootflow.h> -#include <bootmeth.h> -#include <command.h> -#include <distro.h> -#include <dm.h> -#include <log.h> -#include <net.h> - -static int system_get_bootflow(struct udevice *dev, struct bootflow_iter *iter, - struct bootflow *bflow) -{ - int ret; - - /* Must be an bootstd device */ - ret = bootflow_iter_uses_system(iter); - if (ret) - return log_msg_ret("net", ret); - - ret = bootmeth_check(bflow->method, iter); - if (ret) - return log_msg_ret("check", ret); - - ret = bootmeth_read_bootflow(bflow->method, bflow); - if (ret) - return log_msg_ret("method", ret); - - return 0; -} - -static int system_bootdev_bind(struct udevice *dev) -{ - struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - - ucp->prio = BOOTDEVP_6_SYSTEM; - - return 0; -} - -struct bootdev_ops system_bootdev_ops = { - .get_bootflow = system_get_bootflow, -}; - -static const struct udevice_id system_bootdev_ids[] = { - { .compatible = "u-boot,bootdev-system" }, - { } -}; - -U_BOOT_DRIVER(system_bootdev) = { - .name = "system_bootdev", - .id = UCLASS_BOOTDEV, - .ops = &system_bootdev_ops, - .bind = system_bootdev_bind, - .of_match = system_bootdev_ids, -}; |