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>
This commit is contained in:
AKASHI Takahiro
2022-04-19 10:05:09 +09:00
committed by Heinrich Schuchardt
parent 8ff50227be
commit 43855fdb2c
4 changed files with 167 additions and 0 deletions

View File

@@ -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.