diff options
author | Kever Yang | 2019-03-29 09:09:03 +0800 |
---|---|---|
committer | Philipp Tomsich | 2019-05-01 09:40:58 +0200 |
commit | 070e48b30e9d407ae65894b4bc091d5312748d09 (patch) | |
tree | 9b093dd7856855c8b289f7a9e5d769a9fe6db94a /arch/arm/mach-rockchip/rk3288 | |
parent | 28fe4d5b304d52940b6928bb0ff9009b5c012d92 (diff) |
rockchip: rk3288: use grf structure to access soc_con2
Prefer to use structure to access register if we can.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk3288')
-rw-r--r-- | arch/arm/mach-rockchip/rk3288/rk3288.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c index af3a465cc32..987fae544cc 100644 --- a/arch/arm/mach-rockchip/rk3288/rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c @@ -4,15 +4,17 @@ */ #include <asm/io.h> #include <asm/arch-rockchip/hardware.h> +#include <asm/arch-rockchip/grf_rk3288.h> -#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; } |