dm: systemace: Add a legacy block interface
Add a legacy block interface for systemace.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
index 09fe834..0d8e26f 100644
--- a/drivers/block/systemace.c
+++ b/drivers/block/systemace.c
@@ -132,6 +132,13 @@
}
#endif
+static int systemace_get_devp(int dev, struct blk_desc **descp)
+{
+ *descp = systemace_get_dev(dev);
+
+ return 0;
+}
+
/*
* This function is called (by dereferencing the block_read pointer in
* the dev_desc) to read blocks of data. The return value is the
@@ -257,3 +264,10 @@
return blkcnt;
}
+
+U_BOOT_LEGACY_BLK(systemace) = {
+ .if_typename = "ace",
+ .if_type = IF_TYPE_SYSTEMACE,
+ .max_devs = 1,
+ .get_dev = systemace_get_devp,
+};