[openfirmware] [commit] r1993 - cpu/arm/olpc/1.75 dev/usb2/hcd/ehci

repository service svn at openfirmware.info
Sat Oct 30 05:01:34 CEST 2010


Author: wmb
Date: Sat Oct 30 05:01:34 2010
New Revision: 1993
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1993

Log:
Fixed bug introduced by last checkin (factoring problem).

Modified:
   cpu/arm/olpc/1.75/devices.fth
   dev/usb2/hcd/ehci/pci.fth
   dev/usb2/hcd/ehci/probe.fth

Modified: cpu/arm/olpc/1.75/devices.fth
==============================================================================
--- cpu/arm/olpc/1.75/devices.fth	Fri Oct 29 18:17:26 2010	(r1992)
+++ cpu/arm/olpc/1.75/devices.fth	Sat Oct 30 05:01:34 2010	(r1993)
@@ -179,7 +179,7 @@
    : my-map-out  ( adr len -- )  swap h# 100 - swap " map-out" $call-parent  ;
    false constant has-dbgp-regs?
    false constant needs-dummy-qh?
-   false constant grab-controller
+   : grab-controller  ( config-adr -- error? )  drop false  ;
    fload ${BP}/dev/usb2/hcd/ehci/loadpkg.fth
 end-package
    

Modified: dev/usb2/hcd/ehci/pci.fth
==============================================================================
--- dev/usb2/hcd/ehci/pci.fth	Fri Oct 29 18:17:26 2010	(r1992)
+++ dev/usb2/hcd/ehci/pci.fth	Sat Oct 30 05:01:34 2010	(r1993)
@@ -43,25 +43,22 @@
    drop  false                   ( false )
 ;
 : needs-dummy-qh?  ( -- flag )  0 my-w@ h# 1106 ( VIA ) =  ;
-: grab-controller  ( -- error? )
-   hccparams@ 8 rshift h# ff and  dup  if    ( config-adr )
-      dup my-l@  h# 10001 =  if              ( config-adr )
-         h# 100.0000 over my-l!              ( config-adr )  \ Ask for it
-         true                                ( config-adr error? )
-         d# 100 0  do                        ( config-adr error? )
-            over my-l@ h# 101.0000 and  h# 100.0000 =  if
-               \ Turn off SMIs in Legacy Support Extended CSR
-               h# e000.0000 h# 6c my-l!      ( config-adr error? )
-               0 my-l@ h# 27cc8086 =  if
-                  h# ffff.0000  h# 70  my-l!  \ Clear EHCI Intel special SMIs
-               then
-               0= leave                      ( config-adr error?' )
-            then                             ( config-adr error? )
-            d# 10 ms                         ( config-adr error? )
-         loop                                ( config-adr error? )
-         nip exit
-      then                                   ( config-adr )
-   then                                      ( config-adr )
-   drop                                      ( )
-   false
+: grab-controller  ( config-adr -- error? )
+   dup my-l@  h# 10001 =  if              ( config-adr )
+      h# 100.0000 over my-l!              ( config-adr )  \ Ask for it
+      true                                ( config-adr error? )
+      d# 100 0  do                        ( config-adr error? )
+         over my-l@ h# 101.0000 and  h# 100.0000 =  if
+            \ Turn off SMIs in Legacy Support Extended CSR
+            h# e000.0000 h# 6c my-l!      ( config-adr error? )
+            0 my-l@ h# 27cc8086 =  if
+               h# ffff.0000  h# 70  my-l!  \ Clear EHCI Intel special SMIs
+            then
+            0= leave                      ( config-adr error?' )
+         then                             ( config-adr error? )
+         d# 10 ms                         ( config-adr error? )
+      loop                                ( config-adr error? )
+      nip exit
+   then                                   ( config-adr )
+   drop false                             ( false )
 ;

Modified: dev/usb2/hcd/ehci/probe.fth
==============================================================================
--- dev/usb2/hcd/ehci/probe.fth	Fri Oct 29 18:17:26 2010	(r1992)
+++ dev/usb2/hcd/ehci/probe.fth	Sat Oct 30 05:01:34 2010	(r1993)
@@ -129,10 +129,12 @@
       alloc-dma-buf
       first-open?  if
          false to first-open?
-         grab-controller  if
-            ." Can't take control of EHCI from underlying BIOS" cr
-            free-dma-buf unmap-regs
-            false exit
+         hccparams@ 8 rshift h# ff and  ?dup  if  ( config-adr )
+            grab-controller  if
+               ." Can't take control of EHCI from underlying BIOS" cr
+               free-dma-buf unmap-regs
+               false exit
+            then
          then
          0 ehci-reg@  h# ff and to op-reg-offset
          reset-usb



More information about the openfirmware mailing list