rockchip: convert to use ROCKCHIP_BOOT_MODE_REG for fastboot tag
authorKever Yang <kever.yang@rock-chips.com>
Mon, 22 Jul 2019 12:01:59 +0000 (20:01 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Mon, 29 Jul 2019 02:25:27 +0000 (10:25 +0800)
The fastboot_set_reboot_flag() update a TAG into a register
for next boot, use the common macro for the register so that
we can re-use the function for different SoCs.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/rk3128-board.c
arch/arm/mach-rockchip/rk322x-board.c

index 0945829d0e495ff2a31c7ee98be1de5f43d7ae91..636ee65feeb0bf180dbd2fbc9c8f1033b22fc1e9 100644 (file)
@@ -111,12 +111,9 @@ int board_usb_cleanup(int index, enum usb_init_type init)
 #if CONFIG_IS_ENABLED(FASTBOOT)
 int fastboot_set_reboot_flag(void)
 {
-       struct rk3128_grf *grf;
-
        printf("Setting reboot to fastboot flag ...\n");
-       grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
        /* Set boot mode to fastboot */
-       writel(BOOT_FASTBOOT, &grf->os_reg[0]);
+       writel(BOOT_FASTBOOT, CONFIG_ROCKCHIP_BOOT_MODE_REG);
 
        return 0;
 }
index e7a1e54874d6d01641c730d477e1b03f01283fb8..c0a537616c813d6cc56dee178361323bdad3f64c 100644 (file)
@@ -115,12 +115,9 @@ int board_usb_cleanup(int index, enum usb_init_type init)
 #if CONFIG_IS_ENABLED(FASTBOOT)
 int fastboot_set_reboot_flag(void)
 {
-       struct rk322x_grf *grf;
-
        printf("Setting reboot to fastboot flag ...\n");
-       grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
        /* Set boot mode to fastboot */
-       writel(BOOT_FASTBOOT, &grf->os_reg[0]);
+       writel(BOOT_FASTBOOT, CONFIG_ROCKCHIP_BOOT_MODE_REG);
 
        return 0;
 }