Changeset 2983


Ignore:
Timestamp:
May 21, 2012, 10:59:18 AM (2 years ago)
Author:
quozl
Message:

OLPC XO-1.75 - avoid Data Abort during preparation for Linux kernel load when a PL2303 USB serial adapter is present, by removing the device from the console multiplexor and closing it. #11871.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/1.75/usb.fth

    r2790 r2983  
    9797 
    98980 value usb-keyboard-ih 
     990 value usb-serial-ih 
    99100 
    100101: attach-usb-keyboard  ( -- ) 
     
    118119; 
    119120 
     121: attach-usb-serial  ( -- ) 
     122   " /usb/serial" open-dev  ?dup  if 
     123      to usb-serial-ih 
     124      usb-serial-ih add-input 
     125   then 
     126; 
     127 
     128: detach-usb-serial  ( -- ) 
     129   usb-serial-ih  if 
     130      usb-serial-ih remove-input 
     131      usb-serial-ih close-dev 
     132      0 to usb-serial-ih 
     133   then 
     134; 
     135 
    120136: ?usb-keyboard  ( -- ) 
    121137   attach-usb-keyboard 
    122    " /usb/serial" open-dev  ?dup  if 
    123       add-input 
    124    then 
     138   attach-usb-serial 
    125139; 
    126140 
    127141: usb-quiet  ( -- ) 
    128142   detach-usb-keyboard 
     143   detach-usb-serial 
    129144   " /usb" " reset-usb" execute-device-method drop 
    130145; 
    131146 
    132147: suspend-usb  ( -- ) 
     148   detach-usb-serial 
    133149   detach-usb-keyboard 
    134150   " /usb" " sleep" execute-device-method drop 
     
    146162   silent-probe-usb 
    147163   attach-usb-keyboard 
     164   attach-usb-serial 
    148165; 
    149166 
Note: See TracChangeset for help on using the changeset viewer.