[openfirmware] [commit] r2523 - cpu/arm/olpc/1.75 dev/olpc/spiflash

repository service svn at openfirmware.info
Tue Sep 20 08:00:09 CEST 2011


Author: quozl
Date: Tue Sep 20 08:00:08 2011
New Revision: 2523
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2523

Log:
OLPC XO-1.75 - hold EC in reset while flashing OpenFirmware SPI FLASH, so that power button does not interrupt write.  #11215.

Modified:
   cpu/arm/olpc/1.75/devices.fth
   cpu/arm/olpc/1.75/fw-version.fth
   dev/olpc/spiflash/spiui.fth

Modified: cpu/arm/olpc/1.75/devices.fth
==============================================================================
--- cpu/arm/olpc/1.75/devices.fth	Sat Sep 17 00:59:16 2011	(r2522)
+++ cpu/arm/olpc/1.75/devices.fth	Tue Sep 20 08:00:08 2011	(r2523)
@@ -182,16 +182,22 @@
 : hdd-led-on      ( -- )  d# 10 gpio-set  ;
 : hdd-led-toggle  ( -- )  d# 10 gpio-pin@  if  hdd-led-off  else  hdd-led-on  then  ;
 
-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"  ;
-' ofw-fw-filename$ to fw-filename$
-
 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]
+
 fload ${BP}/cpu/arm/olpc/1.75/ecflash.fth
 
+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"  ;
+' ofw-fw-filename$ to fw-filename$
+
 0 0  " d420b000"  " /" begin-package
    " display" name
    fload ${BP}/cpu/arm/olpc/1.75/lcdcfg.fth

Modified: cpu/arm/olpc/1.75/fw-version.fth
==============================================================================
--- cpu/arm/olpc/1.75/fw-version.fth	Sat Sep 17 00:59:16 2011	(r2522)
+++ cpu/arm/olpc/1.75/fw-version.fth	Tue Sep 20 08:00:08 2011	(r2523)
@@ -1,3 +1,3 @@
 \ The overall firmware revision
 macro: FW_MAJOR B
-macro: FW_MINOR 09
+macro: FW_MINOR 09jg

Modified: dev/olpc/spiflash/spiui.fth
==============================================================================
--- dev/olpc/spiflash/spiui.fth	Sat Sep 17 00:59:16 2011	(r2522)
+++ dev/olpc/spiflash/spiui.fth	Tue Sep 20 08:00:08 2011	(r2523)
@@ -42,12 +42,6 @@
 
 \ Perform a series of sanity checks on the new firmware image.
 
-[ifdef] load-base
-: flash-buf  load-base  ;
-[else]
-/flash buffer: flash-buf
-[then]
-
 0 value file-loaded?
 
 : crc  ( adr len -- crc )  0 crctab  2swap ($crc)  ;
@@ -191,9 +185,23 @@
    ." 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
-   hdd-led-on
    ?file
+   hdd-led-on
+   ignore-power-button
    flash-write-enable
 
    write-firmware
@@ -208,7 +216,7 @@
       flash-write-disable
    else
       .verify-msg
-   then   
+   then
    hdd-led-off
 ;
 



More information about the openfirmware mailing list