[openfirmware] [commit] r3262 - in cpu/arm: mmp2 olpc

repository service svn at openfirmware.info
Fri Aug 31 02:32:00 CEST 2012


Author: wmb
Date: Fri Aug 31 02:32:00 2012
New Revision: 3262
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3262

Log:
OLPC ARM - Added "reg-w@" and "reg-w!" to the list of I2C interface methods and used them in the codec driver.

Modified:
   cpu/arm/mmp2/twsi-node.fth
   cpu/arm/mmp2/twsi-package.fth
   cpu/arm/olpc/sound.fth

Modified: cpu/arm/mmp2/twsi-node.fth
==============================================================================
--- cpu/arm/mmp2/twsi-node.fth	Fri Aug 31 02:22:54 2012	(r3261)
+++ cpu/arm/mmp2/twsi-node.fth	Fri Aug 31 02:32:00 2012	(r3262)
@@ -59,6 +59,8 @@
 
 : reg-b@  ( reg# -- b )  " reg-b@" $call-twsi  ;
 : reg-b!  ( b reg# -- )  " reg-b!" $call-twsi  ;
+: reg-w@  ( reg# -- b )  " reg-w@" $call-twsi  ;
+: reg-w!  ( b reg# -- )  " reg-w!" $call-twsi  ;
 : bytes-out  ( byte .. #bytes -- )  " bytes-out" $call-twsi  ;
 
 \ Useful range is 25K .. 400K - 100K and 400K are typical

Modified: cpu/arm/mmp2/twsi-package.fth
==============================================================================
--- cpu/arm/mmp2/twsi-package.fth	Fri Aug 31 02:22:54 2012	(r3261)
+++ cpu/arm/mmp2/twsi-package.fth	Fri Aug 31 02:32:00 2012	(r3262)
@@ -139,6 +139,9 @@
 : reg-b@  ( reg -- byte )  1 1 bytes-out-in  ;
 : reg-b!  ( byte reg -- )  2 bytes-out  ;
 
+: reg-w@  ( reg -- word )  1 2 bytes-out-in  swap bwjoin  ;
+: reg-w!  ( word reg -- )  >r wbsplit r> 3 bytes-out  ;
+
 : set-bus-standard  cr-set  h# 18000 invert and              to cr-set  ;
 : set-bus-fast      cr-set  h# 18000 invert and  h# 8000 or  to cr-set  ;
 

Modified: cpu/arm/olpc/sound.fth
==============================================================================
--- cpu/arm/olpc/sound.fth	Fri Aug 31 02:22:54 2012	(r3261)
+++ cpu/arm/olpc/sound.fth	Fri Aug 31 02:32:00 2012	(r3262)
@@ -7,8 +7,8 @@
    " rt5631-hifi" " dai-name" string-property  \ snd_soc_dai_link.codec_dai_name
    : open  ( -- true )     my-unit " set-address" $call-parent  true  ;
    : close  ( -- )  ;
-   : codec@  ( reg# -- w )  1 2 " bytes-out-in" $call-parent  swap bwjoin  ;
-   : codec!  ( w reg# -- )  >r wbsplit r>  3 " bytes-out" $call-parent  ;
+   : codec@  ( reg# -- w )  " reg-w@" $call-parent  ;
+   : codec!  ( w reg# -- )  " reg-w!" $call-parent  ;
 finish-device
 device-end
 



More information about the openfirmware mailing list