summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2013-02-13 14:49:22 -0800
committerChromeBot <chrome-bot@google.com>2013-02-13 19:46:11 -0800
commit1da883a6bc06648987125be7c29ed248d20c4a49 (patch)
tree42bb6eec14b66da32a859129cac255ab5bdbbf4a
parent6fd61fa6f17eb06041b0492766d59c67ec4b961d (diff)
downloadchrome-ec-1da883a6bc06648987125be7c29ed248d20c4a49.tar.gz
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 <tbroch@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/43222 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rwxr-xr-xutil/flash_ec8
1 files 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() {