From: Inha Song Date: Mon, 4 Nov 2013 02:02:33 +0000 (+0900) Subject: samsung: boot inform: add boot_inform_clear() to reset inform registers X-Git-Tag: accepted/tizen/generic/20140310.101015~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=245f5aef185e72d46bedccfcacc549f84dcd4e47;p=kernel%2Fu-boot.git samsung: boot inform: add boot_inform_clear() to reset inform registers Changes: - define boot_inform_clear() in board/samsung/common/inform.c - gadget thor: call boot_infor_clear() on RQT_CMD_REBOOT Change-Id: I0c41734828718fe9c1e0aa59c44968a0560fdf78 Signed-off-by: Inha Song Signed-off-by: Przemyslaw Marczak --- diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile index 7d2bb8c..52ccc84 100644 --- a/board/samsung/common/Makefile +++ b/board/samsung/common/Makefile @@ -4,7 +4,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # - +obj-$(CONFIG_BOOT_INFORM) = inform.o obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o obj-$(CONFIG_THOR_FUNCTION) += thor.o obj-$(CONFIG_CMD_USB_MASS_STORAGE) += ums.o diff --git a/board/samsung/common/inform.c b/board/samsung/common/inform.c new file mode 100644 index 0000000..4754e0d --- /dev/null +++ b/board/samsung/common/inform.c @@ -0,0 +1,17 @@ +#include +#include + +#define CONFIG_NORMAL_INFORM 0x12345678 + +void boot_inform_clear(void) +{ + struct exynos4_power *power = + (struct exynos4_power *)samsung_get_base_power(); + + /* clear INFORM3 - reset status */ + writel(0, &power->inform3); + + /* set INFORM2 for normal boot */ + writel(CONFIG_NORMAL_INFORM, &power->inform2); +} + diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 02a670d..7845118 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -131,6 +131,10 @@ static int process_rqt_cmd(const struct rqt_box *rqt) g_dnl_unregister(); dfu_free_entities(); +#ifdef CONFIG_BOOT_INFORM + /* set normal boot */ + boot_inform_clear(); +#endif run_command("reset", 0); break; case RQT_CMD_POWEROFF: