[openfirmware] [commit] r2561 - cpu/arm/olpc/1.75 cpu/x86/pc/olpc cpu/x86/pc/olpc/via dev/olpc/spiflash
repository service
svn at openfirmware.info
Sat Oct 1 21:50:52 CEST 2011
Author: wmb
Date: Sat Oct 1 21:50:52 2011
New Revision: 2561
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2561
Log:
OLPC - fixed build problem for XO-1 and XO-1.5 introduces by recent changes to spiui.fth
Modified:
cpu/arm/olpc/1.75/devices.fth
cpu/x86/pc/olpc/devices.fth
cpu/x86/pc/olpc/via/devices.fth
dev/olpc/spiflash/spiui.fth
Modified: cpu/arm/olpc/1.75/devices.fth
==============================================================================
--- cpu/arm/olpc/1.75/devices.fth Sat Oct 1 21:49:30 2011 (r2560)
+++ cpu/arm/olpc/1.75/devices.fth Sat Oct 1 21:50:52 2011 (r2561)
@@ -128,8 +128,6 @@
fload ${BP}/dev/olpc/spiflash/spiflash.fth \ SPI FLASH programming
-: ignore-power-button ; \ XXX implement me
-
fload ${BP}/cpu/arm/mmp2/sspspi.fth \ Synchronous Serial Port SPI interface
\ Create the top-level device node to access the entire boot FLASH device
@@ -185,14 +183,29 @@
fload ${BP}/cpu/arm/olpc/1.75/bbedi.fth
fload ${BP}/cpu/arm/olpc/1.75/edi.fth
-[ifdef] load-base
-: flash-buf load-base ;
-[else]
-/flash buffer: flash-buf
-[then]
+load-base constant flash-buf
fload ${BP}/cpu/arm/olpc/1.75/ecflash.fth
+: ec-spi-reprogrammed ( -- )
+ edi-spi-start
+ set-ec-reboot
+ unreset-8051
+;
+
+: ignore-power-button ( -- )
+ edi-spi-start
+ ['] reset-8051 catch if reset-8051 then
+ use-ssp-spi
+ ['] ec-spi-reprogrammed to spi-reprogrammed
+;
+: flash-vulnerable( ( -- )
+ hdd-led-on
+;
+: )flash-vulnerable ( -- )
+ hdd-led-off
+;
+
fload ${BP}/dev/olpc/spiflash/spiui.fth \ User interface for SPI FLASH programming
\ fload ${BP}/dev/olpc/spiflash/recover.fth \ XO-to-XO SPI FLASH recovery
: ofw-fw-filename$ " disk:\boot\olpc.rom" ;
Modified: cpu/x86/pc/olpc/devices.fth
==============================================================================
--- cpu/x86/pc/olpc/devices.fth Sat Oct 1 21:49:30 2011 (r2560)
+++ cpu/x86/pc/olpc/devices.fth Sat Oct 1 21:50:52 2011 (r2561)
@@ -317,6 +317,10 @@
fload ${BP}/dev/olpc/kb3700/battery.fth \ Battery status reports
+load-base constant flash-buf
+: flash-vulnerable( ( -- ) ignore-power-button ;
+: )flash-vulnerable ( -- ) ;
+
fload ${BP}/dev/olpc/spiflash/spiui.fth \ User interface for SPI FLASH programming
fload ${BP}/dev/olpc/spiflash/recover.fth \ XO-to-XO SPI FLASH recovery
: ofw-fw-filename$ " disk:\boot\olpc.rom" ;
Modified: cpu/x86/pc/olpc/via/devices.fth
==============================================================================
--- cpu/x86/pc/olpc/via/devices.fth Sat Oct 1 21:49:30 2011 (r2560)
+++ cpu/x86/pc/olpc/via/devices.fth Sat Oct 1 21:50:52 2011 (r2561)
@@ -288,6 +288,15 @@
fload ${BP}/dev/olpc/kb3700/battery.fth \ Battery status reports
+load-base constant flash-buf
+: flash-vulnerable( ( -- )
+ hdd-led-on
+ ignore-power-button
+;
+: )flash-vulnerable ( -- )
+ hdd-led-off
+;
+
fload ${BP}/dev/olpc/spiflash/spiui.fth \ User interface for SPI FLASH programming
fload ${BP}/cpu/x86/pc/olpc/via/recover.fth \ XO-to-XO SPI FLASH recovery
Modified: dev/olpc/spiflash/spiui.fth
==============================================================================
--- dev/olpc/spiflash/spiui.fth Sat Oct 1 21:49:30 2011 (r2560)
+++ dev/olpc/spiflash/spiui.fth Sat Oct 1 21:50:52 2011 (r2561)
@@ -42,6 +42,10 @@
\ Perform a series of sanity checks on the new firmware image.
+[ifndef] flash-buf
+/flash buffer: flash-buf
+[then]
+
0 value file-loaded?
: crc ( adr len -- crc ) 0 crctab 2swap ($crc) ;
@@ -185,23 +189,9 @@
." or about 5 minutes if the host is running OFW." cr
;
-: ec-spi-reprogrammed ( -- )
- edi-spi-start
- set-ec-reboot
- unreset-8051
-;
-
-: ignore-power-button ( -- )
- edi-spi-start
- ['] reset-8051 catch if reset-8051 then
- use-ssp-spi
- ['] ec-spi-reprogrammed to spi-reprogrammed
-;
-
: reflash ( -- ) \ Flash from data already in memory
?file
- hdd-led-on
- ignore-power-button
+ flash-vulnerable(
flash-write-enable
write-firmware
@@ -217,7 +207,7 @@
else
.verify-msg
then
- hdd-led-off
+ )flash-vulnerable
;
defer fw-filename$ ' null$ to fw-filename$
More information about the openfirmware
mailing list