From: Kever Yang Date: Fri, 29 Mar 2019 01:09:03 +0000 (+0800) Subject: rockchip: rk3288: use grf structure to access soc_con2 X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=070e48b30e9d407ae65894b4bc091d5312748d09;p=u-boot.git rockchip: rk3288: use grf structure to access soc_con2 Prefer to use structure to access register if we can. Signed-off-by: Kever Yang Reviewed-by: Philipp Tomsich --- diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c index af3a465cc3..987fae544c 100644 --- a/arch/arm/mach-rockchip/rk3288/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c @@ -4,15 +4,17 @@ */ #include #include +#include -#define GRF_SOC_CON2 0xff77024c +#define GRF_BASE 0xff770000 int arch_cpu_init(void) { /* We do some SoC one time setting here. */ + struct rk3288_grf * const grf = (void *)GRF_BASE; /* Use rkpwm by default */ - rk_setreg(GRF_SOC_CON2, 1 << 0); + rk_setreg(&grf->soc_con2, 1 << 0); return 0; }