command: Remove the cmd_tbl_t typedef
[oweals/u-boot.git] / cmd / bootz.c
index 9648fe9948d5a16327c4153a12bf8b90542a4501..ac15856f8dfb9b1e6b54569e1e89ec76a9157ce6 100644 (file)
@@ -1,13 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <bootm.h>
 #include <command.h>
+#include <image.h>
+#include <irq_func.h>
 #include <lmb.h>
 #include <linux/compiler.h>
 
@@ -22,8 +23,8 @@ int __weak bootz_setup(ulong image, ulong *start, ulong *end)
 /*
  * zImage booting support
  */
-static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
-                       char * const argv[], bootm_headers_t *images)
+static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc,
+                      char *const argv[], bootm_headers_t *images)
 {
        int ret;
        ulong zi_start, zi_end;
@@ -33,9 +34,9 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
 
        /* Setup Linux kernel zImage entry point */
        if (!argc) {
-               images->ep = load_addr;
+               images->ep = image_load_addr;
                debug("*  kernel: default image load address = 0x%08lx\n",
-                               load_addr);
+                               image_load_addr);
        } else {
                images->ep = simple_strtoul(argv[0], NULL, 16);
                debug("*  kernel: cmdline image address = 0x%08lx\n",
@@ -58,7 +59,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
        return 0;
 }
 
-int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        int ret;
 
@@ -76,6 +77,9 @@ int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
        images.os.os = IH_OS_LINUX;
        ret = do_bootm_states(cmdtp, flag, argc, argv,
+#ifdef CONFIG_SYS_BOOT_RAMDISK_HIGH
+                             BOOTM_STATE_RAMDISK |
+#endif
                              BOOTM_STATE_OS_PREP | BOOTM_STATE_OS_FAKE_GO |
                              BOOTM_STATE_OS_GO,
                              &images, 1);