[openfirmware] r1308 - cpu/x86/pc/olpc/via

svn at openfirmware.info svn at openfirmware.info
Thu Aug 20 08:26:26 CEST 2009


Author: wmb
Date: 2009-08-20 08:26:26 +0200 (Thu, 20 Aug 2009)
New Revision: 1308

Modified:
   cpu/x86/pc/olpc/via/boardrev.fth
   cpu/x86/pc/olpc/via/suspend.fth
Log:
Via - enable UART on atest, both in stand-init-io and in resume path.







Modified: cpu/x86/pc/olpc/via/boardrev.fth
===================================================================
--- cpu/x86/pc/olpc/via/boardrev.fth	2009-08-20 06:24:07 UTC (rev 1307)
+++ cpu/x86/pc/olpc/via/boardrev.fth	2009-08-20 06:26:26 UTC (rev 1308)
@@ -19,13 +19,26 @@
    2dup + 2-  2  upper                      ( model$ )  \ Upper case for base model
 ;
 
-\ stand-init: board revision
+: enable-uart  ( -- )  h# 40 h# 8846 config-b!  ;
+
+warning @ warning off
+\ Do this in stand-init-io so the serial port is enabled prior
+\ to the early interact point
 : stand-init-io
    stand-init-io
+
+[ifndef] notdef
    ['] board-id@ catch  if  0  then   case
       0      of  0       endof  \ EC broken
       ( board-id )  dup h# 10 * 8 +  swap  \ E.g. b3 -> b38
    endcase
+[else]
+   \ wait-ib-empty
+   \ autowack-off
+   0 h# 68 pc!
+   h# d08
+[then]
+
    to board-revision
 
    \ Cache the board revision in CMOS RAM so the early startup code
@@ -35,8 +48,9 @@
    \ Force the serial port back on for A-test, even when SERIAL_EN is
    \ not asserted, because many developers use serial on A-test systems
    \ and it is not easy to jumper SERIAL_EN on A-test.
-   atest?  if  h# 40 h# 8846 config-b!  then
+   atest?  if  enable-uart  then
 ;
+warning !
 
 \ LICENSE_BEGIN
 \ Copyright (c) 2007 FirmWorks

Modified: cpu/x86/pc/olpc/via/suspend.fth
===================================================================
--- cpu/x86/pc/olpc/via/suspend.fth	2009-08-20 06:24:07 UTC (rev 1307)
+++ cpu/x86/pc/olpc/via/suspend.fth	2009-08-20 06:26:26 UTC (rev 1308)
@@ -18,14 +18,12 @@
 : sci-wakeup     ( -- )  h# 22 acpi-w@  h# 0002 or  h# 22 acpi-w!  ;
 
 : s3
+   ['] noop to stdin-idle  \ Until we work out how to restore interrupt delivery
+
    \ Enable wakeup from power button, also clearing
    \ any status bits in the low half of the register.
    0 acpi-l@ h# 100.0000 or  0 acpi-l!
 
-\ Unnecessary, as asm code does it
-\   h# ffff h# 20 acpi-w!  \ Clear PME status bits
-\ XXX may need to clear other status bits elsewhere as well
-
 \  sum-forth
 [ifdef] virtual-mode
    [ also dev /mmu ]  pdir-va  h# f0000 ax-call  [ previous definitions ]
@@ -33,6 +31,8 @@
    sp@ 4 -  h# f0000 ax-call  \ sp@ 4 - is a dummy pdir-va location
 [then]
 \  sum-forth
+
+   atest?  if  enable-uart  then  ukey?  if  ukey drop  then
 ;
 : kb-suspend  ( -- )
    sci-wakeup




More information about the openfirmware mailing list