aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288/rk3288.c')
-rw-r--r--arch/arm/mach-rockchip/rk3288/rk3288.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index a725abc5a5..7941ca68a6 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -3,16 +3,31 @@
3 * Copyright (c) 2016 Rockchip Electronics Co., Ltd 3 * Copyright (c) 2016 Rockchip Electronics Co., Ltd
4 */ 4 */
5#include <asm/io.h> 5#include <asm/io.h>
6#include <asm/arch/hardware.h> 6#include <asm/arch-rockchip/hardware.h>
7#include <asm/arch-rockchip/grf_rk3288.h>
7 8
8#define GRF_SOC_CON2 0xff77024c 9#define GRF_BASE 0xff770000
9 10
10int arch_cpu_init(void) 11int arch_cpu_init(void)
11{ 12{
12 /* We do some SoC one time setting here. */ 13 /* We do some SoC one time setting here. */
14 struct rk3288_grf * const grf = (void *)GRF_BASE;
13 15
14 /* Use rkpwm by default */ 16 /* Use rkpwm by default */
15 rk_setreg(GRF_SOC_CON2, 1 << 0); 17 rk_setreg(&grf->soc_con2, 1 << 0);
16 18
17 return 0; 19 return 0;
18} 20}
21
22#ifdef CONFIG_DEBUG_UART_BOARD_INIT
23void board_debug_uart_init(void)
24{
25 /* Enable early UART on the RK3288 */
26 struct rk3288_grf * const grf = (void *)GRF_BASE;
27
28 rk_clrsetreg(&grf->gpio7ch_iomux, GPIO7C7_MASK << GPIO7C7_SHIFT |
29 GPIO7C6_MASK << GPIO7C6_SHIFT,
30 GPIO7C7_UART2DBG_SOUT << GPIO7C7_SHIFT |
31 GPIO7C6_UART2DBG_SIN << GPIO7C6_SHIFT);
32}
33#endif