[openfirmware] [commit] r3355 - cpu/arm/olpc cpu/arm/olpc/1.75 cpu/arm/olpc/3.0 cpu/arm/olpc/4.0 cpu/arm/olpc/cl4 dev/olpc/spiflash

repository service svn at openfirmware.info
Wed Oct 10 08:12:31 CEST 2012


Author: quozl
Date: Wed Oct 10 08:12:31 2012
New Revision: 3355
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3355

Log:
OLPC - adjust SPI and EC flash animation for larger parts, tested on XO-4

Modified:
   cpu/arm/olpc/1.75/config-a1.fth
   cpu/arm/olpc/1.75/config.fth
   cpu/arm/olpc/3.0/config.fth
   cpu/arm/olpc/4.0/config.fth
   cpu/arm/olpc/cl4/config.fth
   cpu/arm/olpc/edi.fth
   dev/olpc/spiflash/spiflash.fth
   dev/olpc/spiflash/spiui.fth

Modified: cpu/arm/olpc/1.75/config-a1.fth
==============================================================================
--- cpu/arm/olpc/1.75/config-a1.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ cpu/arm/olpc/1.75/config-a1.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -29,7 +29,8 @@
 d#  9999 constant machine-type  \ Backwards compatibility with non-device-tree kernel
 
 char 3 constant expected-ec-version
-h# 10000 value /ec-flash
+h# 10000 constant /ec-flash
+d#     1 constant ec-scale
 
 h# 10000 constant l2-#sets
 

Modified: cpu/arm/olpc/1.75/config.fth
==============================================================================
--- cpu/arm/olpc/1.75/config.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ cpu/arm/olpc/1.75/config.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -32,6 +32,7 @@
 
 char 4 constant expected-ec-version
 h# 8000 constant /ec-flash
+d#    0 constant ec-scale
 h# 7e80 constant ec-flags-offset   \ don't program or verify this page
 
 \ These constants are correct for XO-1.75 and XO-CL4; they might

Modified: cpu/arm/olpc/3.0/config.fth
==============================================================================
--- cpu/arm/olpc/3.0/config.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ cpu/arm/olpc/3.0/config.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -30,7 +30,8 @@
 d# 10000 constant machine-type  \ Backwards compatibility with non-device-tree kernel
 
 char 4 constant expected-ec-version
-h# 8000 value /ec-flash
+h# 8000 constant /ec-flash
+d#    0 constant ec-scale
 
 h# 18000 constant console-uart-base
 

Modified: cpu/arm/olpc/4.0/config.fth
==============================================================================
--- cpu/arm/olpc/4.0/config.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ cpu/arm/olpc/4.0/config.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -29,6 +29,7 @@
 
 char 7 constant expected-ec-version
 h# ec00 constant /ec-flash
+d#    1 constant ec-scale
 h# eb80 constant ec-flags-offset   \ don't program or verify this page
 
 fload ${BP}/cpu/arm/olpc/cl4/gpiopins.fth

Modified: cpu/arm/olpc/cl4/config.fth
==============================================================================
--- cpu/arm/olpc/cl4/config.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ cpu/arm/olpc/cl4/config.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -28,6 +28,7 @@
 
 char 7 constant expected-ec-version
 h# ec00 constant /ec-flash
+d#    1 constant ec-scale
 h# eb80 constant ec-flags-offset   \ don't program or verify this page
 
 fload ${BP}/cpu/arm/olpc/cl4/gpiopins.fth

Modified: cpu/arm/olpc/edi.fth
==============================================================================
--- cpu/arm/olpc/edi.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ cpu/arm/olpc/edi.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -203,7 +203,7 @@
          dup i + erase-page                    ( adr offset )
          over i +  over i +  edi-program-page  ( adr offset )
       then                                     ( adr offset )
-      i edi-progress                           ( adr offset )
+      i ec-scale rshift edi-progress           ( adr offset )
    /flash-page +loop                           ( adr offset )
    2drop                                       ( )
 ;

Modified: dev/olpc/spiflash/spiflash.fth
==============================================================================
--- dev/olpc/spiflash/spiflash.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ dev/olpc/spiflash/spiflash.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -297,8 +297,9 @@
 \ those commands.  The AB command seems to be supported by all
 \ of them, so it's a good starting point.
 
-: 2mb-flash  ( -- )  h# 20.0000 to /flash  ;
-: 1mb-flash  ( -- )  h# 10.0000 to /flash  ;
+0 value flash-scale
+: 2mb-flash  ( -- )  h# 20.0000 to /flash  6 to flash-scale  ;
+: 1mb-flash  ( -- )  h# 10.0000 to /flash  5 to flash-scale  ;
 
 0 value spi-id#
 : spi-identify  ( -- )

Modified: dev/olpc/spiflash/spiui.fth
==============================================================================
--- dev/olpc/spiflash/spiui.fth	Thu Oct  4 21:19:25 2012	(r3354)
+++ dev/olpc/spiflash/spiui.fth	Wed Oct 10 08:12:31 2012	(r3355)
@@ -11,7 +11,7 @@
 defer spi-progress  ' drop to spi-progress  ( n -- )
 
 : .progress  ( offset -- )
-   5 rshift  dup spi-progress  h# 400 + spi-progress
+   flash-scale rshift  dup spi-progress  h# 400 + spi-progress
 ;
 
 : write-flash-range  ( adr end-offset start-offset -- )



More information about the openfirmware mailing list