summaryrefslogtreecommitdiff
path: root/util/flash_ec
diff options
context:
space:
mode:
Diffstat (limited to 'util/flash_ec')
-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() {