]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ata: dwc_ahsata: create boot device
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 8 Aug 2024 07:08:03 +0000 (09:08 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 27 Aug 2024 17:17:39 +0000 (11:17 -0600)
For each block device we must create a sibling boot device.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
drivers/ata/dwc_ahsata.c

index a29d641343edf280165923a500174a6b38424df1..203f98edffc5241cd5dbb26973943186b328ff6e 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <ahci.h>
 #include <blk.h>
+#include <bootdev.h>
 #include <cpu_func.h>
 #include <dm.h>
 #include <dwc_ahsata.h>
@@ -897,7 +898,11 @@ int dwc_ahsata_scan(struct udevice *dev)
        ret = blk_probe_or_unbind(dev);
        if (ret < 0)
                /* TODO: undo create */
-               return ret;
+               return log_msg_ret("pro", ret);
+
+       ret = bootdev_setup_for_sibling_blk(blk, "sata_bootdev");
+       if (ret)
+               return log_msg_ret("bd", ret);
 
        return 0;
 }