command: Remove the cmd_tbl_t typedef
[oweals/u-boot.git] / arch / microblaze / cpu / spl.c
index 091226133e4fa2c1ae7a2182622951ae8eb74d05..c633e83853ee1c4fc1191325d2d141cb20288a1b 100644 (file)
@@ -1,20 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2013 - 2014 Xilinx, Inc
  *
  * Michal Simek <michal.simek@xilinx.com>
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <common.h>
+#include <command.h>
 #include <image.h>
 #include <spl.h>
-#include <version.h>
 #include <asm/io.h>
 #include <asm/u-boot.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 bool boot_linux;
 
 u32 spl_boot_device(void)
@@ -25,22 +22,20 @@ u32 spl_boot_device(void)
 /* Board initialization after bss clearance */
 void spl_board_init(void)
 {
-       gd = (gd_t *)CONFIG_SPL_STACK_ADDR;
-
        /* enable console uart printing */
        preloader_console_init();
 }
 
 #ifdef CONFIG_SPL_OS_BOOT
-void __noreturn jump_to_image_linux(void *arg)
+void __noreturn jump_to_image_linux(struct spl_image_info *spl_image)
 {
-       debug("Entering kernel arg pointer: 0x%p\n", arg);
+       debug("Entering kernel arg pointer: 0x%p\n", spl_image->arg);
        typedef void (*image_entry_arg_t)(char *, ulong, ulong)
                __attribute__ ((noreturn));
        image_entry_arg_t image_entry =
-               (image_entry_arg_t)spl_image.entry_point;
+               (image_entry_arg_t)spl_image->entry_point;
 
-       image_entry(NULL, 0, (ulong)arg);
+       image_entry(NULL, 0, (ulong)spl_image->arg);
 }
 #endif /* CONFIG_SPL_OS_BOOT */
 
@@ -53,3 +48,11 @@ int spl_start_uboot(void)
 
        return 1;
 }
+
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+{
+       __asm__ __volatile__ ("mts rmsr, r0;" \
+                             "bra r0");
+
+       return 0;
+}