Author: wmb Date: Tue Jul 31 07:38:25 2012 New Revision: 3103 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3103
Log: OLPC ARM - SSP SPI driver - sample data from EC on falling edge.
Modified: cpu/arm/mmp2/sspspi.fth
Modified: cpu/arm/mmp2/sspspi.fth ============================================================================== --- cpu/arm/mmp2/sspspi.fth Tue Jul 31 07:09:03 2012 (r3102) +++ cpu/arm/mmp2/sspspi.fth Tue Jul 31 07:38:25 2012 (r3103) @@ -8,15 +8,17 @@
h# 035000 value ssp-base \ SSP1 : ssp-sscr0 ( -- adr ) ssp-base ; -: ssp-sscr1 ( -- adr ) ssp-base la1+ ; -: ssp-sssr ( -- adr ) ssp-base 2 la+ ; -: ssp-ssdr ( -- adr ) ssp-base 4 la+ ; +: ssp-sscr1 ( -- adr ) ssp-base 4 + ; +: ssp-sssr ( -- adr ) ssp-base 8 + ; +: ssp-ssdr ( -- adr ) ssp-base h# 10 + ; +: ssp-sspsp ( -- adr ) ssp-base h# 2c + ;
: 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# 01 ssp-sspsp io! h# 07 ssp-sscr0 io! 0 ssp-sscr1 io! h# 87 ssp-sscr0 io!