]> git.sur5r.net Git - u-boot/blobdiff - common/spl/spl_ubi.c
menu: fix timeout duration
[u-boot] / common / spl / spl_ubi.c
index c03910bb40809fa39462cf11d9b8a868f86101c7..a7939e90305f1250b5806cdd268e54fb097e77ea 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
 /*
  * Copyright (C) 2016
  * Ladislav Michl <ladis@linux-mips.org>
- *
- * SPDX-License-Identifier: GPL 2.0+ BSD-3-Clause
  */
 
 #include <common.h>
@@ -38,7 +37,7 @@ int spl_ubi_load_image(struct spl_image_info *spl_image,
                goto out;
        }
        info.ubi = (struct ubi_scan_info *)CONFIG_SPL_UBI_INFO_ADDR;
-       info.fastmap = 1;
+       info.fastmap = IS_ENABLED(CONFIG_MTD_UBI_FASTMAP);
 
        info.peb_offset = CONFIG_SPL_UBI_PEB_OFFSET;
        info.vid_offset = CONFIG_SPL_UBI_VID_OFFSET;
@@ -78,5 +77,5 @@ out:
        return ret;
 }
 /* Use priorty 0 so that Ubi will override NAND and ONENAND methods */
-SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_NAND, spl_ubi_load_image);
-SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_ONENAND, spl_ubi_load_image);
+SPL_LOAD_IMAGE_METHOD("NAND", 0, BOOT_DEVICE_NAND, spl_ubi_load_image);
+SPL_LOAD_IMAGE_METHOD("OneNAND", 0, BOOT_DEVICE_ONENAND, spl_ubi_load_image);