dm: sandbox: Create a new HOST uclass
authorSimon Glass <sjg@chromium.org>
Sun, 30 Oct 2022 01:47:15 +0000 (19:47 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 7 Nov 2022 23:24:30 +0000 (16:24 -0700)
commit9bd1aa8af2ed3efde28250987806aaeb12837c66
tree3733c428484dcbb7801594dbd076d9860985ed5c
parent41e751091d7cb1a71ac13ab037e0fcf4fcee67e3
dm: sandbox: Create a new HOST uclass

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 <sjg@chromium.org>
drivers/block/Makefile
drivers/block/host-uclass.c [new file with mode: 0644]
include/dm/uclass-id.h
include/sandbox_host.h [new file with mode: 0644]