]> git.sur5r.net Git - u-boot/commitdiff
dm: systemace: Add a legacy block interface
authorSimon Glass <sjg@chromium.org>
Sun, 1 May 2016 17:36:04 +0000 (11:36 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 17 May 2016 15:54:43 +0000 (09:54 -0600)
Add a legacy block interface for systemace.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/block/systemace.c
include/blk.h

index 09fe834e2270ef8c765e12d111d91b31ad11ab83..0d8e26f8aab8abb7e4a665d7431d905f9b5ca883 100644 (file)
@@ -132,6 +132,13 @@ struct blk_desc *systemace_get_dev(int dev)
 }
 #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 @@ static unsigned long systemace_read(struct blk_desc *block_dev,
 
        return blkcnt;
 }
+
+U_BOOT_LEGACY_BLK(systemace) = {
+       .if_typename    = "ace",
+       .if_type        = IF_TYPE_SYSTEMACE,
+       .max_devs       = 1,
+       .get_dev        = systemace_get_devp,
+};
index a562c10a29aa15d1c8bc6fb5fa60c6c8a5ebd705..2caac9c96b68be6f95d1e5d42457afccf9560265 100644 (file)
@@ -30,6 +30,7 @@ enum if_type {
        IF_TYPE_SD,
        IF_TYPE_SATA,
        IF_TYPE_HOST,
+       IF_TYPE_SYSTEMACE,
 
        IF_TYPE_COUNT,                  /* Number of interface types */
 };