diff options
| author | Alexey Romanov <[email protected]> | 2024-07-18 08:45:25 +0300 |
|---|---|---|
| committer | Michael Trimarchi <[email protected]> | 2024-08-08 09:28:00 +0200 |
| commit | 9daad11ad178646c288aca3615a7ba1e6039aed3 (patch) | |
| tree | afee32b820d4a301ec3a81a14f0399d0408fe095 /include/ubi_uboot.h | |
| parent | 25ee9c2005958e6f06609eef5c9d9915c77ece97 (diff) | |
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 <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>
Diffstat (limited to 'include/ubi_uboot.h')
| -rw-r--r-- | include/ubi_uboot.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h index d36bb923482..ea0db69c72a 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 |
