From 1da883a6bc06648987125be7c29ed248d20c4a49 Mon Sep 17 00:00:00 2001 From: Todd Broch Date: Wed, 13 Feb 2013 14:49:22 -0800 Subject: Unify dut-control command. Previous CL included --port but I neglected one invocation. Better to just unify how dut-control is called with a global. BRANCH=none BUG=none TEST=manual, ./util/flash_ec --board spring - device connected to servod @ port 9999 is successfully flashed ./util/flash_ec --board spring --port 9902 - device connected to servod @ port 9902 is successfully flashed Change-Id: I9cf57d0ddd94cf825d3015f9768effffca94eaf2 Signed-off-by: Todd Broch Reviewed-on: https://gerrit.chromium.org/gerrit/43222 Reviewed-by: Vincent Palatin --- util/flash_ec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util/flash_ec b/util/flash_ec index 192b3efee2..3fbe203e27 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -75,10 +75,12 @@ function ec_image() { die "no EC image found : build one or specify one." } +DUT_CONTROL_CMD="dut-control --port=${FLAGS_port}" + # Find the EC UART on the servo v2 function ec_uart() { SERVOD_FAIL="Cannot communicate with servo. is servod running ?" - (dut-control --port=${FLAGS_port} uart1_pty || \ + ($DUT_CONTROL_CMD uart1_pty || \ die "${SERVOD_FAIL}") | cut -d: -f2 } @@ -88,11 +90,11 @@ SERVO_VARS="uart1_en uart1_parity uart1_baudrate \ jtag_buf_on_flex_en jtag_buf_en spi1_vref" function dut_control() { - dut-control --port=${FLAGS_port} "$1" >/dev/null + $DUT_CONTROL_CMD "$1" >/dev/null } function servo_save() { - dut-control ${SERVO_VARS} + $DUT_CONTROL_CMD ${SERVO_VARS} } function servo_restore() { -- cgit v1.2.1