From: Kever Yang Date: Fri, 29 Mar 2019 01:09:06 +0000 (+0800) Subject: rockchip: rk3399: use grf structure to access reg X-Git-Tag: v2019.07-rc2~29^2~3 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f9e8145614458d516dd14a48a95371e08bf36515;p=oweals%2Fu-boot.git rockchip: rk3399: use grf structure to access reg Prefer to use structure to access register if we could. Signed-off-by: Kever Yang Reviewed-by: Philipp Tomsich --- diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c index a0af096efd..612ebdfe72 100644 --- a/arch/arm/mach-rockchip/rk3399/rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/rk3399.c @@ -7,11 +7,13 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; #define GRF_EMMCCORE_CON11 0xff77f02c +#define GRF_BASE 0xff770000 static struct mm_region rk3399_mem_map[] = { { @@ -49,9 +51,10 @@ int dram_init_banksize(void) int arch_cpu_init(void) { /* We do some SoC one time setting here. */ + struct rk3399_grf_regs * const grf = (void *)GRF_BASE; /* Emmc clock generator: disable the clock multipilier */ - rk_clrreg(GRF_EMMCCORE_CON11, 0x0ff); + rk_clrreg(&grf->emmccore_con[11], 0x0ff); return 0; }