[openfirmware] r1297 - cpu/x86/pc/olpc/via dev/mmc/sdhci dev/olpc/dcon

svn at openfirmware.info svn at openfirmware.info
Thu Aug 13 06:48:12 CEST 2009


Author: wmb
Date: 2009-08-13 06:48:12 +0200 (Thu, 13 Aug 2009)
New Revision: 1297

Modified:
   cpu/x86/pc/olpc/via/boardrev.fth
   cpu/x86/pc/olpc/via/fw.bth
   cpu/x86/pc/olpc/via/ioinit.fth
   cpu/x86/pc/olpc/via/romreset.bth
   cpu/x86/pc/olpc/via/startcominit.fth
   cpu/x86/pc/olpc/via/versions.fth
   dev/mmc/sdhci/sdhcixo.bth
   dev/olpc/dcon/viadcon.fth
Log:
OLPC Via - Atest vs. Btest change set.


Modified: cpu/x86/pc/olpc/via/boardrev.fth
===================================================================
--- cpu/x86/pc/olpc/via/boardrev.fth	2009-08-13 04:44:59 UTC (rev 1296)
+++ cpu/x86/pc/olpc/via/boardrev.fth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -3,6 +3,8 @@
 
 0 value board-revision
 
+: atest?  ( -- flag )  board-revision h# d10 <  ;
+
 \ Constructs a string like "B4" or "preB4" or "postB4"
 : model-name$  ( -- model$ )
    board-revision  h# 10 /mod               ( minor major )
@@ -23,6 +25,10 @@
       ( board-id )  dup h# 10 * 8 +  swap  \ E.g. b3 -> b38
    endcase
    to board-revision
+
+   \ Cache the board revision in CMOS RAM so the early startup code
+   \ can get it without having to wait for the EC.
+   board-revision dup h# 82 cmos!  invert h# 83 cmos!
 ;
 
 \ LICENSE_BEGIN

Modified: cpu/x86/pc/olpc/via/fw.bth
===================================================================
--- cpu/x86/pc/olpc/via/fw.bth	2009-08-13 04:44:59 UTC (rev 1296)
+++ cpu/x86/pc/olpc/via/fw.bth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -240,7 +240,11 @@
 \ true to stand-init-debug?
 
 hex
+: serial-enabled?  ( -- flag )  h# 48 acpi-b@ h# 10 and 0=  ;
+
 : i-key-wait  ( ms -- pressed? )
+   serial-enabled?  0=  if  drop false exit  then
+
    cr ." Type 'i' to interrupt stand-init sequence" cr 
    0  do
       ukey?  if

Modified: cpu/x86/pc/olpc/via/ioinit.fth
===================================================================
--- cpu/x86/pc/olpc/via/ioinit.fth	2009-08-13 04:44:59 UTC (rev 1296)
+++ cpu/x86/pc/olpc/via/ioinit.fth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -209,7 +209,7 @@
 [then]
    
    94 ff 68 mreg  \ be like Phx
-   95 ff c1 mreg  \ be like Phx
+   95 ff c9 mreg  \ 8 bit enables GPIO0,1
 [ifdef] demo-board
    97 ff 80 mreg  \ be like Phx 
 [then]

Modified: cpu/x86/pc/olpc/via/romreset.bth
===================================================================
--- cpu/x86/pc/olpc/via/romreset.bth	2009-08-13 04:44:59 UTC (rev 1296)
+++ cpu/x86/pc/olpc/via/romreset.bth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -104,6 +104,12 @@
    20  00d config-wb   \ PCI master latency timer D0F0
    08  20c config-wb   \ Cache line size D0F2
 
+   \ This needs to be done early so we can test various GPIO bits,
+   \ including SERIAL_EN
+
+   acpi-io-base 1 + 8888 config-ww   \ Set ACPI base address
+   8c 8881 config-wb   \ Enable ACPI regs, 32-bit PM timer, guard RTC against power glitches
+
 [ifdef] debug-startup
    cominit #) call
 [then]
@@ -120,8 +126,6 @@
 
    long-offsets on
 
-   acpi-io-base 1 + 8888 config-ww   \ Set ACPI base address
-   8c 8881 config-wb   \ Enable ACPI regs, 32-bit PM timer, guard RTC against power glitches
    acpi-io-base 4 + port-rw           \ Get APCI Status register
    d# 10 # ax shr  7 # ax and  1 # ax cmp  <>  if   \ Wakeup from S3
       \ This turns an OS reboot into a real cold start - from coreboot

Modified: cpu/x86/pc/olpc/via/startcominit.fth
===================================================================
--- cpu/x86/pc/olpc/via/startcominit.fth	2009-08-13 04:44:59 UTC (rev 1296)
+++ cpu/x86/pc/olpc/via/startcominit.fth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -21,12 +21,21 @@
    h# 80 # al or  al bl mov                  \ Set south module pad share enable
    78 3c4 port-wb   3c5 # dx mov  bl al mov  al dx out
 
