summaryrefslogtreecommitdiff
path: root/common/spl/spl_sata.c
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2019-05-16 13:03:54 +0300
committerStefan Roese <sr@denx.de>2019-07-11 08:01:18 +0300
commitab2d415e9bbab64431e6475fbb5a5c62303f8163 (patch)
tree2b2365ec06e9cd0916c034a9f7b85c91badf6f5c /common/spl/spl_sata.c
parenta4c61ffde3ae4f1b7228d2ecd40fbb8f3703d76c (diff)
downloadu-boot-ab2d415e9bbab64431e6475fbb5a5c62303f8163.tar.xz
spl: sata: fix build with DM_SCSI
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>
Diffstat (limited to 'common/spl/spl_sata.c')
-rw-r--r--common/spl/spl_sata.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index b08efc8419..2fb46108a5 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -28,10 +28,12 @@
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);