Sandbox supports block devices which can access files on the host machine. At present there is no uclass for this. The devices are attached to the root devic. The block-device type is therefore set to UCLASS_ROOT which is confusing.
Block devices should be attached to a 'media' device instead, something which handles access to the actual media and provides the block driver for the block device. Create a new uclass to handle this. It supports two operations, to attach and detach a file on the host machine. For now this is not fully plumbed in. Signed-off-by: Simon Glass <s...@chromium.org> --- drivers/block/Makefile | 2 +- drivers/block/host-uclass.c | 176 ++++++++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/sandbox_host.h | 125 +++++++++++++++++++++++++ 4 files changed, 303 insertions(+), 1 deletion(-) create mode 100644 drivers/block/host-uclass.c create mode 100644 include/sandbox_host.h Applied to u-boot-dm, thanks!