]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/mach-rockchip/rk3036-board-spl.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / arch / arm / mach-rockchip / rk3036-board-spl.c
index 3a1491cab33b7608bd89bbd044c56aa9cf49d066..5ec69f131161f1edc07aa9c14f9b81e1e222458b 100644 (file)
@@ -1,29 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2015 Rockchip Electronics Co., Ltd
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <asm/io.h>
+#include <asm/arch/bootrom.h>
 #include <asm/arch/grf_rk3036.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sdram_rk3036.h>
 #include <asm/arch/timer.h>
 #include <asm/arch/uart.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #define GRF_BASE       0x20008000
-static struct rk3036_grf * const grf = (void *)GRF_BASE;
 
 #define DEBUG_UART_BASE        0x20068000
 
-extern void back_to_bootrom(void);
-
 void board_init_f(ulong dummy)
 {
 #ifdef EARLY_DEBUG
+       struct rk3036_grf * const grf = (void *)GRF_BASE;
        /*
         * NOTE: sd card and debug uart use same iomux in rk3036,
         * so if you enable uart,
@@ -34,13 +31,13 @@ void board_init_f(ulong dummy)
                     GPIO1C2_MASK << GPIO1C2_SHIFT,
                     GPIO1C3_UART2_SOUT << GPIO1C3_SHIFT |
                     GPIO1C2_UART2_SIN << GPIO1C2_SHIFT);
-       rk_uart_init((void *)DEBUG_UART_BASE);
+       debug_uart_init();
 #endif
        rockchip_timer_init();
        sdram_init();
 
        /* return to maskrom */
-       back_to_bootrom();
+       back_to_bootrom(BROM_BOOT_NEXTSTAGE);
 }
 
 /* Place Holders */