:) it's written in NASM so there shouldn't be much problem.. (you can use NASM for linux) and it doesn't use any OS functionality at all, so there's not much to port, but here it is.. BTW, linux already (should as of 2.4.7 or something) do this or something similar.
note that while this software IS copyrighted, I won't come after you for lots of money unless I find out you made lots of money from it and didn't share.. :)
; SetLat was made by Programmer, (c) 2001.
;
; This hopefully forces settings to make the USB work Right on the IOpener
;
; Compiled using nasm: nasm SetLat.asm -f bin -o SetLat.com
org 100h
SECTION .text
start:
;MASTER
;load the Double-Word with the PCI Latency Address
mov eax,08000000Ch
mov dx,00CF8h
out dx,eax
mov dx,00CFCh
in eax, dx
;Set the byte we are pointing to to 00H
and eax, 0FFFF00FFh
or eax, 000003000h
out dx, eax
;load the Double-Word with the PCI Delay/Caching Address
mov eax,080000070h
mov dx,00CF8h
out dx,eax
;Read the Current Value into eax
mov dx,00CFCh
in eax, dx
;Set they byte we are pointing to to ???? ?00?b
And eax,0FFFFFFF9h
Or eax,000000000h
out dx, eax
;dev7func0offset0d - Not Available
;dev7func1offset0d - EIDE Controller
;load the Double-Word with the PCI Latency Address
mov eax,08000390Ch
mov dx,00CF8h
out dx,eax
mov dx,00CFCh
in eax, dx
and eax, 0FFFF00FFh
or eax, 000003000h
out dx, eax
;dev7func2offset0d - USB 0(BaseIO USB)/1
;load the Double-Word with the PCI Latency Address
mov eax,080003A0Ch
mov dx,00CF8h
out dx,eax
mov dx,00CFCh
in eax, dx
and eax, 0FFFF00FFh
or eax, 000003000h
out dx, eax
;dev7func3offset0d - USB 2/3(IO2nd USB)
;load the Double-Word with the PCI Latency Address
mov eax,080003B0Ch
mov dx,00CF8h
out dx,eax
mov dx,00CFCh
in eax, dx
and eax, 0FFFF00FFh
or eax, 000003000h
out dx, eax
;dev7func4offset0d - ACPI Stuff
;load the Double-Word with the PCI Latency Address
mov eax,080003C0Ch
mov dx,00CF8h
out dx,eax
mov dx,00CFCh
in eax, dx
and eax, 0FFFF00FFh
or eax, 000003000h
out dx, eax
;leave
ret