tizen: tm1: enter the download mode when usb is connected 06/65706/3 accepted/tizen/mobile/20160715.075447 submit/tizen/20160715.064037
authorJaehoon Chung <jh80.chung@samsung.com>
Tue, 12 Apr 2016 07:40:01 +0000 (16:40 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 12 Apr 2016 08:42:55 +0000 (17:42 +0900)
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 <jh80.chung@samsung.com>
arch/arm/cpu/armv7/sc8830/misc.c
property/cmd_cboot.c

index b7a86e6..07fbd8c 100755 (executable)
@@ -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;
index 7b4260b..968bbfe 100755 (executable)
@@ -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);