diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2020-02-19 09:46:06 +0800 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2020-03-26 22:58:46 +0800 |
commit | 9cec3367087bcdcf6f583e60b95243d0d5e9ae92 (patch) | |
tree | 29506c0f512c372edef894f63a1671130bdc9119 | |
parent | 4aa33690fc9a225e7e35b5870e4c7378aae46e67 (diff) |
rockchip: evb-rv1108: Use syscon API to get grf base
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>
-rw-r--r-- | board/rockchip/evb_rv1108/evb_rv1108.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c index 733f29376e..5d622c3737 100644 --- a/board/rockchip/evb_rv1108/evb_rv1108.c +++ b/board/rockchip/evb_rv1108/evb_rv1108.c @@ -5,8 +5,9 @@ */ #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> @@ -14,7 +15,6 @@ DECLARE_GLOBAL_DATA_PTR; int mach_cpu_init(void) { - int node; struct rv1108_grf *grf; enum { GPIO3C3_SHIFT = 6, @@ -34,8 +34,7 @@ int mach_cpu_init(void) 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, |