Files
u-boot/boot/bootctl/bootctl-uclass.c
Simon Glass 001eeb2c8d bootctl: Create a common struct for the BOOTCTL_UI uclass
All UI implementations will likely share a number of common elements, so
move these into a per-device uclass struct.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-18 09:38:25 +01:00

48 lines
1.1 KiB
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Uclass implementation for boot schema
*
* Copyright 2025 Canonical Ltd
* Written by Simon Glass <simon.glass@canonical.com>
*/
#define LOG_CATEGORY UCLASS_BOOTCTL
#include <bootctl.h>
#include <dm.h>
#include <bootctl/ui.h>
UCLASS_DRIVER(bootctrl) = {
.id = UCLASS_BOOTCTL,
.name = "bootctrl",
#if CONFIG_IS_ENABLED(OF_REAL)
.post_bind = dm_scan_fdt_dev,
#endif
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
};
UCLASS_DRIVER(bootctrl_measure) = {
.id = UCLASS_BOOTCTL_MEASURE,
.name = "bootctrl_measure",
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
};
UCLASS_DRIVER(bootctrl_oslist) = {
.id = UCLASS_BOOTCTL_OSLIST,
.name = "bootctrl_oslist",
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
};
UCLASS_DRIVER(bootctrl_state) = {
.id = UCLASS_BOOTCTL_STATE,
.name = "bootctrl_state",
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
};
UCLASS_DRIVER(bootctrl_ui) = {
.id = UCLASS_BOOTCTL_UI,
.name = "bootctrl_ui",
.per_device_plat_auto = sizeof(struct bootctl_uc_plat),
.per_device_auto = sizeof(struct bc_ui_priv),
};