mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
pci: Set PCI_COMMAND_IO bit for VGA device
PCI_COMMAND_IO bit must be set for VGA device as it needs to respond to legacy VGA IO address. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5dbcf3a0f9
commit
cdf9f085f2
1 changed files with 6 additions and 0 deletions
|
@ -89,6 +89,7 @@ void pciauto_setup_device(struct pci_controller *hose,
|
||||||
struct pci_region *bar_res;
|
struct pci_region *bar_res;
|
||||||
int found_mem64 = 0;
|
int found_mem64 = 0;
|
||||||
#endif
|
#endif
|
||||||
|
u16 class;
|
||||||
|
|
||||||
pci_hose_read_config_word(hose, dev, PCI_COMMAND, &cmdstat);
|
pci_hose_read_config_word(hose, dev, PCI_COMMAND, &cmdstat);
|
||||||
cmdstat = (cmdstat & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) | PCI_COMMAND_MASTER;
|
cmdstat = (cmdstat & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) | PCI_COMMAND_MASTER;
|
||||||
|
@ -206,6 +207,11 @@ void pciauto_setup_device(struct pci_controller *hose,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* PCI_COMMAND_IO must be set for VGA device */
|
||||||
|
pci_hose_read_config_word(hose, dev, PCI_CLASS_DEVICE, &class);
|
||||||
|
if (class == PCI_CLASS_DISPLAY_VGA)
|
||||||
|
cmdstat |= PCI_COMMAND_IO;
|
||||||
|
|
||||||
pci_hose_write_config_word(hose, dev, PCI_COMMAND, cmdstat);
|
pci_hose_write_config_word(hose, dev, PCI_COMMAND, cmdstat);
|
||||||
pci_hose_write_config_byte(hose, dev, PCI_CACHE_LINE_SIZE,
|
pci_hose_write_config_byte(hose, dev, PCI_CACHE_LINE_SIZE,
|
||||||
CONFIG_SYS_PCI_CACHE_LINE_SIZE);
|
CONFIG_SYS_PCI_CACHE_LINE_SIZE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue