[U-Boot] [PATCH 06/10] rockchip: rk3288: use grf structure to access soc_con2
Kever Yang
kever.yang at rock-chips.com
Fri Apr 20 04:40:54 UTC 2018
Prefer to use structure to access register if we can.
Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---
arch/arm/mach-rockchip/rk3288/rk3288.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c b/arch/arm/mach-rockchip/rk3288/rk3288.c
index acc3b79..8f5aaa1 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -5,15 +5,17 @@
*/
#include <asm/io.h>
#include <asm/arch/hardware.h>
+#include <asm/arch/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;
}
--
1.9.1
More information about the U-Boot
mailing list