Author: wmb Date: Fri Sep 2 22:23:04 2011 New Revision: 2502 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2502
Log: OLPC XO-1.75 - when reprogramming the EC FLASH, skip the page that contains the EC configuration flags.
Modified: cpu/arm/olpc/1.75/ecflash.fth cpu/arm/olpc/1.75/edi.fth
Modified: cpu/arm/olpc/1.75/ecflash.fth ============================================================================== --- cpu/arm/olpc/1.75/ecflash.fth Fri Sep 2 21:22:45 2011 (r2501) +++ cpu/arm/olpc/1.75/ecflash.fth Fri Sep 2 22:23:04 2011 (r2502) @@ -46,7 +46,6 @@ load-base /ec-flash + /ec-flash 0 " read-flash" $call-ec [else] use-edi-spi edi-open - ." Erasing ..." erase-chip cr ." Writing ..." load-base /ec-flash 0 edi-program-flash cr ." Verifying ..." load-base /ec-flash + /ec-flash 0 edi-read-flash
Modified: cpu/arm/olpc/1.75/edi.fth ============================================================================== --- cpu/arm/olpc/1.75/edi.fth Fri Sep 2 21:22:45 2011 (r2501) +++ cpu/arm/olpc/1.75/edi.fth Fri Sep 2 22:23:04 2011 (r2502) @@ -131,13 +131,17 @@ h# 70 flash-cmd ( ) wait-flash-busy ( ) ; +h# 7e80 constant ec-flags-offset : edi-program-flash ( adr len offset -- ) - cr - swap 0 ?do - (cr i . - over i + over i + edi-program-page ( adr offset ) - /flash-page +loop ( adr offset ) - 2drop ( ) + cr ( adr len offset ) + swap 0 ?do ( adr offset ) + (cr i . ( adr offset ) + dup i + ec-flags-offset <> if ( adr offset ) + dup i + erase-page ( adr offset ) + over i + over i + edi-program-page ( adr offset ) + then ( adr offset ) + /flash-page +loop ( adr offset ) + 2drop ( ) ; : edi-read-flash ( adr len offset -- ) over 0= if 3drop exit then ( adr len offset )