Provide the reboot download mode for thor.
Change-Id: Ie5b3cc5a3d0a56c74537300258461011b6219d76
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
#endif
}
+#ifdef CONFIG_TIZEN
+#define REBOOT_MODE_MASK (0xFFFFFFF0)
+#define REBOOT_MODE_PREFIX (0x12345670)
+#define REBOOT_THOR_DOWNLOAD (0x1)
+int tizen_reboot_check(void)
+{
+ int inform3 = readl(INFORM3);
+
+ if ((inform3 & REBOOT_MODE_MASK) == REBOOT_MODE_PREFIX) {
+ if ((inform3 & 0xf) == REBOOT_THOR_DOWNLOAD)
+ return 1;
+ }
+
+ return 0;
+}
+#endif
+
#define REG32(x) (*((volatile uint32 *)(x)))
void gpu_clk_auto_gate_disable()
{
#define CONFIG_CMDLINE_EDITING
#define CONFIG_SYS_LONGHELP
+/* INFORM3 */
+#define INFORM3 0xf90
+
/* support OS choose */
#undef CONFIG_BOOTM_NETBSD
#undef CONFIG_BOOTM_RTEMS
}
}
+#ifdef CONFIG_TIZEN
+extern int tizen_reboot_check(void);
+#endif
+
int do_cboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
volatile int i;
DBG("do_cboot:boot mode is %d\n",bootmode);
#ifdef CONFIG_TIZEN
- if (bootmode == CMD_NONE)
+ 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);
+ }
+
+ }
#endif
#ifdef CONFIG_LCD_LOGO