From 271100ea455c82dd3f3002746ec9b7c31df9eaaf Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Tue, 12 Apr 2016 16:40:01 +0900 Subject: [PATCH] tizen: tm1: enter the download mode when usb is connected When usb is connected, bootmode is charge mode. So if enter the reboot download, it needs to check the charger mode. And clear the inform3 register. Change-Id: I5008a615d3cc24c7b579ec8a305131825281b35d Signed-off-by: Jaehoon Chung --- arch/arm/cpu/armv7/sc8830/misc.c | 4 +++- property/cmd_cboot.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv7/sc8830/misc.c b/arch/arm/cpu/armv7/sc8830/misc.c index b7a86e6..07fbd8c 100755 --- a/arch/arm/cpu/armv7/sc8830/misc.c +++ b/arch/arm/cpu/armv7/sc8830/misc.c @@ -432,8 +432,10 @@ int tizen_reboot_check(void) int inform3 = readl(INFORM3); if ((inform3 & REBOOT_MODE_MASK) == REBOOT_MODE_PREFIX) { - if ((inform3 & 0xf) == REBOOT_THOR_DOWNLOAD) + if ((inform3 & 0xf) == REBOOT_THOR_DOWNLOAD) { + writel(0, INFORM3); return 1; + } } return 0; diff --git a/property/cmd_cboot.c b/property/cmd_cboot.c index 7b4260b..968bbfe 100755 --- a/property/cmd_cboot.c +++ b/property/cmd_cboot.c @@ -284,8 +284,9 @@ int do_cboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) DBG("do_cboot:boot mode is %d\n",bootmode); #ifdef CONFIG_TIZEN - if (bootmode == CMD_NONE) { - bootmode = CMD_NORMAL_MODE; + if (bootmode == CMD_NONE || bootmode == CMD_CHARGE_MODE) { + if (bootmode == CMD_NONE) + bootmode = CMD_NORMAL_MODE; if (tizen_reboot_check()) { bootmode = CMD_THOR_MODE; DBG("do_cboot:boot mode is %d\n",bootmode); -- 2.7.4