From 9bcdc82293248f6bb5e9f864ef22b56edf79acc1 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 19 Jan 2010 12:20:46 +0900 Subject: [PATCH] s5pc11x: CQ H0100076547 Defect: Bootup with TA on After the charging animation is done, press any key to boot. --- board/samsung/universal/universal.c | 5 ++++- cpu/arm_cortexa8/s5pc1xx/sleep.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index 2b4865f..19d92dc 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -1027,6 +1027,7 @@ static void check_micro_usb(int intr) { unsigned char addr; unsigned char val[2]; + static int started_charging_once = 0; if (cpu_is_s5pc100()) return; @@ -1064,8 +1065,10 @@ static void check_micro_usb(int intr) * If USB, use default 475mA * If Charger, use 600mA and go to charge mode */ - if (val[0] & FSA_DEDICATED_CHARGER) + if ((val[0] & FSA_DEDICATED_CHARGER) && !started_charging_once) { + started_charging_once = 1; into_charge_mode(); + } /* If Factory Mode is Boot ON-USB, go to download mode */ i2c_read(addr, 0x07, 1, val, 1); diff --git a/cpu/arm_cortexa8/s5pc1xx/sleep.c b/cpu/arm_cortexa8/s5pc1xx/sleep.c index 47ec48b..dce9075 100644 --- a/cpu/arm_cortexa8/s5pc1xx/sleep.c +++ b/cpu/arm_cortexa8/s5pc1xx/sleep.c @@ -472,8 +472,17 @@ int do_sleep(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int mode = SLEEP_WFI; - if (argc >= 2) - mode = SLEEP_REGISTER; + if (argc >= 2) { + int arg = argv[1][0]-'0'; + + switch(arg) { + case 0: + break; + case 1: + mode = SLEEP_REGISTER; + break; + } + } if (cpu_is_s5pc110()) return s5pc110_sleep(mode); @@ -485,6 +494,6 @@ int do_sleep(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) U_BOOT_CMD( sleep, CONFIG_SYS_MAXARGS, 1, do_sleep, "S5PC110 sleep", - "- Sleep with SLEEP_WFI mode\n" + "sleep 0 - Sleep with SLEEP_WFI mode\n" "sleep 1 - Sleep with SLEEP_REGISTER mode\n" ); -- 2.7.4