1 # SPDX-License-Identifier: GPL-2.0+
3 # Copyright (C) 2013 Imagination Technologies
5 # Programs a MIPS Malta boot flash with a flat binary image.
7 proc flash-boot { binfile } {
8 puts "flash monitor binary $binfile"
10 config CoherencyDuringLoad on
12 if {[endian]=="big"} {
14 flash device sharp_16x32_be;
17 flash device sharp_16x32;
21 flash set 0xBE000000..0xBE0FFFFF
22 flash erase sector 0xbe000000;
23 flash erase sector 0xbe020000;
24 flash erase sector 0xbe040000;
25 flash erase sector 0xbe060000;
26 flash erase sector 0xbe080000;
27 flash erase sector 0xbe0a0000;
28 flash erase sector 0xbe0c0000;
29 flash erase sector 0xbe0e0000;
30 puts "finished erasing boot flash";
32 puts "programming flash, please be patient"
33 load bin 0xbe000000 $binfile size4
36 config CoherencyDuringLoad off
37 puts "finished programming boot flash";