提交 070e48b3 编写于 作者: K Kever Yang 提交者: Philipp Tomsich

rockchip: rk3288: use grf structure to access soc_con2

Prefer to use structure to access register if we can.
Signed-off-by: NKever Yang <kever.yang@rock-chips.com>
Reviewed-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
上级 28fe4d5b
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册