Fix bug for io_bar size during pci scan

During the pci scan process, Some devices return bar_reponse with the
highest bytes 0, such as the pci bridge in uli1575 return bar_response
with 0xffffff, So the bar_size should be manually set under 64K.

Signed-off-by: Jason Jin <jason.jin@freescale.com>
master
Jin Zhengxiong-R64188 19 years ago committed by Jon Loeliger
parent fa7db9c377
commit bd22c2b975
  1. 3
      drivers/pci_auto.c

@ -102,7 +102,8 @@ void pciauto_setup_device(struct pci_controller *hose,
/* Check the BAR type and set our address mask */ /* Check the BAR type and set our address mask */
if (bar_response & PCI_BASE_ADDRESS_SPACE) { if (bar_response & PCI_BASE_ADDRESS_SPACE) {
bar_size = ~(bar_response & PCI_BASE_ADDRESS_IO_MASK) + 1; bar_size = ((~(bar_response & PCI_BASE_ADDRESS_IO_MASK))
& 0xffff) + 1;
bar_res = io; bar_res = io;
DEBUGF("PCI Autoconfig: BAR %d, I/O, size=0x%x, ", bar_nr, bar_size); DEBUGF("PCI Autoconfig: BAR %d, I/O, size=0x%x, ", bar_nr, bar_size);

Loading…
Cancel
Save