select SPL_RAM
select SPL_DRIVERS_MISC_SUPPORT
select SPL_ROCKCHIP_EARLYRETURN_TO_BROM
+ select DEBUG_UART_BOARD_INIT
select BOARD_LATE_INIT
select ROCKCHIP_BROM_HELPER
help
return ret;
}
-#define GRF_BASE 0x20008000
-
-void board_init_f(ulong dummy)
+void board_debug_uart_init(void)
{
- __maybe_unused struct rk3188_grf * const grf = (void *)GRF_BASE;
- struct udevice *pinctrl, *dev;
- int ret;
-
- /* Example code showing how to enable the debug UART on RK3188 */
-#ifdef EARLY_UART
+ /* Enable early UART on the RK3188 */
+#define GRF_BASE 0x20008000
+ struct rk3188_grf * const grf = (void *)GRF_BASE;
enum {
GPIO1B1_SHIFT = 2,
GPIO1B1_MASK = 3,
- GPIO1B1_UART2_SOUT = 1,
+ GPIO1B1_GPIO = 0,
+ GPIO1B1_UART2_SOUT,
GPIO1B0_SHIFT = 0,
GPIO1B0_MASK = 3,
- GPIO1B0_UART2_SIN = 1,
+ GPIO1B0_GPIO = 0,
+ GPIO1B0_UART2_SIN,
};
/* Enable early UART on the RK3188 */
GPIO1B0_MASK << GPIO1B0_SHIFT,
GPIO1B1_UART2_SOUT << GPIO1B1_SHIFT |
GPIO1B0_UART2_SIN << GPIO1B0_SHIFT);
+}
+
+void board_init_f(ulong dummy)
+{
+ struct udevice *pinctrl, *dev;
+ int ret;
+
+#define EARLY_UART
+#ifdef EARLY_UART
/*
* Debug UART can be used from here if required:
*