X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cmd%2Fspl.c;h=3b8992a16364c8a3f9e6c234bbc5870554673d19;hb=3703526f1e0a572b1e8e61dea039348b0f260ae1;hp=ad033652d4c299bbe7087f235fee737309a405d2;hpb=1d20170467b079642be96996dcd71db64c3c365c;p=u-boot diff --git a/cmd/spl.c b/cmd/spl.c index ad033652d4..3b8992a163 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -109,21 +109,23 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) c = find_cmd_tbl(argv[1], &cmd_spl_export_sub[0], ARRAY_SIZE(cmd_spl_export_sub)); - if ((c) && ((int)c->cmd <= SPL_EXPORT_LAST)) { + if ((c) && ((long)c->cmd <= SPL_EXPORT_LAST)) { argc -= 2; argv += 2; - if (call_bootm(argc, argv, subcmd_list[(int)c->cmd])) + if (call_bootm(argc, argv, subcmd_list[(long)c->cmd])) return -1; - switch ((int)c->cmd) { + switch ((long)c->cmd) { #ifdef CONFIG_OF_LIBFDT case SPL_EXPORT_FDT: printf("Argument image is now in RAM: 0x%p\n", (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: @@ -153,7 +155,7 @@ static int do_spl(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) c = find_cmd_tbl(argv[1], &cmd_spl_sub[0], ARRAY_SIZE(cmd_spl_sub)); if (c) { - cmd = (int)c->cmd; + cmd = (long)c->cmd; switch (cmd) { case SPL_EXPORT: argc--;