[openfirmware] r868 - cpu/x86/pc/olpc

svn at openfirmware.info svn at openfirmware.info
Wed Aug 6 09:01:20 CEST 2008


Author: wmb
Date: 2008-08-06 09:01:20 +0200 (Wed, 06 Aug 2008)
New Revision: 868

Modified:
   cpu/x86/pc/olpc/addrs.fth
   cpu/x86/pc/olpc/chipinit.fth
   cpu/x86/pc/olpc/config.fth
   cpu/x86/pc/olpc/devices.fth
   cpu/x86/pc/olpc/fw.bth
   cpu/x86/pc/olpc/fwsmall.bth
   cpu/x86/pc/olpc/gamekeys.fth
   cpu/x86/pc/olpc/gpioinit.fth
   cpu/x86/pc/olpc/loaddropins.fth
   cpu/x86/pc/olpc/lxearly.fth
   cpu/x86/pc/olpc/lxmsrs.fth
   cpu/x86/pc/olpc/mfgdata.fth
   cpu/x86/pc/olpc/micin.fth
   cpu/x86/pc/olpc/olpc.bth
   cpu/x86/pc/olpc/pcinode.fth
   cpu/x86/pc/olpc/probemem.fth
   cpu/x86/pc/olpc/smallconfig.fth
   cpu/x86/pc/olpc/vsapci.fth
Log:
OLPC - cleanup with no functional change.  Removed unused lx-devel ifdef
artifacts from the source code.  The lx-devel version is now built in a
separate directory, so there's no need to clutter the OLPC build with it.


Modified: cpu/x86/pc/olpc/addrs.fth
===================================================================
--- cpu/x86/pc/olpc/addrs.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/addrs.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -9,15 +9,9 @@
 [then]
 
 [ifdef] rom-loaded
-[ifdef] lx-devel
-h# fff8.0000   constant rom-pa		\ Physical address of boot ROM
-h#    8.0000   constant /rom		\ Size of boot ROM
-rom-pa         constant dropin-base
-[else]
 h# fff0.0000   constant rom-pa		\ Physical address of boot ROM
 h#   10.0000   constant /rom		\ Size of boot ROM
 rom-pa  h# 1.0000 +  constant dropin-base
-[then]
 
 h#    8.0000   constant dropin-size
 

