Use syscon API to get grf base instead of get from dts.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
*/
#include <common.h>
+#include <syscon.h>
#include <asm/io.h>
-#include <fdtdec.h>
+#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/grf_rv1108.h>
#include <asm/arch-rockchip/hardware.h>
int mach_cpu_init(void)
{
- int node;
struct rv1108_grf *grf;
enum {
GPIO3C3_SHIFT = 6,
GPIO2D1_UART2_SIN_M0,
};
- node = fdt_node_offset_by_compatible(gd->fdt_blob, -1, "rockchip,rv1108-grf");
- grf = (struct rv1108_grf *)fdtdec_get_addr(gd->fdt_blob, node, "reg");
+ grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
/*evb board use UART2 m0 for debug*/
rk_clrsetreg(&grf->gpio2d_iomux,