X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cmd%2Fspl.c;h=038f48818d9403762c3fad4a6aee83b823639212;hb=a673025535ae6b559be9badb9fd4c2c9e692b880;hp=ad033652d4c299bbe7087f235fee737309a405d2;hpb=4109d702934c361b2ae2a5ad34f4dfee708cc214;p=u-boot diff --git a/cmd/spl.c b/cmd/spl.c index ad033652d4..038f48818d 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -1,14 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2011 * Corscience GmbH & Co. KG - Simon Schwarz - * - * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -109,21 +108,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 +154,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--;