[U-Boot] [PATCH 3/4] rockchip: add BOOT_LOADER support for boot mode

Kever Yang kever.yang at rock-chips.com
Fri Aug 4 08:41:19 UTC 2017


Rockchip using rockusb for flash emmc via USB, people
use 'reboot loader' in kernel and then want to get a rockusb
device in bootloader for firmware update.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
---

 arch/arm/mach-rockchip/rk3036-board.c | 4 ++++
 arch/arm/mach-rockchip/rk322x-board.c | 4 ++++
 arch/arm/mach-rockchip/rk3288-board.c | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/arch/arm/mach-rockchip/rk3036-board.c b/arch/arm/mach-rockchip/rk3036-board.c
index bf2b268..b38883e 100644
--- a/arch/arm/mach-rockchip/rk3036-board.c
+++ b/arch/arm/mach-rockchip/rk3036-board.c
@@ -40,6 +40,10 @@ static void setup_boot_mode(void)
 		printf("enter UMS!\n");
 		setenv("preboot", "setenv preboot; ums mmc 0");
 		break;
+	case BOOT_LOADER:
+		printf("enter Rockusb!\n");
+		setenv("preboot", "setenv preboot; rockusb 0 mmc 0");
+		break;
 	}
 }
 
diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c
index 41ce12d..9768ea7 100644
--- a/arch/arm/mach-rockchip/rk322x-board.c
+++ b/arch/arm/mach-rockchip/rk322x-board.c
@@ -36,6 +36,10 @@ static void setup_boot_mode(void)
 		printf("enter UMS!\n");
 		setenv("preboot", "setenv preboot; ums mmc 0");
 		break;
+	case BOOT_LOADER:
+		printf("enter Rockusb!\n");
+		setenv("preboot", "setenv preboot; rockusb 0 mmc 0");
+		break;
 	}
 }
 
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index c9d16a9..48a891d 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -44,6 +44,10 @@ static void setup_boot_mode(void)
 		setenv("preboot", "setenv preboot; if mmc dev 0;"
 		       "then ums mmc 0; else ums mmc 1;fi");
 		break;
+	case BOOT_LOADER:
+		printf("enter Rockusb!\n");
+		setenv("preboot", "setenv preboot; rockusb 0 mmc 0");
+		break;
 	}
 }
 
-- 
1.9.1



More information about the U-Boot mailing list