Modified: cpu/x86/pc/olpc/chipinit.fth
===================================================================
--- cpu/x86/pc/olpc/chipinit.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/chipinit.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -46,11 +46,6 @@
    3 /l* +loop                      ( msr# )
    drop true abort" No MSR entry"
 ;
-\ [ifdef] lx-devel
-\  msr: 5000.201f 00000000.0000007b.  \ Posted writes for Legacy IDE registers
-\  msr: 5101.00e0 60000000.1f0ffff8.  \ IOD_BM Descriptor 0 ATA IO address
-\  msr: 5130.0008 00000000.000018a1.  \ IDE_IO_BAR - IDE bus master registers
-\ [then]
 
 : init-msr  ( adr -- )  dup la1+ 2@  rot @  wrmsr  ;
 

Modified: cpu/x86/pc/olpc/config.fth
===================================================================
--- cpu/x86/pc/olpc/config.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/config.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -35,7 +35,7 @@
 
 create resident-packages
 \ create use-watch-all
-\ create use-root-isa
+\ create use-root-isa   \ If defined, isa node is in the devtree root, not under /pci
 create no-floppy-node
 create no-com2-node
 create no-lpt-node
@@ -46,13 +46,8 @@
 create save-msrs
 
 create use-null-nvram  \ Don't store configuration variables
-\ create use-flash-nvram  \ Store configuration variables in SPI FLASH
+\ create use-flash-nvram  \ Store configuration variables in firmware FLASH
 
-\ Uncomment this to compile for the LX development board
-\ It's not possible to use one ROM image for both OLPC and
-\ the LX board, because of the ROM size difference.
-\ create lx-devel   \ Support for the LX development board
-
 fload ${BP}/cpu/x86/pc/olpc/addrs.fth
 
 \ LICENSE_BEGIN

Modified: cpu/x86/pc/olpc/devices.fth
===================================================================
--- cpu/x86/pc/olpc/devices.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/devices.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -136,9 +136,7 @@
 devalias sd /sd/disk
 
 dev /8042
-[ifndef] lx-devel
    patch false ctlr-selftest open
-[then]
 device-end
 
 0 0  " i70"  " /isa" begin-package   	\ Real-time clock node
@@ -274,8 +272,6 @@
 ;
 
 stand-init: Wireless reset
-[ifdef] lx-devel  exit  [then]
-
    \ Hit the reset on the Marvell wireless.  It sometimes (infrequently)
    \ fails to enumerate after a power-cycle, and reset seems to fix it.
    \ We need > 85 ms between wlan-reset and probe-usb, but console-start
@@ -345,7 +341,6 @@
       \ The "1-" removes the null byte
       " SN" find-tag  if  1-  else  " Unknown"  then  " serial-number" string-property
 
-[ifndef] lx-devel
       8 ec-cmd-b@  " ec-version" integer-property
 
       " PQ2" h# fff0.0000 h# 1.0000 sindex  dup 0>=  if  ( offset )
@@ -354,7 +349,6 @@
          drop  " UNKNOWN"
       then
       " ec-name" string-property
-[then]
 
    dend
 

Modified: cpu/x86/pc/olpc/fw.bth
===================================================================
--- cpu/x86/pc/olpc/fw.bth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/fw.bth	2008-08-06 07:01:20 UTC (rev 868)
@@ -89,24 +89,6 @@
 
 fload ${BP}/cpu/x86/pc/olpc/port80.fth	\ Port 80 debug messages
 
-[ifdef] lx-devel
-: pnp!  ( b reg# -- )  h# 2e pc!  h# 2f pc!  ;
-: pnp@  ( reg# -- b )  h# 2e pc!  h# 2f pc@  ;
-
-: init-superio  ( -- )
-   h# 87 h# 2e pc!  h# 87 h# 2e pc!  \ Enable PNP registers
-   h# 20 pnp@  h# 52 =  if  \ Check device ID
-      h#  5 h#  7 pnp!  \ Select keyboard controller
-      h# 60 h# 61 pnp!  \ Port 60
-      h# 64 h# 63 pnp!  \ Port 64
-      h#  1 h# 70 pnp!  \ Keyboard interrupt 1
-      h#  c h# 72 pnp!  \ Keyboard interrupt 12
-      h# 83 h# f0 pnp!  \ i8042 clock, fast reset, fast A20
-      h#  1 h# 30 pnp!  \ Enable
-   then
-;
-[then]
-
 fload ${BP}/dev/geode/gpio.fth		\ Rudimentary GPIO driver
 fload ${BP}/cpu/x86/pc/olpc/probemem.fth	\ Memory probing
 
@@ -238,9 +220,6 @@
 fload ${BP}/cpu/x86/pc/boot.fth
 
 : usb-port-power-map  ( -- n )
-[ifdef] lx-devel
-   h# 3ea exit     \ USB4:PWR2  USB3:PWR1  USB2:PWR1  USB1:PWR1
-[then]
    board-revision  h# b10  h# b2f between  if  \ B1 and B2
       h# 3ab   \ USB4:PWR1  USB3:PWR1  USB2:PWR1  USB1:PWR2
    else
@@ -284,9 +263,6 @@
          protect-fw
          ." Interacting" cr  hex interact
       then
-[ifdef] lx-devel
-      init-superio
-[then]
 
       setup
 [else]

Modified: cpu/x86/pc/olpc/fwsmall.bth
===================================================================
--- cpu/x86/pc/olpc/fwsmall.bth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/fwsmall.bth	2008-08-06 07:01:20 UTC (rev 868)
@@ -128,9 +128,6 @@
 
 [ifdef] use-usb
 : usb-port-power-map  ( -- n )
-[ifdef] lx-devel
-   h# 3ea exit     \ USB4:PWR2  USB3:PWR1  USB2:PWR1  USB1:PWR1
-[then]
    board-revision  h# b10  h# b2f between  if  \ B1 and B2
       h# 3ab   \ USB4:PWR1  USB3:PWR1  USB2:PWR1  USB1:PWR2
    else

Modified: cpu/x86/pc/olpc/gamekeys.fth
===================================================================
--- cpu/x86/pc/olpc/gamekeys.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/gamekeys.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -31,7 +31,6 @@
 ;
 
 : read-game-keys  ( -- )
-[ifdef] lx-devel  false exit  [then]
    board-revision h# b18 <  if
       button-x to game-key-mask  \ Force slow boot
       exit

Modified: cpu/x86/pc/olpc/gpioinit.fth
===================================================================
--- cpu/x86/pc/olpc/gpioinit.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/gpioinit.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -1,4 +1,4 @@
-: olpc-gpio-init
+: gpio-init
 \  h# f7ff0800 h# 1000 pl!  \ GPIOL_OUTPUT_VALUE 
 \  h# 36ffc900 h# 1004 pl!  \ GPIOL_OUTPUT_ENABLE 
 lx? if
@@ -119,77 +119,7 @@
 \  h# 00000000 h# 10fc pl!  \ GPIOH_EVENT_DECREMENT - default
 ;
 
-[ifdef] lx-devel
-0 [if] \ This_Is_Documentation
- 0    I ~ INTA#
- 1 O1     PCBEEP out AUX
- 2    I1  IDEIRQ14 in
- 3 O      CRT_SCL
- 4 O  I   CRT_SDA
- 5    I   IDE_CABLEID in
- 6    I   GPIO6 out page 26 check (also out from X4 connector pin 42) output from battery monitor header
- 7    I ~ INTB# in 10,2025
- 8 O 2    O2 IRTX out
- 9    I1  IRRX in
-10    I1  THRM_ALRM# in
-11 O1     SLP_CLK# out would be O1 for SLP_CLK_EN#
-12    I ~ INTC# 10,25
-13    I ~ INTD#_SLPBUT 25 (I1 for SLPBUT) ??
-14 O1 I1  SMB_SCL
-15 O1 I1  SMB_SDA
-
-16-20    LPC 21 LPC_SERIRQ 22 LPC_LFRAME
-
-24 O1     WORK_AUX out
-25    I1  LOW_BAT# in
-26    I   PME# in 18,20,25
-27 O1     MFGPT7_C1 out 26
-28    I1  pwrbut# in
-OutEn - 0900 c91a
-OutA1 - 0900 c802
-OutA2 - 0000 0100
-InEn  - 1600 f6f5
-InA1  - 1200 c604
-InInv - 0000 3081
-[then]
-
-: lx-devel-gpio-init  ( -- )
-[ifdef] Insyde_GPIO_Settings
-   \ These are the settings that Insyde BIOS uses.  I don't think they are right
-   h# 0900 h# 1090 pl!  h# c002 h# 1010 pl!  \ Output AUX1 (not SLP_CLK_EN)
-   h# 0000 h# 1094 pl!  h#  000 h# 1014 pl!  \ Output AUX2 (not IRTX)
-   h# 0900 h# 1084 pl!  h# c002 h# 1004 pl!  \ Output Enable (not SLP_CLK_EN#, IRTX, CRT_SDA, CRT_SCL)
-   h# 1000 h# 10a0 pl!  h# f085 h# 1020 pl!  \ Input Enable (not PME#, LOW_BAT#, THRM_ALRM, IRRX, GPIO6, IDE_CABLEID, CRT_SDA)
-   h# 1000 h# 10b4 pl!  h# c004 h# 1034 pl!  \ Input AUX1 (not LOW_BAT# THRM_ALRM  IRRX)
-[else]
-   h# 0900 h# 1090 pl!  h# c802 h# 1010 pl!  \ Output AUX1
-   h# 0000 h# 1094 pl!  h#  100 h# 1014 pl!  \ Output AUX2
-   h# 0900 h# 1084 pl!  h# c91a h# 1004 pl!  \ Output Enable
-   h# 1600 h# 10a0 pl!  h# f6f5 h# 1020 pl!  \ Input Enable
-   h# 1200 h# 10b4 pl!  h# c604 h# 1034 pl!  \ Input AUX1
-[then]
-
-   h# 0000 h# 10a4 pl!  h# 3081 h# 1024 pl!  \ Input Invert (Int lines)
-   h# 0000 h# 10b8 pl!  h# 3081 h# 1038 pl!  \ Event enable (Int lines)
-
-   h# 1000.0000 h# 1098 pl!  \ No pullup on pwrbut_in
-   h#      1000 h# 10a8 pl!  \ filter pwrbut_in
-
-   h# 1000.0000 h# 101c pl!  \ No pulldown on INTC#
-   h# 3081.cf7e h# 1018 pl!  \ No pullups on INTA..D
-
-   h# 0800 h# 1088 pl!  \ MFGPT7_C1 is open drain
-;
-[then]
-
-: gpio-init  ( -- )
-[ifdef] lx-devel   lx-devel-gpio-init exit  [then]
-   olpc-gpio-init
-;
-
 : fix-sirq  ( -- )
-[ifdef] lx-devel  exit  [then]
-
    9 ec-cmd-b@ 9 <>  if
       h# 5140.004e rdmsr  swap h# 40 or swap  h# 5140.004e wrmsr
    then

Modified: cpu/x86/pc/olpc/loaddropins.fth
===================================================================
--- cpu/x86/pc/olpc/loaddropins.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/loaddropins.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -14,7 +14,6 @@
    " ${BP}/dev/usb2/device/wlan/build/usb8388.fc" " usb1286,2001"   $add-deflated-dropin
    " usb8388.bin" " usb8388.bin"                                    $add-deflated-dropin
 
-   \ XXX the PCI device IDs should be different for the different CaFe functions
    " ${BP}/dev/olpc/cafenand/build/cafenand.fc"     " class050101"    $add-deflated-dropin
    " ${BP}/dev/olpc/cafecamera/build/cafecamera.fc" " pci11ab,4102"   $add-deflated-dropin
 

Modified: cpu/x86/pc/olpc/lxearly.fth
===================================================================
--- cpu/x86/pc/olpc/lxearly.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/lxearly.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -14,9 +14,7 @@
    0000f001.00001000.   5140000c set-msr  \ GPIO BAR
 
  \ Init UART
-[ifndef] lx-devel
 fload ${BP}/cpu/x86/pc/olpc/inituart.fth
-[then]  \ lx-devel
 
    h# 11 # al mov  al h# 80 # out
    h# 1430 # dx mov  dx ax in  h# 9999 # ax cmp  =  if

Modified: cpu/x86/pc/olpc/lxmsrs.fth
===================================================================
--- cpu/x86/pc/olpc/lxmsrs.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/lxmsrs.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -213,12 +213,9 @@
 
   msr: 5000.2014 00000000.00ffffff.  \ Enables PCI access to low mem
 
-[ifdef] lx-devel
-  msr: 4800.2001 00000000.00040c00.  \ Set VP reference clock divider to 0xc, not 0xe, CRT mode
-[else]
 \  msr: 4800.2001 00000000.00040c08.  \ Set VP reference clock divider to 0xc, not 0xe, TFT mode
   msr: 4800.2001 00000000.00048c08.  \ Set VP reference clock divider to 0xc, not 0xe, TFT + CRT mode
-[then]
+
   \ The datasheet says the MSR number is 4800.0011, but that is wrong
   msr: 4800.2011 0000003f.dfffffff.  \ Set TFT pads to registered
 

Modified: cpu/x86/pc/olpc/mfgdata.fth
===================================================================
--- cpu/x86/pc/olpc/mfgdata.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/mfgdata.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -47,7 +47,6 @@
 \ Mfg data used to be at the end of the EC erase block, but
 \ is now in a block by itself.
 : mfg-data-top  ( -- adr )
-[ifdef] lx-devel  h# ffff.fff0 exit  [then]
    flash-base h# 1.0000 +  dup  invalid-tag?  ( old-top data-adr flag )
    nip  if  drop flash-base h# f.0000 +  then
 ;

Modified: cpu/x86/pc/olpc/micin.fth
===================================================================
--- cpu/x86/pc/olpc/micin.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/micin.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -25,7 +25,6 @@
 : stand-init
    stand-init
 
-[ifdef] lx-devel  exit  [then]
    post-b1?  if
       \ Configure GPIO as output for controlling MIC input AC/DC coupling
       2 OUT_EN gpio!

Modified: cpu/x86/pc/olpc/olpc.bth
===================================================================
--- cpu/x86/pc/olpc/olpc.bth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/olpc.bth	2008-08-06 07:01:20 UTC (rev 868)
@@ -51,18 +51,12 @@
 ;
 
 .( --- Saving as )
-[ifdef] lx-devel
-" lxd${FW_VERSION}.rom" expand$  2dup lower  ( adr len )
-[else]
 " ${FW_VERSION}.rom" expand$  2dup lower  ( adr len )
-[then]
 2dup type cr  ( adr len )
 $new-file
-[ifndef] lx-devel
    " ec.img"                $add-file
 
    dropin-base rom-pa -  pad-file
-[then]
 
    " romreset.di"           $add-file
 \   " romstart.di"           $add-file
@@ -71,15 +65,10 @@
    fload ${BP}/cpu/x86/pc/olpc/loaddropins.fth
    " sourceurl"   " sourceurl"                    $add-dropin
 
-[ifndef] lx-devel
    " ${BP}/clients/memtest86/memtest"               " memtest"  $add-deflated-dropin
 \   " ${BP}/cpu/x86/pc/olpc/images/olpc16EQima.wav"  " splash"   $add-deflated-dropin
 \   " ${BP}/cpu/x86/pc/olpc/images/Edge1-16k-EQ-Comp-Amp-ima.wav"  " splash"   $add-deflated-dropin
    " ${BP}/cpu/x86/pc/olpc/images/Edge1-8k-EQ-Comp-Amp-Short.wav"  " splash"   $add-deflated-dropin
-[then]
-[ifdef] lx-devel
-   " ${BP}/dev/pci/build/pcibridg.fc"           " class060400"     $add-deflated-dropin
-[then]
    " ${BP}/cpu/x86/pc/olpc/build/dsdt.aml"      " dsdt"            $add-deflated-dropin
 \  " ${BP}/cpu/x86/pc/olpc/build/ssdt.aml"      " ssdt"            $add-deflated-dropin
 

Modified: cpu/x86/pc/olpc/pcinode.fth
===================================================================
--- cpu/x86/pc/olpc/pcinode.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/pcinode.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -59,9 +59,6 @@
 also forth definitions
 
 : pci-probe-list  ( -- adr len )
-[ifdef] lx-devel
-   " 2,3,4,5,6,7,8,9,a,b,c,d,e,f" exit
-[then]
    " 1,c,f"
 ;
 \    " c,f" dup  config-string pci-probe-list
@@ -85,10 +82,6 @@
 \ returning "int-line true" if the child's interrupt line register should
 \ be set or "false" otherwise.
 : assign-int-line  ( phys.hi.func INTx -- irq true )
-[ifdef] lx-devel
-   \ XXX this is not good.  We need to really assign
-   drop  h# 3c +  config-b@  true  exit
-[then]
 
 [ifdef] rom-loaded
    \ The IRQ for the CaFe chip is b.  The other devices aren't really

Modified: cpu/x86/pc/olpc/probemem.fth
===================================================================
--- cpu/x86/pc/olpc/probemem.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/probemem.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -21,9 +21,6 @@
 
 \ Excludes RAM assigned to the frame buffer
 : system-ram  ( -- extant avail )
-[ifdef] lx-devel
-   h# f70.0000 exit
-[then]
    fb-offset
 ;
 

Modified: cpu/x86/pc/olpc/smallconfig.fth
===================================================================
--- cpu/x86/pc/olpc/smallconfig.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/smallconfig.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -45,11 +45,6 @@
 
 create use-null-nvram
 
-\ Uncomment this to compile for the LX development board
-\ It's not possible to use one ROM image for both OLPC and
-\ the LX board, because of the ROM size difference.
-\ create lx-devel   \ Support for the LX development board
-
 fload ${BP}/cpu/x86/pc/olpc/addrs.fth
 
 \ LICENSE_BEGIN

Modified: cpu/x86/pc/olpc/vsapci.fth
===================================================================
--- cpu/x86/pc/olpc/vsapci.fth	2008-08-04 18:33:08 UTC (rev 867)
+++ cpu/x86/pc/olpc/vsapci.fth	2008-08-06 07:01:20 UTC (rev 868)
@@ -230,7 +230,7 @@
          0 ,        0 ,        0 ,        0 ,
   fffffff0 ,        0 ,        0 ,        0 , \ Maybe wrong
 
-  209a1022 ,  2a00040 ,  1018001 ,     f800 ,
+  209a1022 ,  2a00041 ,  1018001 ,     f800 ,
          0 ,        0 ,        0 ,        0 ,
       18a1 ,        0 ,        0 , 209a1022 ,
          0 ,        0 ,        0 ,        0 ,
@@ -490,7 +490,6 @@
 ;
 
 : preassigned-pci-slot?  ( config-adr -- flag )
-[ifdef] lx-devel  virtual-pci-slot? exit  [then]
    drop true
 ;
 
@@ -529,7 +528,6 @@
       h#      10e  gxfb-hdr +methods h# 5c + w!  \ Interrupt pin and line - INTA, IRQ 14
    then
 
-[ifdef] lx-devel  exit  [then]
    assign-cafe
    \ FIXME - we really should fixup the NB and FB headers to use the
    \ AMD device IDs, add the AES device, and insert the VIP BAR.




More information about the openfirmware mailing list