]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: sata: fix build with DM_SCSI
authorBaruch Siach <baruch@tkos.co.il>
Thu, 16 May 2019 10:03:54 +0000 (13:03 +0300)
committerStefan Roese <sr@denx.de>
Thu, 11 Jul 2019 05:01:18 +0000 (07:01 +0200)
The init_sata() routine is only present when DM_SCSI is not enabled.
Don't call init_sata() when DM_SCSI is enabled. The code will fall back
to scsi_scan() in this case.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stefan Roese <sr@denx.de>
common/spl/spl_sata.c

index b08efc8419034188ad8c799e9df15c914dd30246..2fb46108a5127c7017037e01f49a6130f5308ef8 100644 (file)
 static int spl_sata_load_image(struct spl_image_info *spl_image,
                               struct spl_boot_device *bootdev)
 {
-       int err;
+       int err = 0;
        struct blk_desc *stor_dev;
 
+#if !defined(CONFIG_DM_SCSI) && !defined(CONFIG_AHCI)
        err = init_sata(CONFIG_SPL_SATA_BOOT_DEVICE);
+#endif
        if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
                printf("spl: sata init failed: err - %d\n", err);