/* The emulator device must still be contained in the device tree in the usual way, since configuration data for the storage is read from the DT.  */
static int axi_sandbox_read(struct udevice *bus, ulong address, void *data, enum axi_size_t size)
/* The emulator device must still be contained in the device tree in the usual way, since configuration data for the storage is read from the DT.  */
static int axi_sandbox_read(struct udevice *bus, ulong address, void *data, enum axi_size_t size)
{
	struct axi_emul_ops *ops;
	struct udevice *emul;
	int ret;
	ret = axi_sandbox_get_emul(bus, address, size, &emul);
	if (ret)
		return ret == -ENODEV ? 0 : ret;
	ops = axi_emul_get_ops(emul);
	if (!ops || !ops->read)
		return -ENOSYS;
	return ops->read(emul, address, data, size);
}