2 # Copyright (C) 2013 Imagination Technologies
4 # Programs a MIPS Malta boot flash with a flat binary image.
6 # SPDX-License-Identifier: GPL-2.0+
9 proc flash-boot { binfile } {
10 puts "flash monitor binary $binfile"
12 config CoherencyDuringLoad on
14 if {[endian]=="big"} {
16 flash device sharp_16x32_be;
19 flash device sharp_16x32;
23 flash set 0xBE000000..0xBE0FFFFF
24 flash erase sector 0xbe000000;
25 flash erase sector 0xbe020000;
26 flash erase sector 0xbe040000;
27 flash erase sector 0xbe060000;
28 flash erase sector 0xbe080000;
29 flash erase sector 0xbe0a0000;
30 flash erase sector 0xbe0c0000;
31 flash erase sector 0xbe0e0000;
32 puts "finished erasing boot flash";
34 puts "programming flash, please be patient"
35 load bin 0xbe000000 $binfile size4
38 config CoherencyDuringLoad off
39 puts "finished programming boot flash";