[openfirmware] [commit] r2640 - cpu/arm/mmp2
repository service
svn at openfirmware.info
Sat Oct 22 07:20:02 CEST 2011
Author: wmb
Date: Sat Oct 22 07:20:01 2011
New Revision: 2640
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2640
Log:
OLPC XO-1.75 - synchronized mfpr.fth with the version in CForth. Should be no functional change.
Modified:
cpu/arm/mmp2/mfpr.fth
Modified: cpu/arm/mmp2/mfpr.fth
==============================================================================
--- cpu/arm/mmp2/mfpr.fth Sat Oct 22 07:19:56 2011 (r2639)
+++ cpu/arm/mmp2/mfpr.fth Sat Oct 22 07:20:01 2011 (r2640)
@@ -36,7 +36,7 @@
: gpio>mfpr ( gpio# -- mfpr-pa )
mfpr-offsets swap wa+ w@
h# 01.e000 +
-;
+;
: dump-mfprs ( -- )
base @
@@ -47,7 +47,20 @@
: 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, ( n -- ) h# c0 + w, ;
-: +fast ( n -- n' ) h# 1800 or ;
-: pull-up, ( n -- ) h# c0c0 + w, ;
-: pull-dn, ( n -- ) h# a0c0 + w, ;
+
+: +edge-clr ( n -- n' ) h# 40 or ;
+: +medium ( n -- n' ) h# 1000 or ;
+: +fast ( n -- n' ) h# 1800 or ;
+: +twsi ( n -- n' ) h# 400 or ;
+: +pull-up ( n -- n' ) h# c000 or ;
+: +pull-dn ( n -- n' ) h# a000 or ;
+: +pull-up-alt ( n -- n' ) h# 4000 or ;
+: +pull-dn-alt ( n -- n' ) h# 2000 or ;
+
+\ We always start with edge detection off; it can be turned on later as needed
+: af, ( n -- ) +edge-clr w, ;
+
+: sleep- ( n -- n' ) h# 0200 or ;
+: sleep0 ( n -- n' ) h# 0000 or ;
+: sleep1 ( n -- n' ) h# 0100 or ;
+: sleepi ( n -- n' ) h# 0080 or ;
More information about the openfirmware
mailing list