]> git.baikalelectronics.ru Git - uboot.git/commitdiff
cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined
authorYork Sun <york.sun@nxp.com>
Thu, 28 Sep 2017 15:42:11 +0000 (08:42 -0700)
committerYork Sun <york.sun@nxp.com>
Mon, 9 Oct 2017 15:48:44 +0000 (08:48 -0700)
CONFIG_CMD_SPL_WRITE_SIZE is used for writing parameters to non-volatile
storage. So far it is only used for NAND. Fix compiling error when this
macro is not used for SD.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Anatolij Gustschin <agust@denx.de>
cmd/spl.c

index 4d84492346dd1e3a9a4ddc7782ac0315e36a82ab..3b8992a16364c8a3f9e6c234bbc5870554673d19 100644 (file)
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -121,9 +121,11 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
                                (void *)images.ft_addr);
                        env_set_addr("fdtargsaddr", images.ft_addr);
                        env_set_hex("fdtargslen", fdt_totalsize(images.ft_addr));
+#ifdef CONFIG_CMD_SPL_WRITE_SIZE
                        if (fdt_totalsize(images.ft_addr) >
                            CONFIG_CMD_SPL_WRITE_SIZE)
                                puts("WARN: FDT size > CMD_SPL_WRITE_SIZE\n");
+#endif
                        break;
 #endif
                case SPL_EXPORT_ATAGS: