]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - cmd/spl.c
armv8: fsl-layerscape: Put SATA code under SATA configs
[people/ms/u-boot.git] / cmd / spl.c
index 1165b786d3428745fb8660d967336366ba443905..4d84492346dd1e3a9a4ddc7782ac0315e36a82ab 100644 (file)
--- a/cmd/spl.c
+++ b/cmd/spl.c
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <command.h>
 #include <cmd_spl.h>
+#include <libfdt.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -108,12 +109,12 @@ 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",
@@ -152,7 +153,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--;