diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2017-08-09 11:28:03 (GMT) |
---|---|---|
committer | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2017-09-18 18:40:32 (GMT) |
commit | c964a0dcae5c4af334881d7286ec0222640b6a17 (patch) | |
tree | 259e7cf75aff1c4b6422f882f2485af03216a24e /arch/arm/mach-rockchip/rk322x-board.c | |
parent | 578ab33eabe8fe8240b2947c4ebedf418202f365 (diff) | |
download | u-boot-c964a0dcae5c4af334881d7286ec0222640b6a17.tar.xz |
rockchip: rk322x: enable fastboot to set boot mode tag
To support fastboot "fastboot reboot-bootloader" cmd.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'arch/arm/mach-rockchip/rk322x-board.c')
-rw-r--r-- | arch/arm/mach-rockchip/rk322x-board.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c index c0ac2e9..6387555 100644 --- a/arch/arm/mach-rockchip/rk322x-board.c +++ b/arch/arm/mach-rockchip/rk322x-board.c @@ -7,6 +7,7 @@ #include <clk.h> #include <dm.h> #include <ram.h> +#include <syscon.h> #include <asm/io.h> #include <asm/arch/clock.h> #include <asm/arch/periph.h> @@ -136,3 +137,17 @@ int board_usb_cleanup(int index, enum usb_init_type init) return 0; } #endif + +#if defined(CONFIG_USB_FUNCTION_FASTBOOT) +int fb_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]); + + return 0; +} +#endif |