[openfirmware] [commit] r2304 - dev/olpc/kb3700
repository service
svn at openfirmware.info
Wed Jun 22 00:37:19 CEST 2011
Author: rsmith
Date: Wed Jun 22 00:37:19 2011
New Revision: 2304
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2304
Log:
Merge branch 'richard'
Modified:
dev/olpc/kb3700/battery.fth
Modified: dev/olpc/kb3700/battery.fth
==============================================================================
--- dev/olpc/kb3700/battery.fth Tue Jun 21 07:24:45 2011 (r2303)
+++ dev/olpc/kb3700/battery.fth Wed Jun 22 00:37:19 2011 (r2304)
@@ -561,6 +561,25 @@
then
;
+: bat-get-id ( -- id ) ds-bank-buf 1 ds-batid 1w-read ds-bank-buf c@ ;
+
+: bat-set-life-byd ( -- )
+ ds-batid 1w-recall
+ ds-batid h# 6c 1w-cmd
+ h# 22 1w-write-byte
+ ds-batid 1w-copy
+;
+
+: bat-fix-byd-id
+ batman-init?
+ bat-get-id h# 22 = if
+ ." Id is already correct"
+ else
+ ." Fixing BYD bat ID"
+ bat-set-life-byd
+ then
+;
+
h# 90 buffer: logstr
\ Read values directly rather than using the ec-cmd
More information about the openfirmware
mailing list