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>
This commit is contained in:
Todd Broch
2013-02-13 14:49:22 -08:00
committed by ChromeBot
parent 6fd61fa6f1
commit 1da883a6bc

View File

@@ -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() {