Author: wmb
Date: Fri Dec 17 20:44:49 2010
New Revision: 2084
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2084
Log:
OLPC trac #10558 - test-all was skipping mouse and keyboard. Root cause was misspelling of "reg" property (bogus trailing space) introduced by svn 1992.
Also fixed the mouse driver so it works with the AVC Sentelic touchpads.
Modified:
dev/pckbd.fth
dev/ps2mouse.fth
Modified: dev/pckbd.fth
==============================================================================
--- dev/pckbd.fth Fri Dec 17 05:47:37 2010 (r2083)
+++ dev/pckbd.fth Fri Dec 17 20:44:49 2010 (r2084)
@@ -6,7 +6,7 @@
hex
headerless
-my-space " reg " integer-property
+my-space " reg" integer-property
" keyboard" device-name
" pnpPNP,303" " compatible" string-property
Modified: dev/ps2mouse.fth
==============================================================================
--- dev/ps2mouse.fth Fri Dec 17 05:47:37 2010 (r2083)
+++ dev/ps2mouse.fth Fri Dec 17 20:44:49 2010 (r2084)
@@ -4,7 +4,7 @@
" mouse" device-name
" mouse" device-type
" pnpPNP,f03" " compatible" string-property
-my-space " reg " integer-property
+my-space " reg" integer-property
headerless
: get-data ( -- byte ) " get-data" $call-parent ;
@@ -316,6 +316,9 @@
then ( id )
]unlock ( id )
+ \ Map the Sentelic ID into the mouse ID
+ dup 4 = if drop 0 then
+
\ The mouse ID is supposed to be zero.
\ If the ID is still non-zero, read the second ID byte and give up
dup if clear-out-buf then ( error? )
Author: quozl
Date: Fri Dec 17 05:47:37 2010
New Revision: 2083
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2083
Log:
OLPC XO-1.5 - avoid wait for DCONBLNK. Tested on OLPC OS 10.1.2.
Modified:
cpu/x86/pc/olpc/via/startgfxrestore.fth
Modified: cpu/x86/pc/olpc/via/startgfxrestore.fth
==============================================================================
--- cpu/x86/pc/olpc/via/startgfxrestore.fth Fri Dec 17 04:10:06 2010 (r2082)
+++ cpu/x86/pc/olpc/via/startgfxrestore.fth Fri Dec 17 05:47:37 2010 (r2083)
@@ -303,7 +303,8 @@
30 1e seq-set \ Power up DVP1 pads
0c 2a seq-set \ Power up LVDS pads
30 1b seq-set \ Turn off primary engine clock to save power
-
+
+[ifdef] resume-dcon
d# 32000 wait-us
\ Wait for DCON_BLNK to be low
d# 100 # cx mov
@@ -315,7 +316,11 @@
cx dec
0= until then \ "then" resolves "while"
+\ This is a cheesy way to set the DCON LOAD bit --
+ff acpi-io-base 4d + port-wb \ B1 and B2 - DCON LOAD is the 0x04 bit (bit number 2) of PMIO+4d
+ff acpi-io-base 4f + port-wb \ A1 and A2 - DCON LOAD is the 0x10 bit (bit number 4) of PMIO+4f
d# 19000 wait-us
+[then]
then
long-offsets !
Author: quozl
Date: Fri Dec 17 04:10:06 2010
New Revision: 2082
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2082
Log:
OLPC XO-1.5 - avoid set DCONLOAD during resume. Tested on OLPC OS
10.1.2 and Windows XP.
Tested-by: Luna Huang <Luna.Huang(a)quantatw.com>
Tested-by: James Cameron <quozl(a)laptop.org>
Tested-by: Jon Nettleton <jon.nettleton(a)gmail.com>
Co-authored-by: Jon Nettleton <jon.nettleton(a)gmail.com>
Modified:
cpu/x86/pc/olpc/via/startgfxrestore.fth
Modified: cpu/x86/pc/olpc/via/startgfxrestore.fth
==============================================================================
--- cpu/x86/pc/olpc/via/startgfxrestore.fth Thu Dec 16 20:13:57 2010 (r2081)
+++ cpu/x86/pc/olpc/via/startgfxrestore.fth Fri Dec 17 04:10:06 2010 (r2082)
@@ -315,9 +315,6 @@
cx dec
0= until then \ "then" resolves "while"
-\ This is a cheesy way to set the DCON LOAD bit --
-ff acpi-io-base 4d + port-wb \ B1 and B2 - DCON LOAD is the 0x04 bit (bit number 2) of PMIO+4d
-ff acpi-io-base 4f + port-wb \ A1 and A2 - DCON LOAD is the 0x10 bit (bit number 4) of PMIO+4f
d# 19000 wait-us
then
Author: wmb
Date: Thu Dec 16 20:13:57 2010
New Revision: 2081
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2081
Log:
OLPC trac #10547 - mouse driver was broken due to bad syntax for the unit address.
Modified:
dev/i8042.fth
dev/pci/isakbd.fth
Modified: dev/i8042.fth
==============================================================================
--- dev/i8042.fth Thu Dec 16 07:40:34 2010 (r2080)
+++ dev/i8042.fth Thu Dec 16 20:13:57 2010 (r2081)
@@ -33,7 +33,13 @@
\ 0 means the keyboard port, 1 means the aux port
: encode-unit ( n -- adr len ) if " aux" else " kbd" then ;
-: decode-unit ( adr len -- n ) " aux" $= 0= if 0 else 1 then ;
+: decode-unit ( adr len -- n )
+ 2dup $number if ( adr len )
+ " aux" $= 0= if 0 else 1 then ( n )
+ else ( adr len n )
+ nip nip ( n )
+ then
+;
\ Queues for distributing bytes sent from the two devices
d# 100 constant /q
Modified: dev/pci/isakbd.fth
==============================================================================
--- dev/pci/isakbd.fth Thu Dec 16 07:40:34 2010 (r2080)
+++ dev/pci/isakbd.fth Thu Dec 16 20:13:57 2010 (r2081)
@@ -12,7 +12,7 @@
finish-device
new-device
- " " " 1" set-args
+ " " " aux" set-args
fload ${BP}/dev/ps2mouse.fth
\ d# 12 encode-int 3 encode-int encode+ " interrupts" property
finish-device
Author: quozl
Date: Wed Dec 15 05:00:23 2010
New Revision: 2079
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2079
Log:
OLPC XO-1.5 - DSDT, enable THRM# GPIO (ebook) by default
This change means that the ebook switch is automatically functional,
without an ugly code block in the ebook switch driver which changes
low-level system registers.
This should be a safe change; any working ebook switch driver will
already have been making this config space tweak anyway.
Tested with Microsoft Windows XP by Luna.
Authored-by: Daniel Drake <dsd(a)laptop.org>
Tested-by: Luna Huang <Luna.Huang(a)quantatw.com>
Acked-by: James Cameron <quozl(a)laptop.org>
Modified:
README
cpu/x86/pc/olpc/via/dsdt.dsl
Modified: README
==============================================================================
--- README Fri Dec 10 23:10:15 2010 (r2078)
+++ README Wed Dec 15 05:00:23 2010 (r2079)
@@ -37,7 +37,7 @@
few different CPUs and platforms. The initial release contains
the processor-independent core code, x86 CPU support, drivers
for some common PC peripherals, and the current version of the
-port to the One Laptop Per Child computer. The support code
+port to the One Laptop per Child computer. The support code
for other CPUs and devices, and documentation, will be released
as time permits.
Modified: cpu/x86/pc/olpc/via/dsdt.dsl
==============================================================================
--- cpu/x86/pc/olpc/via/dsdt.dsl Fri Dec 10 23:10:15 2010 (r2078)
+++ cpu/x86/pc/olpc/via/dsdt.dsl Wed Dec 15 05:00:23 2010 (r2079)
@@ -343,6 +343,9 @@
// always want to hear both lid events when awake
Store (GPI7, LPOL) // watch either edge
+ // always want to hear ebook events (through THRM# GPIO)
+ Store (One, \_SB.PCI0.VT86.ENTH)
+
Return (0)
}
@@ -1173,6 +1176,10 @@
, 7,
IOBA, 9, // Power Management I/O Base
+ Offset(0x8c), // Host Power Management Control
+ , 3,
+ ENTH, 1, // THRM# enable
+
Offset(0x94),
, 5,
PLLD, 1, // RX9405 Internal PLL Reset During Suspend 0:Enable,1:Disable
@@ -2354,6 +2361,7 @@
Method(_INI, 0)
{
+ Store (One, \_SB.PCI0.VT86.ENTH)
Store (One, THRM)
Store (GPI9, TPOL) // init edge detect from current state
}
Author: quozl
Date: Thu Dec 9 06:30:02 2010
New Revision: 2076
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2076
Log:
SDHCI - restore previous delay for internal slot, adopt 250ms delay following tests with external slot. May be revisited with XO-1.75 A2 where only 1ms may be required.
Modified:
dev/mmc/sdhci/sdhci.fth
Modified: dev/mmc/sdhci/sdhci.fth
==============================================================================
--- dev/mmc/sdhci/sdhci.fth Wed Dec 8 23:17:20 2010 (r2075)
+++ dev/mmc/sdhci/sdhci.fth Thu Dec 9 06:30:02 2010 (r2076)
@@ -384,7 +384,7 @@
: response ( -- l ) h# 10 cl@ ;
-: buf+! ( buf value -- buf' ) over l! la1+ ;
+\ : buf+! ( buf value -- buf' ) over l! la1+ ;
\ Store in the buffer in little-endian form
: get-response136 ( buf -- ) \ 128 bits (16 bytes) of data.
@@ -801,16 +801,19 @@
false to writing?
;
-\ time to hold card power off to allow VCC_SD to discharge
+\ time to hold external card power off to allow VCC_SD to discharge
+\ 250ms required for XO-1.5 to achieve 0.5V
\ 25ms required for XO-1.5 with external SanDisk 32 G class 10 SD card
\ 29ms required for XO-1.5 with external SanDisk 8 G class 4 SD card
\ 1ms should be required for XO-1.75 A2 (due to discharge clamps)
-d# 40 value power-off-time
+d# 250 value power-off-time
\ -1 means error, 1 means retry
: power-up-card ( -- false | retry? true )
intstat-on
- card-power-off power-off-time ms
+ card-power-off
+ slot 1 = if power-off-time else d# 20 then
+ ms
card-power-on d# 40 ms \ This delay is just a guess (20 was barely too slow for a Via board)
card-inserted? 0= if card-power-off intstat-off false true exit then
card-clock-slow d# 10 ms \ This delay is just a guess
Author: wmb
Date: Wed Dec 8 23:17:20 2010
New Revision: 2075
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2075
Log:
OLPC XO-1.75 - reinstated USB polling delay to prevent TIMEOUT messages.
Modified:
cpu/arm/olpc/1.75/usb.fth
Modified: cpu/arm/olpc/1.75/usb.fth
==============================================================================
--- cpu/arm/olpc/1.75/usb.fth Wed Dec 8 22:39:38 2010 (r2074)
+++ cpu/arm/olpc/1.75/usb.fth Wed Dec 8 23:17:20 2010 (r2075)
@@ -12,7 +12,7 @@
false constant needs-dummy-qh?
: grab-controller ( config-adr -- error? ) drop false ;
fload ${BP}/dev/usb2/hcd/ehci/loadpkg.fth
- false to delay? \ No need for a polling delay on this platform
+\ false to delay? \ No need for a polling delay on this platform
: otg-set-host-mode 3 h# a8 ehci-reg! ; \ Force host mode
' otg-set-host-mode to set-host-mode