forked from KolibriOS/kolibrios
added latency config macro to pci.inc
git-svn-id: svn://kolibrios.org@2911 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5ae9070151
commit
8ba3e5e11b
@ -114,11 +114,20 @@ macro make_bus_master bus, dev {
|
|||||||
movzx ecx, bus
|
movzx ecx, bus
|
||||||
movzx edx, dev
|
movzx edx, dev
|
||||||
stdcall PciRead32, ecx ,edx, PCI_REG_COMMAND
|
stdcall PciRead32, ecx ,edx, PCI_REG_COMMAND
|
||||||
|
or al, PCI_BIT_MASTER
|
||||||
or al, PCI_BIT_MASTER ;or PCI_BIT_PIO
|
|
||||||
; and al, not PCI_BIT_MMIO
|
|
||||||
stdcall PciWrite32, ecx, edx, PCI_REG_COMMAND, eax
|
stdcall PciWrite32, ecx, edx, PCI_REG_COMMAND, eax
|
||||||
|
|
||||||
;; TODO: try to switch to PIO, and check if PIO works or not..
|
}
|
||||||
|
|
||||||
}
|
macro adjust_latency bus, dev, min {
|
||||||
|
|
||||||
|
movzx ecx, bus
|
||||||
|
movzx edx, dev
|
||||||
|
stdcall PciRead8, ecx ,edx, PCI_REG_LATENCY
|
||||||
|
cmp al, min
|
||||||
|
ja @f
|
||||||
|
mov al, min
|
||||||
|
stdcall PciWrite8, ecx, edx, PCI_REG_LATENCY, eax
|
||||||
|
@@:
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user