Author: wmb
Date: Sat Oct 22 07:20:07 2011
New Revision: 2641
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2641
Log:
OLPC XO-1.75 - Change the sleep state of EC_SPI_ACK from 1 (OFW value) to 0 (Linux value) when entering Linux. This lets Linux respond to upstream events from the EC during sleep.
Modified:
cpu/arm/olpc/1.75/fw.bth
Modified: cpu/arm/olpc/1.75/fw.bth
==============================================================================
--- cpu/arm/olpc/1.75/fw.bth Sat Oct 22 07:20:01 2011 (r2640)
+++ cpu/arm/olpc/1.75/fw.bth Sat Oct 22 07:20:07 2011 (r2641)
@@ -36,6 +36,8 @@
timers-off
usb-quiet
close-ec
+ \ Change the sleep state of EC_SPI_ACK from 1 (OFW value) to 0 (Linux value)
+ d# 125 af@ h# 100 invert and d# 125 af!
;
' quiesce to linux-hook
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 ;
Author: wmb
Date: Sat Oct 22 06:25:07 2011
New Revision: 2638
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2638
Log:
OLPC XO-1.75 - suspend/resume selftest - moved from memory node to switches node to work around an SMT test problem wherein the suspend/resume test breaks the keyboard on some systems.
Modified:
cpu/arm/mmp2/rtc.fth
cpu/arm/olpc/1.75/fw.bth
cpu/arm/olpc/1.75/probemem.fth
Modified: cpu/arm/mmp2/rtc.fth
==============================================================================
--- cpu/arm/mmp2/rtc.fth Sat Oct 22 06:03:25 2011 (r2637)
+++ cpu/arm/mmp2/rtc.fth Sat Oct 22 06:25:07 2011 (r2638)
@@ -46,19 +46,22 @@
\ it's hard to return a real error code. We just have to rely
\ on the operator.
." Testing suspend/resume" cr
- ." Sleeping for 3 seconds .. " d# 100 ms
+ ." Sleeping for 3 seconds .. " d# 1000 ms
ec-rst-pwr ['] cancel-alarm 3 rtc-wake str ec-max-pwr ( power )
\ Negative power is consumed from battery, positive is supplied to battery
dup d# -250 < if ( power )
." System used too much power during suspend - " negate .d ." mW" cr ( )
true ( error? )
else ( power )
- drop false ( error? )
+ ." OKAY" cr drop false ( error? )
then ( error? )
;
-dev /memory
-[ifdef] test-s3 ' s3-selftest to test-s3 [then]
-dend
+dev /switches
+: selftest ( -- error? )
+ s3-selftest if true exit then
+ selftest
+;
+device-end
\ LICENSE_BEGIN
\ Copyright (c) 2011 FirmWorks
Modified: cpu/arm/olpc/1.75/fw.bth
==============================================================================
--- cpu/arm/olpc/1.75/fw.bth Sat Oct 22 06:03:25 2011 (r2637)
+++ cpu/arm/olpc/1.75/fw.bth Sat Oct 22 06:25:07 2011 (r2638)
@@ -181,11 +181,11 @@
fload ${BP}/cpu/arm/olpc/1.75/testinstructions.fth
fload ${BP}/cpu/arm/mmp2/dramrecal.fth
-fload ${BP}/cpu/arm/mmp2/rtc.fth \ Internal RTC, used for wakeups
code halt ( -- ) wfi c;
fload ${BP}/cpu/arm/olpc/1.75/switches.fth \ Lid and ebook switches
+fload ${BP}/cpu/arm/mmp2/rtc.fth \ Internal RTC, used for wakeups
fload ${BP}/cpu/arm/olpc/1.75/leds.fth \ LEDs
fload ${BP}/cpu/x86/pc/olpc/via/factory.fth \ Manufacturing tools
Modified: cpu/arm/olpc/1.75/probemem.fth
==============================================================================
--- cpu/arm/olpc/1.75/probemem.fth Sat Oct 22 06:03:25 2011 (r2637)
+++ cpu/arm/olpc/1.75/probemem.fth Sat Oct 22 06:25:07 2011 (r2638)
@@ -64,8 +64,6 @@
[then]
: .chunk ( adr len -- ) ." Testing address 0x" swap 8u.h ." length 0x" 8u.h cr ;
-defer test-s3 ( -- error? ) ' false is test-s3
-
: test-mem ( adr len -- ) \ Test a chunk 'o memory
2>r
2r@ 0 mem-claim to p-adr ( ) ( r: adr len )
@@ -115,8 +113,7 @@
then ( adr len )
repeat ( adr len )
2drop ( )
-
- test-s3 ( error? )
+ false
;
device-end
Author: wmb
Date: Sat Oct 22 06:03:25 2011
New Revision: 2637
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2637
Log:
OLPC XO-1.75 - accelerometer selftest - increased max-z in selftest for new chip.
Modified:
cpu/arm/olpc/1.75/accelerometer.fth
Modified: cpu/arm/olpc/1.75/accelerometer.fth
==============================================================================
--- cpu/arm/olpc/1.75/accelerometer.fth Sat Oct 22 05:40:39 2011 (r2636)
+++ cpu/arm/olpc/1.75/accelerometer.fth Sat Oct 22 06:03:25 2011 (r2637)
@@ -309,9 +309,9 @@
d# 50 value min-x
d# 50 value min-y
d# 150 value min-z
-d# 100 value max-x
-d# 100 value max-y
-d# 300 value max-z
+d# 150 value max-x
+d# 150 value max-y
+d# 450 value max-z
: range? ( delta max-delta -- error? ) between 0= ;
: error? ( dx dy dz -- error? )
@@ -385,7 +385,7 @@
\ The attempt to talk at the old address failed, so we assume the new chip
\ Support for new LIS3DHTR chip
d# 50 to min-x d# 50 to min-y d# 50 to min-z
- d# 150 to max-x d# 150 to max-y d# 300 to max-z
+ d# 150 to max-x d# 150 to max-y d# 450 to max-z
h# 32 6 encode-phys " reg" property
['] lis3dhtr-selftest to lis-selftest
else
Author: wmb
Date: Sat Oct 22 05:40:33 2011
New Revision: 2635
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2635
Log:
IP pkg - Added known? and ntp-server-ip passthrough methods to IP package so ntp-set-clock does not silently abort during the DHCP phase. When that happens, it leaves the net device open, sometimes leading to later failures with that device.
Modified:
ofw/inet/ippkg.fth
Modified: ofw/inet/ippkg.fth
==============================================================================
--- ofw/inet/ippkg.fth Sat Oct 22 05:40:28 2011 (r2634)
+++ ofw/inet/ippkg.fth Sat Oct 22 05:40:33 2011 (r2635)
@@ -63,6 +63,8 @@
call-tftp: link-mtu ( -- n )
call-tftp: max-ip-payload ( -- n )
call-tftp: alloc-udp-port ( -- port# )
+call-tftp: known? ( 'ip -- flag )
+call-tftp: ntp-server-ip ( -- 'ip )
finish-device
device-end