summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/rk322x-board.c
diff options
context:
space:
mode:
authorAndy Yan <andy.yan@rock-chips.com>2017-10-11 15:00:16 +0800
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-11-21 23:57:23 +0100
commite3067793c3109744a445f692395b9a3bac778e48 (patch)
tree1dc5a165f762ecec55797c3f26efa085066e3661 /arch/arm/mach-rockchip/rk322x-board.c
parent11f12c17d72499292f6e219ebbf8062faedcc5bb (diff)
rockchip: make boot_mode related codes reused across all platforms
setup_boot_mode function use the same logic but different mode register address across all the rockchip platforms, so it's better to make this function reused across all the platforms, and let the mode register address setting from the config file. Signed-off-by: Andy Yan <andy.yan@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-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.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c
index d44311457a..e71847de87 100644
--- a/arch/arm/mach-rockchip/rk322x-board.c
+++ b/arch/arm/mach-rockchip/rk322x-board.c
@@ -16,30 +16,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define GRF_BASE 0x11000000
-
-static void setup_boot_mode(void)
-{
- struct rk322x_grf *const grf = (void *)GRF_BASE;
- int boot_mode = readl(&grf->os_reg[0]);
-
- debug("boot mode %x.\n", boot_mode);
-
- /* Clear boot mode */
- writel(BOOT_NORMAL, &grf->os_reg[0]);
-
- switch (boot_mode) {
- case BOOT_FASTBOOT:
- printf("enter fastboot!\n");
- env_set("preboot", "setenv preboot; fastboot usb0");
- break;
- case BOOT_UMS:
- printf("enter UMS!\n");
- env_set("preboot", "setenv preboot; ums mmc 0");
- break;
- }
-}
-
__weak int rk_board_late_init(void)
{
return 0;