[openfirmware] [commit] r3197 - cpu/arm/olpc cpu/arm/olpc/1.75 cpu/arm/olpc/1.75/attic dev/olpc dev/olpc/cafecamera dev/olpc/dcon dev/olpc/mmp2camera dev/olpc/viacamera dev/via/unichrome
repository service
svn at openfirmware.info
Sat Aug 18 09:05:11 CEST 2012
Author: wmb
Date: Sat Aug 18 09:05:11 2012
New Revision: 3197
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3197
Log:
OLPC - Change all uses of I2C addresses for bit-banged SMBUS (I2C) to use unshifted address form.
Modified:
cpu/arm/olpc/1.75/attic/audiosmb.fth
cpu/arm/olpc/1.75/compass.fth
cpu/arm/olpc/rtc.fth
cpu/arm/olpc/smbus.fth
dev/olpc/cafecamera/platform.fth
dev/olpc/dcon/mmp2dcon.fth
dev/olpc/mmp2camera/smbus.fth
dev/olpc/ov7670.fth
dev/olpc/seti.fth
dev/olpc/viacamera/platform.fth
dev/olpc/viacamera/smbus.fth
dev/via/unichrome/dconsmb.fth
Modified: cpu/arm/olpc/1.75/attic/audiosmb.fth
==============================================================================
--- cpu/arm/olpc/1.75/attic/audiosmb.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ cpu/arm/olpc/1.75/attic/audiosmb.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -72,7 +72,7 @@
;
0 value smb-slave
-: smb-addr ( lowbit -- ) smb-slave or smb-byte ;
+: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ;
: smb-byte! ( byte reg# -- )
smb-start
@@ -115,7 +115,7 @@
d# 32 0 do smb-clk-lo smb-clk-hi loop
;
-: set-dcon-slave ( -- ) h# 1a to smb-slave ;
+: set-dcon-slave ( -- ) h# 0d to smb-slave ;
: smb-init ( -- ) set-dcon-slave smb-on smb-pulses ;
: dcon@ ( reg# -- word ) set-dcon-slave smb-word@ ;
Modified: cpu/arm/olpc/1.75/compass.fth
==============================================================================
--- cpu/arm/olpc/1.75/compass.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ cpu/arm/olpc/1.75/compass.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -4,7 +4,7 @@
: set-compass-slave ( -- )
compass-scl-gpio# to smb-clock-gpio#
compass-sda-gpio# to smb-data-gpio#
- h# 1e to smb-slave
+ h# 0f to smb-slave
smb-data-gpio# gpio-dir-out
;
: smb-init ( -- ) set-compass-slave smb-on smb-pulses ;
@@ -39,7 +39,7 @@
: set-sensor-slave ( -- )
4 to smb-clock-gpio#
5 to smb-data-gpio#
- h# 18 to smb-slave
+ h# 0c to smb-slave
smb-data-gpio# gpio-dir-out
;
Modified: cpu/arm/olpc/rtc.fth
==============================================================================
--- cpu/arm/olpc/rtc.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ cpu/arm/olpc/rtc.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -17,7 +17,7 @@
: set-address ( -- )
rtc-scl-gpio# to smb-clock-gpio#
rtc-sda-gpio# to smb-data-gpio#
- h# d0 to smb-slave
+ h# 68 to smb-slave
;
: rtc@ ( reg# -- byte ) set-address smb-byte@ ;
: rtc! ( byte reg# -- ) set-address smb-byte! ;
Modified: cpu/arm/olpc/smbus.fth
==============================================================================
--- cpu/arm/olpc/smbus.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ cpu/arm/olpc/smbus.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -87,7 +87,7 @@
;
0 value smb-slave
-: smb-addr ( lowbit -- ) smb-slave or smb-byte ;
+: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ;
: smb-byte! ( byte reg# -- )
smb-start
Modified: dev/olpc/cafecamera/platform.fth
==============================================================================
--- dev/olpc/cafecamera/platform.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/cafecamera/platform.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -37,7 +37,7 @@
\ 4 my-w@ 6 invert and 4 my-w! \ No need to turn it off
;
-h# 42 value camera-smb-slave
+h# 21 value camera-smb-slave
: camera-smb-on ( -- ) ;
: clr-smb-intr ( -- ) 7.0000 30 cl! ;
@@ -46,7 +46,7 @@
1 ms \ 20 usec delay
;
-: set-slave ( -- ) camera-smb-slave 2 lshift 87.fc01 or b8 cl! ; \ TWSI control 0: id, 8-bit, clk
+: set-slave ( -- ) camera-smb-slave 2* 2 lshift 87.fc01 or b8 cl! ; \ TWSI control 0: id, 8-bit, clk
: ov@ ( reg -- data )
clr-smb-intr
Modified: dev/olpc/dcon/mmp2dcon.fth
==============================================================================
--- dev/olpc/dcon/mmp2dcon.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/dcon/mmp2dcon.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -6,12 +6,12 @@
false
;
-0 0 " 1a" " /dcon-i2c" begin-package
+0 0 " 0d" " /dcon-i2c" begin-package
" dcon" device-name
" olpc,xo1-dcon" +compatible
" olpc,xo1.75-dcon" +compatible
-h# 1a 1 reg
+my-space 1 reg
0 0 encode-bytes
dcon-stat0-gpio# 0 encode-gpio
@@ -57,7 +57,7 @@
dcon-scl-gpio# to smb-clock-gpio#
dcon-sda-gpio# to smb-data-gpio#
- h# 1a to smb-slave
+ h# 0d to smb-slave
;
: smb-init ( -- ) set-dcon-slave smb-on smb-pulses ;
Modified: dev/olpc/mmp2camera/smbus.fth
==============================================================================
--- dev/olpc/mmp2camera/smbus.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/mmp2camera/smbus.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -78,7 +78,7 @@
;
0 value smb-slave
-: smb-addr ( lowbit -- ) smb-slave or smb-byte ;
+: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ;
: smb-byte! ( byte reg# -- )
smb-start
Modified: dev/olpc/ov7670.fth
==============================================================================
--- dev/olpc/ov7670.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/ov7670.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -148,7 +148,7 @@
;
: probe-ov7670 ( -- found? )
- h# 42 to camera-smb-slave ( ) \ Omnivision SMB ID
+ h# 21 to camera-smb-slave ( ) \ Omnivision SMB ID
camera-smb-on
\ Try to read a byte of the manufacturing ID. If the read fails,
Modified: dev/olpc/seti.fth
==============================================================================
--- dev/olpc/seti.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/seti.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -294,7 +294,7 @@
;
: probe-seti ( -- found? )
- h# 66 to camera-smb-slave ( )
+ h# 33 to camera-smb-slave ( )
camera-smb-on ( )
\ Try to read a byte of the manufacturing ID. If the read fails,
Modified: dev/olpc/viacamera/platform.fth
==============================================================================
--- dev/olpc/viacamera/platform.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/viacamera/platform.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -2,7 +2,7 @@
purpose: Platform specifics for OLPC Camera on XO-1.5
h# 26 constant dcon-port
-: dcon-setup ( -- ) dcon-port to smb-port h# 1a to smb-slave ;
+: dcon-setup ( -- ) dcon-port to smb-port h# 0d to smb-slave ;
: smb-init ( -- ) dcon-setup smb-on smb-pulses ;
: dcon@ ( reg# -- word ) dcon-setup smb-word@ ;
Modified: dev/olpc/viacamera/smbus.fth
==============================================================================
--- dev/olpc/viacamera/smbus.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/olpc/viacamera/smbus.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -73,7 +73,7 @@
;
0 value smb-slave
-: smb-addr ( lowbit -- ) smb-slave or smb-byte ;
+: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ;
: smb-byte! ( byte reg# -- )
smb-start
Modified: dev/via/unichrome/dconsmb.fth
==============================================================================
--- dev/via/unichrome/dconsmb.fth Sat Aug 18 07:25:14 2012 (r3196)
+++ dev/via/unichrome/dconsmb.fth Sat Aug 18 09:05:11 2012 (r3197)
@@ -70,7 +70,7 @@
;
0 value smb-slave
-: smb-addr ( lowbit -- ) smb-slave or smb-byte ;
+: smb-addr ( lowbit -- ) smb-slave 2* or smb-byte ;
: smb-word! ( word reg# -- )
smb-start
0 smb-addr ( word reg# )
@@ -95,5 +95,5 @@
;
: smb-init ( -- ) smb-on smb-pulses ;
-: dcon@ ( reg# -- word ) h# 1a to smb-slave smb-word@ ;
-: dcon! ( word reg# -- ) h# 1a to smb-slave smb-word! ;
+: dcon@ ( reg# -- word ) h# 0d to smb-slave smb-word@ ;
+: dcon! ( word reg# -- ) h# 0d to smb-slave smb-word! ;
More information about the openfirmware
mailing list