2 * (C) Copyright 2015 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
13 #include <asm/arch/clock.h>
14 #include <asm/arch/periph.h>
15 #include <asm/arch/pmu_rk3288.h>
16 #include <asm/arch/boot_mode.h>
18 #include <dm/pinctrl.h>
20 DECLARE_GLOBAL_DATA_PTR;
24 #if defined(CONFIG_ROCKCHIP_SPL_BACK_TO_BROM)
25 struct udevice *pinctrl;
29 * We need to implement sdcard iomux here for the further
30 * initialization, otherwise, it'll hit sdcard command sending
33 ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl);
35 debug("%s: Cannot find pinctrl device\n", __func__);
38 ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_SDCARD);
40 debug("%s: Failed to set up SD card\n", __func__);
46 printf("board_init: Error %d\n", ret);
48 /* No way to report error here */
63 ret = uclass_get_device(UCLASS_RAM, 0, &dev);
65 debug("DRAM init failed: %d\n", ret);
68 ret = ram_get_info(dev, &ram);
70 debug("Cannot get DRAM size: %d\n", ret);
73 debug("SDRAM base=%lx, size=%x\n", ram.base, ram.size);
74 gd->ram_size = ram.size;
79 #ifndef CONFIG_SYS_DCACHE_OFF
80 void enable_caches(void)
82 /* Enable D-cache. I-cache is already enabled in start.S */