Author: wmb Date: 2007-08-02 12:23:58 +0200 (Thu, 02 Aug 2007) New Revision: 515
Modified: dev/olpc/spiflash/spiui.fth Log: SPI FLASH selftest - OLPC trac 2636 - Workaround a hardware design deficiency by throttling access to the SPI FLASH in the /flash selftest method. If the CPU accesses the SPI FLASH too frequently, the EC apparently can't do its instruction fetches, and the system resets. The workaround is to access the SPI FLASH in 64K chunks, waiting 100 mS between chunks.
Modified: dev/olpc/spiflash/spiui.fth =================================================================== --- dev/olpc/spiflash/spiui.fth 2007-08-02 05:35:04 UTC (rev 514) +++ dev/olpc/spiflash/spiui.fth 2007-08-02 10:23:58 UTC (rev 515) @@ -243,8 +243,17 @@ 0 value rom-va : selftest ( -- error? ) rom-va 0= if rom-pa /flash root-map-in to rom-va then - rom-va flash-buf /flash move
+ \ This is a slower version of "rom-va flash-buf /flash lmove" + \ It works around the problem that continuous CPU access to the + \ SPI FLASH starves the EC of instruction fetch cycles, often + \ causing it to turn off the system. + rom-va flash-buf + /flash 0 do + rom-va i + flash-buf i + h# 1.0000 lmove + d# 100 ms + h# 1.0000 +loop + \ Replace the manufacturing data block with all FF flash-buf mfg-data-offset + /flash-block h# ff fill