I wrote code to enable uhci portsc ,but not success ,
why ? My code is as follow :

procedure pci_enable;
var okay:boolean;
    result:word;
begin    
if
readPCIRegisterWord($4,USBBusNumber,USBFunctionNumber,result)
then 
        begin
                result := result and $05;  { bus master enable/io
access enable}
                okay:= (result = $5);
                if (not okay ) then
                begin
                        result := result or $5;
                
okay:=writePCIRegisterWord($4,USBBusNumber,USBFunctionNumber,result);
                end;
        end;
end;


procedure usb_enable;
var  value:word;
     okay:boolean;
begin
   value := USBReadPort0Reg;
   value := value and $1004;
   okay := (value = $1004);
   if (not okay) then
    begin
        value := value or $1004;
        USBWritePort0Reg(value);
   end
end;





USBdetect ok
  
Detect configured IO-Space Address ok

USBSetDeviceIOSpace ok

pci_enable;
usb_enable;

  Port0Reg := USBReadPort0Reg;
  Port0Reg := Port0Reg or (4096 or 4);  {write portsc
bit 12 and bit 2 set }
  USBWritePort0Reg(Port0Reg);
  delay(10);
  Port0Reg := USBReadPort0Reg;   {read portsc }

when I read back Portsc , which shows that portsc
enable bit (bit 2)still not set , why ?

Thanks 

Wait for help ...
  
Best regards 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to