diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2022-04-19 10:05:09 +0900 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-04-23 22:05:41 +0200 |
commit | 43855fdb2c99eae0cdc9b3c54c2d719262d3b3eb (patch) | |
tree | 02cc726f5c18ca426a77453e411660da5383e2eb /include | |
parent | 8ff50227befdc778eb2cb239b778ed1ed843bf33 (diff) | |
download | u-boot-43855fdb2c99eae0cdc9b3c54c2d719262d3b3eb.tar.gz |
dm: disk: add UCLASS_PARTITION
NOTE: probably we have to update config dependencies,
in particular, SPL/TPL_PRINTF?
With this new function, UCLASS_PARTITION devices will be created as
child nodes of UCLASS_BLK device.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/uclass-id.h | 1 | ||||
-rw-r--r-- | include/part.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 0e26e1d1382..230b1ea528c 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -83,6 +83,7 @@ enum uclass_id { UCLASS_P2SB, /* (x86) Primary-to-Sideband Bus */ UCLASS_PANEL, /* Display panel, such as an LCD */ UCLASS_PANEL_BACKLIGHT, /* Backlight controller for panel */ + UCLASS_PARTITION, /* Logical disk partition device */ UCLASS_PCH, /* x86 platform controller hub */ UCLASS_PCI, /* PCI bus */ UCLASS_PCI_EP, /* PCI endpoint device */ diff --git a/include/part.h b/include/part.h index 625afe79baa..a8db398d3ae 100644 --- a/include/part.h +++ b/include/part.h @@ -303,6 +303,16 @@ part_get_info_by_dev_and_name_or_num(const char *dev_iface, } #endif +struct udevice; +/** + * part_create_block_devices - Create block devices for disk partitions + * + * Create UCLASS_PARTITION udevices for each of disk partitions in @parent + * + * @blk_dev: Whole disk device + */ +int part_create_block_devices(struct udevice *blk_dev); + /* * We don't support printing partition information in SPL and only support * getting partition information in a few cases. |