X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fspl.c;h=56051b8a4be926c8882b7a7e4909816375bf84b0;hb=453d21381bda4452937a6d3c648230805b528b9b;hp=1165b786d3428745fb8660d967336366ba443905;hpb=767cb74a0028be337d2ffecee7450e83fa2e7bd1;p=oweals%2Fu-boot.git diff --git a/cmd/spl.c b/cmd/spl.c index 1165b786d3..56051b8a4b 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -1,13 +1,14 @@ +// 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; @@ -108,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: @@ -152,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--;