]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/mach-rockchip/rk3188-board.c
2 * (C) Copyright 2015 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
13 #include <asm/arch/clock.h>
14 #include <asm/arch/grf_rk3188.h>
15 #include <asm/arch/periph.h>
16 #include <asm/arch/pmu_rk3288.h>
17 #include <asm/arch/boot_mode.h>
19 #include <dm/pinctrl.h>
21 DECLARE_GLOBAL_DATA_PTR
;
23 int board_late_init(void)
25 struct rk3188_grf
*grf
;
27 grf
= syscon_get_first_range(ROCKCHIP_SYSCON_GRF
);
29 pr_err("grf syscon returned %ld\n", PTR_ERR(grf
));
31 /* enable noc remap to mimic legacy loaders */
32 rk_clrsetreg(&grf
->soc_con0
,
33 NOC_REMAP_MASK
<< NOC_REMAP_SHIFT
,
34 NOC_REMAP_MASK
<< NOC_REMAP_SHIFT
);
42 #if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)
43 struct udevice
*pinctrl
;
47 * We need to implement sdcard iomux here for the further
48 * initialization, otherwise, it'll hit sdcard command sending
51 ret
= uclass_get_device(UCLASS_PINCTRL
, 0, &pinctrl
);
53 debug("%s: Cannot find pinctrl device\n", __func__
);
56 ret
= pinctrl_request_noflags(pinctrl
, PERIPH_ID_SDCARD
);
58 debug("%s: Failed to set up SD card\n", __func__
);
64 printf("board_init: Error %d\n", ret
);
66 /* No way to report error here */
75 #ifndef CONFIG_SYS_DCACHE_OFF
76 void enable_caches(void)
78 /* Enable D-cache. I-cache is already enabled in start.S */