diff options
author | Myles Watson <mylesgw@chromium.org> | 2015-05-28 11:48:58 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-18 17:31:04 +0000 |
commit | 19cd951027b7bd7b726e085c46b8cc9c136b0980 (patch) | |
tree | 84a70a023d36d61d91982189a81569532af6dc77 | |
parent | ca5ecf18e4f67c594f9db699bf36a082b5241f62 (diff) | |
download | chrome-ec-19cd951027b7bd7b726e085c46b8cc9c136b0980.tar.gz |
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>
-rw-r--r-- | chip/lm4/openocd/samus.cfg | 15 | ||||
-rwxr-xr-x | util/flash_ec | 51 |
2 files changed, 8 insertions, 58 deletions
diff --git a/chip/lm4/openocd/samus.cfg b/chip/lm4/openocd/samus.cfg deleted file mode 100644 index e7a6edcda9..0000000000 --- a/chip/lm4/openocd/samus.cfg +++ /dev/null @@ -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 diff --git a/util/flash_ec b/util/flash_ec index 48de8ecc60..c25c347004 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -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 |