[openfirmware] [commit] r3046 - cpu/arm/mmp2
repository service
svn at openfirmware.info
Tue Jul 10 21:16:45 CEST 2012
Author: wmb
Date: Tue Jul 10 21:16:44 2012
New Revision: 3046
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3046
Log:
ARM MMP2 - added io!@ routine for accessing slow IO registers that need to be read back after writing.
Modified:
cpu/arm/mmp2/mfpr.fth
cpu/arm/mmp2/socregs.fth
Modified: cpu/arm/mmp2/mfpr.fth
==============================================================================
--- cpu/arm/mmp2/mfpr.fth Tue Jul 10 10:50:12 2012 (r3045)
+++ cpu/arm/mmp2/mfpr.fth Tue Jul 10 21:16:44 2012 (r3046)
@@ -46,9 +46,11 @@
: no-update, ( -- ) 8 w, ; \ 8 is a reserved bit; the code skips these
: af@ ( gpio# -- function# ) gpio>mfpr io@ ;
-: af! ( function# gpio# -- ) gpio>mfpr io! ;
+: af! ( function# gpio# -- ) gpio>mfpr io!@ ;
: +edge-clr ( n -- n' ) h# 40 or ;
+: +very-slow ( n -- n' ) h# 0000 or ;
+: +slow ( n -- n' ) h# 0800 or ;
: +medium ( n -- n' ) h# 1000 or ;
: +fast ( n -- n' ) h# 1800 or ;
: +twsi ( n -- n' ) h# 400 or ;
Modified: cpu/arm/mmp2/socregs.fth
==============================================================================
--- cpu/arm/mmp2/socregs.fth Tue Jul 10 10:50:12 2012 (r3045)
+++ cpu/arm/mmp2/socregs.fth Tue Jul 10 21:16:44 2012 (r3046)
@@ -4,6 +4,7 @@
: +io ( offset -- va ) io-va + ;
: io! ( value offset -- ) +io l! ;
: io@ ( offset -- value ) +io l@ ;
+: io!@ ( value offset -- ) tuck io! io@ drop ; \ For slow registers like MFPRs
: +apbc ( offset -- io-offset ) h# 01.5000 + ; \ APB Clock Unit
: +pmua ( offset -- io-offset ) h# 28.2800 + ; \ CPU Power Management Unit
More information about the openfirmware
mailing list