]> Git Repo - J-u-boot.git/blobdiff - board/elgin/elgin_rv1108/elgin_rv1108.c
common: Drop asm/global_data.h from common header
[J-u-boot.git] / board / elgin / elgin_rv1108 / elgin_rv1108.c
index 607667ac63a738e1e5b7c0d57a6b181aca547625..eb7a322d847d4b25fd0f7911bfb5cabd3dfba2c6 100644 (file)
@@ -5,17 +5,19 @@
  */
 
 #include <common.h>
+#include <init.h>
+#include <syscon.h>
+#include <asm/global_data.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>
 #include <asm/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int mach_cpu_init(void)
+int board_early_init_f(void)
 {
-       int node;
        struct rv1108_grf *grf;
        enum {
                GPIO3C3_SHIFT           = 6,
@@ -35,8 +37,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);
 
        /* Elgin board use UART2 m0 for debug*/
        rk_clrsetreg(&grf->gpio2d_iomux,
@@ -50,7 +51,7 @@ int mach_cpu_init(void)
 
 #define MODEM_ENABLE_GPIO 111
 
-int board_early_init_f(void)
+int rk_board_late_init(void)
 {
        gpio_request(MODEM_ENABLE_GPIO, "modem_enable");
        gpio_direction_output(MODEM_ENABLE_GPIO, 0);
This page took 0.024051 seconds and 4 git commands to generate.