diff options
Diffstat (limited to 'libdde_linux26/lib')
-rw-r--r-- | libdde_linux26/lib/src/arch/l4/pci.c | 16 | ||||
-rw-r--r-- | libdde_linux26/lib/src/drivers/pci/pci.c | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/libdde_linux26/lib/src/arch/l4/pci.c b/libdde_linux26/lib/src/arch/l4/pci.c index d5a1414f..1cd64a7d 100644 --- a/libdde_linux26/lib/src/arch/l4/pci.c +++ b/libdde_linux26/lib/src/arch/l4/pci.c @@ -132,13 +132,21 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) //WARN_UNIMPL; } -void pci_set_master(struct pci_dev *dev) +static unsigned int pcibios_max_latency = 255; + +void pcibios_set_master(struct pci_dev *dev) { - CHECK_INITVAR(dde26_pci); - WARN_UNIMPL; + u8 lat; + pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat); + if (lat < 16) + lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency; + else if (lat > pcibios_max_latency) + lat = pcibios_max_latency; + else + return; + pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); } - int pci_create_sysfs_dev_files(struct pci_dev *pdev) { return 0; diff --git a/libdde_linux26/lib/src/drivers/pci/pci.c b/libdde_linux26/lib/src/drivers/pci/pci.c index f67bf734..9350ffed 100644 --- a/libdde_linux26/lib/src/drivers/pci/pci.c +++ b/libdde_linux26/lib/src/drivers/pci/pci.c @@ -1731,7 +1731,6 @@ int pci_request_regions(struct pci_dev *pdev, const char *res_name) return pci_request_selected_regions(pdev, ((1 << 6) - 1), res_name); } -#ifndef DDE_LINUX /** * pci_request_regions_exclusive - Reserved PCI I/O and memory resources * @pdev: PCI device whose resources are to be reserved @@ -1792,7 +1791,6 @@ void pci_clear_master(struct pci_dev *dev) { __pci_set_master(dev, false); } -#endif /* DDE_LINUX */ #ifdef PCI_DISABLE_MWI int pci_set_mwi(struct pci_dev *dev) |