From ff5e62331554a2fcd25df4b8cceba938feb33975 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Mon, 12 Jan 2015 12:41:27 -0800 Subject: zinger: shrink text strings Save a hundred bytes by making the debug messages less verbose ... Signed-off-by: Vincent Palatin BRANCH=samus BUG=none TEST=make buildall Original-Change-Id: I796bc2badc8f5756c1e44fceb5143e9e123d26b5 Reviewed-on: https://chromium-review.googlesource.com/240581 Reviewed-by: Alec Berg Trybot-Ready: Vincent Palatin Tested-by: Vincent Palatin Commit-Queue: Vincent Palatin (cherry picked from commit f52ed342b952ecc4f342aadec278bc6e4372067e) Reviewed-on: https://chromium-review.googlesource.com/240832 Reviewed-by: Vincent Palatin (cherry picked from commit b5e1d391c8f45844bc625f9e216247c2d5b0482b) Signed-off-by: Todd Broch Change-Id: Icf04a9d23db893c37a80c91dadd965018c4d9cb6 Reviewed-on: https://chromium-review.googlesource.com/244220 Reviewed-by: Alec Berg Tested-by: Todd Broch Commit-Queue: Todd Broch --- board/zinger/board.c | 6 +++--- board/zinger/usb_pd_policy.c | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/board/zinger/board.c b/board/zinger/board.c index 675aaa470f..cf703296a7 100644 --- a/board/zinger/board.c +++ b/board/zinger/board.c @@ -64,7 +64,7 @@ static int check_rw_valid(void *rw_hash) good = rsa_verify(&pkey, (void *)rw_sig, rw_hash, rsa_workbuf); if (!good) { - debug_printf("RSA verify FAILED\n"); + debug_printf("RSA FAILED\n"); return 0; } @@ -78,7 +78,7 @@ int main(void) void *rw_hash; hardware_init(); - debug_printf("Power supply started ... %s\n", + debug_printf("%s started\n", is_ro_mode() ? "RO" : "RW"); /* the RO partition protection is not enabled : do it */ @@ -100,7 +100,7 @@ int main(void) /* background loop for PD events */ pd_task(); - debug_printf("background loop exited !\n"); + debug_printf("EXIT!\n"); /* we should never reach that point */ system_reset(0); return 0; diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c index 50661a1c57..2e658428d9 100644 --- a/board/zinger/usb_pd_policy.c +++ b/board/zinger/usb_pd_policy.c @@ -322,7 +322,7 @@ int pd_board_checks(void) /* If output is disabled for long enough, then hibernate */ if (!pd_is_connected(0) && hib_to_ready) { if (get_time().val >= hib_to.val) { - debug_printf("hibernate\n"); + debug_printf("hib\n"); __enter_hibernate(0, 0); } } else { @@ -339,7 +339,7 @@ int pd_board_checks(void) vbus_amp = adc_read_channel(ADC_CH_A_SENSE); if (fault == FAULT_FAST_OCP) { - debug_printf("Fast OverCurrent\n"); + debug_printf("Fast OCP\n"); fault = FAULT_OCP; /* reset over-current after 1 second */ fault_deadline.val = get_time().val + OCP_TIMEOUT; @@ -354,7 +354,7 @@ int pd_board_checks(void) break; /* trigger the slow OCP iff all 4 samples are above the max */ if (count == 3) { - debug_printf("OverCurrent : %d mA\n", + debug_printf("OCP %d mA\n", vbus_amp * VDDA_MV / CURR_GAIN * 1000 / R_SENSE / ADC_SCALE); fault = FAULT_OCP; @@ -384,7 +384,7 @@ int pd_board_checks(void) if ((output_is_enabled() && (vbus_volt > voltages[ovp_idx].ovp)) || (fault && (vbus_volt > voltages[ovp_idx].ovp_rec))) { if (!fault) - debug_printf("OverVoltage : %d mV\n", + debug_printf("OVP %d mV\n", ADC_TO_VOLT_MV(vbus_volt)); fault = FAULT_OVP; /* no timeout */ @@ -402,7 +402,7 @@ int pd_board_checks(void) discharge_disable(); /* enable over-current monitoring */ adc_enable_watchdog(ADC_CH_A_SENSE, MAX_CURRENT_FAST, 0); - debug_printf("Discharge failure : %d mV\n", + debug_printf("Disch FAIL %d mV\n", ADC_TO_VOLT_MV(vbus_volt)); fault = FAULT_DISCHARGE; /* reset it after 1 second */ @@ -559,7 +559,6 @@ int pd_custom_vdm(int port, int cnt, uint32_t *payload, } } - debug_printf("%T] DONE\n"); /* respond (positively) to the request */ payload[0] |= VDO_SRC_RESPONDER; -- cgit v1.2.1