summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-07-03 10:14:32 -0600
committerTom Rini <[email protected]>2026-07-03 10:14:32 -0600
commit2569e25ddd5aa323cd87c7a3819c3a4f4b32302f (patch)
tree5c341a5b2908aab52ace915bde5b60ebdbe922d0 /include
parent683161607af99a12de83eb5702d1f2662a107ac1 (diff)
parent93e9af685fefc454580dcf567b03c139a2fe8ebc (diff)
Merge patch series "bootdev: few fixes for automatic boot"
[email protected] <[email protected]> says: This series addresses few findings in bootdev code. Patch 1 fix for automatic boots in case higher-priority bootdevs fail to be hunted. Patch 2 adds unit test for patch 1. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/sandbox_host.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sandbox_host.h b/include/sandbox_host.h
index f7a5fc67230..1330358ef7a 100644
--- a/include/sandbox_host.h
+++ b/include/sandbox_host.h
@@ -9,16 +9,25 @@
#define __SANDBOX_HOST__
/**
+ * Device flags.
+ */
+enum host_platform_flags {
+ HOST_FLAG_BROKEN = BIT(0), /** Simulate broken device */
+};
+
+/**
* struct host_sb_plat - platform data for a host device
*
* @label: Label for this device (allocated)
* @filename: Name of file this is attached to, or NULL (allocated)
* @fd: File descriptor of file, or 0 for none (file is not open)
+ * @flags: Device flags (e.g. for unit tests).
*/
struct host_sb_plat {
char *label;
char *filename;
int fd;
+ unsigned int flags;
};
/**
@@ -122,4 +131,13 @@ struct udevice *host_get_cur_dev(void);
*/
void host_set_cur_dev(struct udevice *dev);
+/**
+ * host_set_flags_by_label() - Set the host device test flags
+ *
+ * @label: Label of the attachment, e.g. "test1"
+ * @flags: Device flags
+ * Returns: 0 if OK, -ve on error
+ */
+int host_set_flags_by_label(const char *label, unsigned int flags);
+
#endif /* __SANDBOX_HOST__ */