[openfirmware] [commit] r2400 - cpu/arm/mmp2
repository service
svn at openfirmware.info
Tue Aug 2 05:55:58 CEST 2011
Author: wmb
Date: Tue Aug 2 05:55:57 2011
New Revision: 2400
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2400
Log:
OLPC XO-1.75 - trac #11089 - changed the SSP SPI driver to avoid glitches that confuse the SPI FLASH chip.
Modified:
cpu/arm/mmp2/sspspi.fth
Modified: cpu/arm/mmp2/sspspi.fth
==============================================================================
--- cpu/arm/mmp2/sspspi.fth Tue Aug 2 05:31:12 2011 (r2399)
+++ cpu/arm/mmp2/sspspi.fth Tue Aug 2 05:55:57 2011 (r2400)
@@ -12,8 +12,11 @@
: ssp-sssr ( -- adr ) ssp-base 2 la+ ;
: ssp-ssdr ( -- adr ) ssp-base 4 la+ ;
-
: ssp-spi-start ( -- )
+ \ Avoid reinitializing the device after the first time, as that
+ \ seems to cause glitches that confuse the SPI FLASH chip
+ ssp-sscr1 io@ 0= if exit then
+
h# 07 ssp-sscr0 io!
0 ssp-sscr1 io!
h# 87 ssp-sscr0 io!
@@ -127,16 +130,8 @@
: ssp-spi-out ( b -- ) ssp-spi-out-in drop ;
: ssp-spi-in ( -- b ) 0 ssp-spi-out-in ;
-: safe-spi-start
- ssp-spi-start
- \ The following clears out some glitches so the chip will respond
- \ to the ab-id command.
- 0 spi-cmd spi-cs-off
- 0 spi-cmd spi-cs-off
-;
-
: use-ssp-spi ( -- )
- ['] safe-spi-start to spi-start
+ ['] ssp-spi-start to spi-start
['] ssp-spi-in to spi-in
['] ssp-spi-out to spi-out
['] ssp-spi-cs-on to spi-cs-on
More information about the openfirmware
mailing list