summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Cho <joy.cho@hardkernel.com>2021-01-28 05:36:23 +0300
committerJoy Cho <joy.cho@hardkernel.com>2021-03-03 03:06:42 +0300
commit0e26e35cb18a80005b7de45c95858c86a2f7f41e (patch)
tree516cb717d4068d4b963951b1837e7aa29763ffc9
parente9d7bedabe68cec4d5924ee11de510399577ece2 (diff)
downloadu-boot-odroidgoA-v2017.09.tar.xz
ODROID-GOA: Adjust boot mode flag and charge animation conditionodroidgoA-v2017.09
COLD booting : run charge animation by default WARM booting like reboot : skip charge animation and proceed booting Change-Id: Ic513a93a7f4fe713e14eb3d2e6ab7de5c89c38ac
-rw-r--r--common/boot_rkimg.c4
-rw-r--r--drivers/power/charge_animation.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/common/boot_rkimg.c b/common/boot_rkimg.c
index 15eaf7a8b2..d08ef506d0 100644
--- a/common/boot_rkimg.c
+++ b/common/boot_rkimg.c
@@ -381,10 +381,13 @@ int rockchip_get_boot_mode(void)
struct blk_desc *dev_desc;
disk_partition_t part_info;
uint32_t reg_boot_mode;
+#ifndef CONFIG_PLATFORM_ODROID_GOADV
char *env_reboot_mode;
+#endif
int clear_boot_reg = 0;
int ret, cnt;
+#ifndef CONFIG_PLATFORM_ODROID_GOADV
/*
* Here, we mainly check for:
* In rockchip_dnl_mode_check(), that recovery key is pressed without
@@ -403,6 +406,7 @@ int rockchip_get_boot_mode(void)
if (boot_mode != -1)
return boot_mode;
+#endif
dev_desc = rockchip_get_bootdev();
if (!dev_desc) {
diff --git a/drivers/power/charge_animation.c b/drivers/power/charge_animation.c
index 5ed7bd8e34..95e8064246 100644
--- a/drivers/power/charge_animation.c
+++ b/drivers/power/charge_animation.c
@@ -589,6 +589,13 @@ static int charge_animation_show(struct udevice *dev)
/* Not valid charge mode, exit */
#ifdef CONFIG_RKIMG_BOOTLOADER
boot_mode = rockchip_get_boot_mode();
+#ifdef CONFIG_PLATFORM_ODROID_GOADV
+ /* reboot flag is normal. */
+ if (boot_mode == BOOT_MODE_NORMAL) {
+ printf("Exit charge: due to boot mode=%d\n", boot_mode);
+ return 0;
+ }
+#else
if ((boot_mode != BOOT_MODE_CHARGING) &&
(boot_mode != BOOT_MODE_UNDEFINE)) {
printf("Exit charge: due to boot mode=%d\n", boot_mode);
@@ -596,6 +603,7 @@ static int charge_animation_show(struct udevice *dev)
/* return 0; */
}
#endif
+#endif
/* Not charger online, exit */
charging = fg_charger_get_chrg_online(dev);