Changeset 3004


Ignore:
Timestamp:
Jun 7, 2012, 6:05:24 AM (3 years ago)
Author:
quozl
Message:

OLPC - probe all ports of the EHC during a test, regardless of whether they are in use. Remove fisheye test from default testing, because it is not used in manufacturing, and had been incorrectly used in the field to verify a port is working. No change to manufacturing tests. #11845.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dev/usb2/hcd/ehci/probe.fth

    r2746 r3004  
    6161;
    6262
     63\ Port owned by usb 1.1 controller (2000) or device is present (1)
    6364: port-connected?  ( port# -- flag )  portsc@ h# 2001 and  ;
    6465: wait-connect  ( port# -- error? )
     
    154155;
    155156
     157: .occupied  ( port -- )  ." USB 2.0 port " u. ."  in use" cr  ;
     158: regs{  ( -- prev )  ehci-reg dup 0=  if  map-regs  then  ;
     159: }regs  ( prev -- )  0=  if  unmap-regs  then  ;
     160
     161: fisheye  ( -- )
     162   regs{
     163   #testable-ports  0  ?do
     164      i port-connected?  if
     165         i .occupied
     166      else
     167         ." Fisheye pattern out to USB 2.0 port " i u. cr
     168         i test-port-begin
     169         d# 2,000 ms
     170         i test-port-end
     171         0 i portsc!  i reset-port  i power-port
     172      then
     173   loop
     174   }regs
     175;
     176
     177: thorough  ( -- error? )
     178   #testable-ports  0  ?do
     179      i port-connected?  if
     180         i .occupied
     181      else
     182         ." Please connect a device to USB port " i u. cr
     183         i wait-connect  if  true unloop exit  then
     184      then
     185   loop
     186   false
     187;
     188
     189: sagacity  ( -- error? )
     190   #testable-ports  0  ?do
     191      ." USB port " i u. ." ... "
     192      i port-connected?  if
     193         i wait-connect  if  true unloop exit  then
     194      else
     195         ." Empty" cr
     196      then
     197   loop
     198   false
     199;
     200
    156201: selftest  ( -- error? )
    157    ehci-reg dup 0=  if  map-regs  then
    158 
    159    #testable-ports  0  ?do
    160       i port-connected?  if             \ Port owned by usb 1.1 controller (2000) or device is present (1)
    161          ." USB 2.0 port " i u. ."  in use" cr
    162       else
    163          diagnostic-mode?  if
    164             ." Please connect a device to USB port " i u. cr
    165             i wait-connect  if  true unloop exit  then
    166          else
    167             ." Fisheye pattern out to USB 2.0 port " i u. cr
    168             i test-port-begin
    169             d# 2,000 ms
    170             i test-port-end
    171             0 i portsc!  i reset-port  i power-port
    172          then
    173       then
    174    loop
    175    0=  if  unmap-regs  then
    176    false
     202   regs{                        ( prev )
     203   diagnostic-mode?  if
     204      thorough
     205   else
     206      sagacity
     207   then                         ( prev error? )
     208   swap }regs                   ( error? )
    177209;
    178210
Note: See TracChangeset for help on using the changeset viewer.