summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@chromium.org>2015-05-28 13:12:43 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-09 01:18:15 +0000
commit52ff2e4c8d7e7e10088461980d6b381647874d4d (patch)
treef19d48713c42281a83af2fb1fb3dde0588b07041
parentaaff3610116bab246906ad929b5f0179cbe09577 (diff)
downloadchrome-ec-52ff2e4c8d7e7e10088461980d6b381647874d4d.tar.gz
flash_ec: remove redundant code from lm4x_cmds.tcl
All boards in ToT have the same RO configuration. Boards which define CONFIG_FLASH_PSTATE_BANK have pstate following RO. BRANCH=none BUG=chrome-os-partner:22990 TEST="git grep" to see that none of the affected functions are called. Change-Id: Ie1eb9a726e1fa157852b0c55d474c9b4587c41f0 Signed-off-by: Myles Watson <mylesgw@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273908 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--util/openocd/lm4x_cmds.tcl48
1 files changed, 16 insertions, 32 deletions
diff --git a/util/openocd/lm4x_cmds.tcl b/util/openocd/lm4x_cmds.tcl
index 601d03e445..ffcda0464a 100644
--- a/util/openocd/lm4x_cmds.tcl
+++ b/util/openocd/lm4x_cmds.tcl
@@ -7,47 +7,25 @@
# Program internal flash
proc flash_lm4 {path offset} {
- #set firstsect [expr {$offset / 1024}];
- #set lastsect [expr {($offset + $size) / 1024 - 1}];
reset halt;
flash write_image erase $path $offset;
reset
}
-proc flash_auron { } {
- flash_lm4 ../../../build/auron/ec.bin 0
+proc flash_lm4_board {board} {
+ flash_lm4 ../../../build/$board/ec.bin 0
}
-proc flash_bds { } {
- flash_lm4 ../../../build/bds/ec.bin 0
+proc flash_lm4_ro {board} {
+ flash_lm4 ../../../build/$board/ec.RO.flat 0
}
-proc flash_rambi { } {
- flash_lm4 ../../../build/rambi/ec.bin 0
+proc flash_lm4_rw {board} {
+ flash_lm4 ../../../build/$board/ec.RW.bin 131072
}
-proc flash_samus { } {
- flash_lm4 ../../../build/samus/ec.bin 0
-}
-
-proc flash_samus_ro { } {
- flash_lm4 ../../../build/samus/ec.RO.flat 0
-}
-
-proc flash_samus_rw { } {
- flash_lm4 ../../../build/samus/ec.RW.bin 131072
-}
-
-proc flash_rambi_ro { } {
- flash_lm4 ../../../build/rambi/ec.RO.flat 0
-}
-
-proc flash_rambi_rw { } {
- flash_lm4 ../../../build/rambi/ec.RW.bin 131072
-}
-
-# Auron have pstate following RO
-proc unprotect_auron { } {
+# Boards with CONFIG_FLASH_PSTATE_BANK have pstate following RO
+proc unprotect_pstate { } {
reset halt
flash erase_sector 0 126 127
reset
@@ -62,6 +40,12 @@ proc ramboot_lm4 {path} {
resume
}
-proc ramboot_bds { } {
- ramboot_lm4 ../../../build/bds/ec.RO.flat
+proc ramboot_lm4_board {board} {
+ ramboot_lm4 ../../../build/$board/ec.RO.flat
+}
+
+proc flash_emerged_board {board} {
+ set firmware_image ../../../../../../chroot/build/$board/firmware/ec.bin
+
+ flash_lm4 $firmware_image 0
}