From: Jaehoon Chung Date: Tue, 23 Feb 2016 08:07:56 +0000 (+0900) Subject: tizen: tm1: provide the reboot download X-Git-Tag: accepted/tizen/mobile/20160412.063948^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=5a19ac45bc14e4bc272e7ae4a0cb080d2b380b88;p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git tizen: tm1: provide the reboot download Provide the reboot download mode for thor. Change-Id: Ie5b3cc5a3d0a56c74537300258461011b6219d76 Signed-off-by: Jaehoon Chung --- diff --git a/arch/arm/cpu/armv7/sc8830/misc.c b/arch/arm/cpu/armv7/sc8830/misc.c index 983c99d..b7a86e6 100755 --- a/arch/arm/cpu/armv7/sc8830/misc.c +++ b/arch/arm/cpu/armv7/sc8830/misc.c @@ -423,6 +423,23 @@ void pmic_init(void) #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() { diff --git a/include/configs/tizen_tm1.h b/include/configs/tizen_tm1.h index 70f7019..f4fadaa 100644 --- a/include/configs/tizen_tm1.h +++ b/include/configs/tizen_tm1.h @@ -323,6 +323,9 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_SYS_LONGHELP +/* INFORM3 */ +#define INFORM3 0xf90 + /* support OS choose */ #undef CONFIG_BOOTM_NETBSD #undef CONFIG_BOOTM_RTEMS diff --git a/property/cmd_cboot.c b/property/cmd_cboot.c index 1e398fb..7b4260b 100755 --- a/property/cmd_cboot.c +++ b/property/cmd_cboot.c @@ -228,6 +228,10 @@ boot_mode_enum_type get_mode_from_gpio_extend(void){ } } +#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; @@ -280,8 +284,14 @@ 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) + 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