+   \ If the SERIAL_EN jumper is installed, routing the external pin to
+   \ the UART; otherwise leave it connected to the VCP port.
+
+   acpi-io-base 48 +  port-rb  h# 10 # al test  0=  if
+
+      d# 17 0 devfunc
+      \ The following is for UART on VCP port
+      46 c0 40 mreg
+      \ The following is for UART on DVP port
+      \ 46 c0 c0 mreg
+      end-table
+
+   then
+   
    d# 17 0 devfunc
-   \ The following is for UART on VCP port
-   46 c0 40 mreg
-   \ The following is for UART on DVP port
-   \ 46 c0 c0 mreg
-
    \ Standard COM2 and COM1 IRQ routing
    b2 ff 34 mreg
 

Modified: cpu/x86/pc/olpc/via/versions.fth
===================================================================
--- cpu/x86/pc/olpc/via/versions.fth	2009-08-13 04:44:59 UTC (rev 1296)
+++ cpu/x86/pc/olpc/via/versions.fth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -2,10 +2,10 @@
 
 \ The overall firmware revision
 macro: FW_MAJOR A
-macro: FW_MINOR 08
+macro: FW_MINOR 08f
 
 \ The EC microcode
-macro: EC_VERSION 1_9_7
+macro: EC_VERSION 1_9_8
 
 \ Alternate command for getting EC microcode, for testing new versions.
 \ Temporarily uncomment the line and modify the path as necessary
@@ -30,6 +30,6 @@
 \ With a specific ID, mcastnand.bth will download a tarball without .git stuff.
 \ With "test", mcastnand.bth will clone the git head if build/multicast-nand/
 \ is not already present, then you can modify the git subtree as needed.
-macro: MCNAND_VERSION 0c73b4a084a27f0687b152dd0395c67fdf54b10f
+macro: MCNAND_VERSION b9a9d22b6037c3891f9cf8eabeaf7cd9efbd5241
 \ macro: MCNAND_VERSION test
 \ macro: MCNAND_VERSION HEAD

Modified: dev/mmc/sdhci/sdhcixo.bth
===================================================================
--- dev/mmc/sdhci/sdhcixo.bth	2009-08-13 04:44:59 UTC (rev 1296)
+++ dev/mmc/sdhci/sdhcixo.bth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -12,17 +12,37 @@
 
 init
 
-new-device
-   2 encode-int " reg" property
-   " sdmmc" " $load-driver" eval drop
-finish-device
+: populate-children  ( -- )
+   " atest?" evaluate  if
+      new-device
+         2 encode-int " reg" property
+         " sdmmc" " $load-driver" eval drop
+      finish-device
 
-new-device
-   1 encode-int " reg" property
-   " mv8686" " $load-driver" eval drop
-finish-device
+      new-device
+         1 encode-int " reg" property
+         " mv8686" " $load-driver" eval drop
+      finish-device
+   else
+      new-device
+         1 encode-int " reg" property
+         " sdmmc" " $load-driver" eval drop
+      finish-device
 
+      new-device
+         2 encode-int " reg" property
+         " sdmmc" " $load-driver" eval drop
+      finish-device
 
+      new-device
+         3 encode-int " reg" property
+         " mv8686" " $load-driver" eval drop
+      finish-device
+   then
+;
+
+populate-children
+
 end0
 
 end-tokenizing

Modified: dev/olpc/dcon/viadcon.fth
===================================================================
--- dev/olpc/dcon/viadcon.fth	2009-08-13 04:44:59 UTC (rev 1296)
+++ dev/olpc/dcon/viadcon.fth	2009-08-13 04:48:12 UTC (rev 1297)
@@ -33,7 +33,13 @@
 \ Disable SMBALRT# IRQ as DCON IRQ; leaving it enabled causes spurious S3 wakeups
 : dcon-disable-irq  ( -- )  0 8 smb-reg!  ;
 
-: dcon-load  ( -- )  h# 4f acpi-b@  h# 04 or  h# 4f acpi-b!  ;
+: dcon-load  ( -- )
+   atest?  if
+      h# 4f acpi-b@  h# 04 or  h# 4f acpi-b!  \ GPO12
+   else
+      h# 4d acpi-b@  h# 10 or  h# 4d acpi-b!  \ GPIO1
+   then
+;
 : dcon-unload  ( -- )  h# 4f acpi-b@  h# 04 invert and  h# 4f acpi-b!  ;
 : dcon-blnk?  ( -- flag )  h# 4a acpi-b@ 4 and 0<>  ;
 : dcon-stat@  ( -- n )  h# 4b acpi-b@ 3 and  ;




More information about the openfirmware mailing list