aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexey Romanov <avromanov@salutedevices.com>2024-07-18 08:45:25 +0300
committerMichael Trimarchi <michael@amarulasolutions.com>2024-08-08 09:28:00 +0200
commit9daad11ad178646c288aca3615a7ba1e6039aed3 (patch)
treeafee32b820d4a301ec3a81a14f0399d0408fe095 /include
parent25ee9c2005958e6f06609eef5c9d9915c77ece97 (diff)
downloadu-boot-9daad11ad178646c288aca3615a7ba1e6039aed3.zip
u-boot-9daad11ad178646c288aca3615a7ba1e6039aed3.tar.gz
u-boot-9daad11ad178646c288aca3615a7ba1e6039aed3.tar.bz2
drivers: introduce UBI block abstraction
UBI block is an virtual device, that runs on top of the MTD layer. The blocks are UBI volumes. Intended to be used in combination with other MTD drivers. Despite the fact that it, like mtdblock abstraction, it used with UCLASS_MTD, they can be used together on the system without conflicting. For example, using bcb command: # Trying to load bcb via mtdblock: $ bcb load mtd 0 mtd_partition_name # Trying to load bcb via UBI block: $ bcb load ubi 1 ubi_volume_name User always must attach UBI layer (for example, using ubi_part()) before using UBI block device. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Diffstat (limited to 'include')
-rw-r--r--include/ubi_uboot.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
index d36bb92..ea0db69 100644
--- a/include/ubi_uboot.h
+++ b/include/ubi_uboot.h
@@ -55,4 +55,13 @@ extern struct ubi_device *ubi_devices[];
int cmd_ubifs_mount(char *vol_name);
int cmd_ubifs_umount(void);
+#if IS_ENABLED(CONFIG_UBI_BLOCK)
+int ubi_bind(struct udevice *dev);
+#else
+static inline int ubi_bind(struct udevice *dev)
+{
+ return -EOPNOTSUPP;
+}
+#endif
+
#endif