1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2017 Rockchip Electronics Co., Ltd
7 #include <debug_uart.h>
12 #include <asm/arch-rockchip/bootrom.h>
13 #include <asm/arch-rockchip/hardware.h>
14 #include <asm/arch-rockchip/timer.h>
16 u32 spl_boot_device(void)
18 return BOOT_DEVICE_MMC1;
21 #define SGRF_DDR_CON0 0x10150000
22 void board_init_f(ulong dummy)
27 #ifdef CONFIG_DEBUG_UART
29 * Debug UART can be used from here if required:
34 * printascii("string");
37 printascii("SPL Init");
39 ret = spl_early_init();
41 debug("spl_early_init() failed: %d\n", ret);
45 rockchip_timer_init();
46 printf("timer init done\n");
47 ret = uclass_get_device(UCLASS_RAM, 0, &dev);
49 printf("DRAM init failed: %d\n", ret);
53 /* Disable the ddr secure region setting to make it non-secure */
54 rk_clrreg(SGRF_DDR_CON0, 0x4000);
55 #if defined(CONFIG_SPL_ROCKCHIP_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
56 back_to_bootrom(BROM_BOOT_NEXTSTAGE);