]> git.sur5r.net Git - u-boot/blobdiff - drivers/scsi/scsi.c
sf: add paired dev info for winbond w25q16jv
[u-boot] / drivers / scsi / scsi.c
index 7ec7ecc29580c1a1e4b02dc80fed9f25338d53cd..16246bec2b3152b3c3f8228a23b70e88a21cae6c 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2001
  * Denis Peter, MPL AG Switzerland
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -451,7 +450,7 @@ static void scsi_init_dev_desc_priv(struct blk_desc *dev_desc)
        dev_desc->product[0] = 0;
        dev_desc->revision[0] = 0;
        dev_desc->removable = false;
-#ifndef CONFIG_BLK
+#if !CONFIG_IS_ENABLED(BLK)
        dev_desc->block_read = scsi_read;
        dev_desc->block_write = scsi_write;
 #endif
@@ -580,7 +579,7 @@ static int do_scsi_scan_one(struct udevice *dev, int id, int lun, bool verbose)
        */
        snprintf(str, sizeof(str), "id%dlun%d", id, lun);
        ret = blk_create_devicef(dev, "scsi_blk", str, IF_TYPE_SCSI, -1,
-                       bd.blksz, bd.blksz * bd.lba, &bdev);
+                       bd.blksz, bd.lba, &bdev);
        if (ret) {
                debug("Can't create device\n");
                return ret;
@@ -682,7 +681,7 @@ int scsi_scan(bool verbose)
 
        printf("Found %d device(s).\n", scsi_max_devs);
 #ifndef CONFIG_SPL_BUILD
-       setenv_ulong("scsidevs", scsi_max_devs);
+       env_set_ulong("scsidevs", scsi_max_devs);
 #endif
        return 0;
 }