mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 00:51:29 +00:00
flash_ec: remove unused USB and unprotect options
There is no need for the usb flag, remove it. There is no need for the unprotect flag, remove it. BRANCH=none BUG=chrome-os-partner:22990 TEST=run flash_ec before and after Change-Id: I201bad7f5be63a90bb8168e21baef2c6fa8d85b4 Signed-off-by: Myles Watson <mylesgw@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273904 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
ca5ecf18e4
commit
19cd951027
@@ -1,15 +0,0 @@
|
||||
telnet_port 4444
|
||||
gdb_port 3333
|
||||
gdb_memory_map enable
|
||||
gdb_flash_program enable
|
||||
|
||||
interface ftdi
|
||||
ftdi_vid_pid 0x18d1 0x500d
|
||||
ftdi_layout_init 0x0c08 0x0f1b
|
||||
ftdi_layout_signal nTRST -data 0x0100 -noe 0x0400
|
||||
ftdi_layout_signal nSRST -data 0x0200 -noe 0x0800
|
||||
|
||||
source [find target/stellaris.cfg]
|
||||
source [find lm4x_cmds.tcl]
|
||||
|
||||
adapter_khz 50
|
||||
@@ -50,10 +50,6 @@ BOARDS_LM4=(
|
||||
samus
|
||||
)
|
||||
|
||||
BOARDS_LM4_USB=(
|
||||
samus
|
||||
)
|
||||
|
||||
BOARDS_STM32=(
|
||||
big
|
||||
blaze
|
||||
@@ -106,10 +102,6 @@ DEFINE_integer port 9999 \
|
||||
"Port to communicate to servo on."
|
||||
DEFINE_boolean ro "${FLAGS_FALSE}" \
|
||||
"Write only the read-only partition"
|
||||
DEFINE_boolean unprotect "${FLAGS_FALSE}" \
|
||||
"Clear the protect flag."
|
||||
DEFINE_boolean usb "${FLAGS_FALSE}" \
|
||||
"Use case-closed debugging over USB type-C."
|
||||
|
||||
# Parse command line
|
||||
FLAGS_HELP="usage: $0 [flags]"
|
||||
@@ -314,19 +306,15 @@ function claim_pty() {
|
||||
# helper function for setting up servo v2/3 with openocd paths
|
||||
function setup_openocd() {
|
||||
if [[ -z "${EC_DIR}" ]]; then
|
||||
# check if we're on beaglebone
|
||||
if [[ -e "/usr/bin/lib" ]]; then
|
||||
OCD_CFG="servo_v3.cfg"
|
||||
OCD_PATH="/usr/bin/lib"
|
||||
else
|
||||
die "Cannot locate openocd configs"
|
||||
fi
|
||||
# check if we're on beaglebone
|
||||
if [[ -e "/usr/bin/lib" ]]; then
|
||||
OCD_CFG="servo_v3.cfg"
|
||||
OCD_PATH="/usr/bin/lib"
|
||||
else
|
||||
die "Cannot locate openocd configs"
|
||||
fi
|
||||
else
|
||||
if [ "${FLAGS_usb}" = ${FLAGS_TRUE} ] ; then
|
||||
OCD_CFG="${BOARD}.cfg"
|
||||
else
|
||||
OCD_CFG="servo_v2.cfg"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -337,12 +325,6 @@ function flash_stm32() {
|
||||
die "no stm32mon util found."
|
||||
fi
|
||||
|
||||
if [ "${FLAGS_unprotect}" = ${FLAGS_TRUE} ] ; then
|
||||
# Unprotect exists, but isn't needed because erasing pstate is
|
||||
# implicit in writing the entire image
|
||||
die "--unprotect not supported for this board."
|
||||
fi
|
||||
|
||||
info "Using serial flasher : ${STM32MON}"
|
||||
claim_pty ${EC_UART}
|
||||
|
||||
@@ -396,13 +378,7 @@ function flash_lm4() {
|
||||
OCD_PATH="${EC_DIR}/chip/lm4/openocd"
|
||||
setup_openocd
|
||||
|
||||
OCD_CMDS="init; flash_lm4 ${IMG} ${FLAGS_offset};"
|
||||
if [ "${FLAGS_unprotect}" = ${FLAGS_TRUE} ] ; then
|
||||
# Unprotect exists, but isn't needed because erasing pstate is
|
||||
# implicit in writing the entire image
|
||||
die "--unprotect not supported for this board."
|
||||
fi
|
||||
OCD_CMDS="${OCD_CMDS} shutdown;"
|
||||
OCD_CMDS="init; flash_lm4 ${IMG} ${FLAGS_offset}; shutdown;"
|
||||
|
||||
dut_control jtag_buf_on_flex_en:on
|
||||
dut_control jtag_buf_en:on
|
||||
@@ -415,12 +391,6 @@ function flash_npcx() {
|
||||
OCD_PATH="${EC_DIR}/chip/npcx/openocd"
|
||||
setup_openocd
|
||||
|
||||
if [ "${FLAGS_unprotect}" = ${FLAGS_TRUE} ] ; then
|
||||
# Unprotect exists, but isn't needed because erasing pstate is
|
||||
# implicit in writing the entire image
|
||||
die "--unprotect not supported for this board."
|
||||
fi
|
||||
|
||||
dut_control jtag_buf_on_flex_en:on
|
||||
dut_control jtag_buf_en:on
|
||||
|
||||
@@ -497,11 +467,6 @@ info "${MCU} UART pty : ${EC_UART}"
|
||||
|
||||
save="$(servo_save)"
|
||||
|
||||
if ([ "${FLAGS_usb}" = ${FLAGS_TRUE} ] && \
|
||||
! $(in_array "${BOARDS_LM4_USB[@]}" "${BOARD}")); then
|
||||
die "--usb not supported for this board."
|
||||
fi
|
||||
|
||||
if $(in_array "${BOARDS_LM4[@]}" "${BOARD}"); then
|
||||
flash_lm4
|
||||
elif $(in_array "${BOARDS_STM32[@]}" "${BOARD}"); then
|
||||
|
||||
Reference in New Issue
Block a user