]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdev
authorTony Dinh <mibodhi@gmail.com>
Wed, 6 Sep 2023 05:22:41 +0000 (22:22 -0700)
committerStefan Roese <sr@denx.de>
Mon, 16 Oct 2023 09:10:42 +0000 (11:10 +0200)
Add hook in sata_mv probe to enable bootstd bootdev.

Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is
not enabled for ahci sata yet.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/ata/sata_mv.c

index 1abea0b30936269aa59b6f6bb86e9e963d62b6b4..94d7369351a32ae398c2d62ac06bc03f9f28498d 100644 (file)
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <ahci.h>
 #include <blk.h>
+#include <bootdev.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <log.h>
@@ -1105,6 +1106,12 @@ static int sata_mv_probe(struct udevice *dev)
                        /* TODO: undo create */
                        continue;
 
+               ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
+               if (ret) {
+                       printf("%s: Failed to create bootdev\n", __func__);
+                       continue;
+               }
+
                /* If we got here, the current SATA port was probed
                 * successfully, so set the probe status to successful.
                 */
@@ -1117,7 +1124,6 @@ static int sata_mv_probe(struct udevice *dev)
 static int sata_mv_scan(struct udevice *dev)
 {
        /* Nothing to do here */
-
        return 0;
 }