diff options
author | Jin Zhengxiong-R64188 <Jason.Jin@freescale.com> | 2006-06-27 18:12:02 +0800 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2006-06-27 09:18:22 -0500 |
commit | bd22c2b97514fbfb0e03bd9c72b3445e4dbd57e2 (patch) | |
tree | c026eee6df1d929f61bf69e7b859cf5efff79a19 /drivers/pci_auto.c | |
parent | fa7db9c377bc2353a17bf1d381d65a6c418728f0 (diff) | |
download | u-boot-midas-bd22c2b97514fbfb0e03bd9c72b3445e4dbd57e2.tar.gz u-boot-midas-bd22c2b97514fbfb0e03bd9c72b3445e4dbd57e2.tar.bz2 u-boot-midas-bd22c2b97514fbfb0e03bd9c72b3445e4dbd57e2.zip |
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>
Diffstat (limited to 'drivers/pci_auto.c')
-rw-r--r-- | drivers/pci_auto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci_auto.c b/drivers/pci_auto.c index 15f74328f0..9e921b2148 100644 --- a/drivers/pci_auto.c +++ b/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 */ 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; DEBUGF("PCI Autoconfig: BAR %d, I/O, size=0x%x, ", bar_nr, bar_size); |