]> git.dujemihanovic.xyz Git - u-boot.git/commit
drivers: introduce UBI block abstraction
authorAlexey Romanov <avromanov@salutedevices.com>
Thu, 18 Jul 2024 05:45:25 +0000 (08:45 +0300)
committerMichael Trimarchi <michael@amarulasolutions.com>
Thu, 8 Aug 2024 07:28:00 +0000 (09:28 +0200)
commit9daad11ad178646c288aca3615a7ba1e6039aed3
treeafee32b820d4a301ec3a81a14f0399d0408fe095
parent25ee9c2005958e6f06609eef5c9d9915c77ece97
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>
drivers/block/blk-uclass.c
drivers/mtd/ubi/Kconfig
drivers/mtd/ubi/Makefile
drivers/mtd/ubi/block.c [new file with mode: 0644]
include/ubi_uboot.h