diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2010-07-26 14:02:45 +0900 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-07-26 21:29:15 -0400 |
commit | 1d5c333e224cc95fb12563d8437abfeadda7734a (patch) | |
tree | 8e8402fe799f517103b436679d3139e60e1398ed | |
parent | ae6924dae8df004a8389215b2d5a183fb4e4841a (diff) | |
download | seabios-1d5c333e224cc95fb12563d8437abfeadda7734a.tar.gz |
seabios: pciinit: fix 64bit bar initilization.
When 64bit bar allocation failed, leave it untouched as 32bit bar case.
There is no point to set higher bit to all 1, it is just leftover from
debug code.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
-rw-r--r-- | src/pciinit.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/pciinit.c b/src/pciinit.c index b1105311..f75e5527 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -116,12 +116,8 @@ static int pci_bios_allocate_region(u16 bdf, int region_num) int is_64bit = !(val & PCI_BASE_ADDRESS_SPACE_IO) && (val & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64; - if (is_64bit) { - if (size > 0) { - pci_config_writel(bdf, ofs + 4, 0); - } else { - pci_config_writel(bdf, ofs + 4, ~0); - } + if (is_64bit && size > 0) { + pci_config_writel(bdf, ofs + 4, 0); } return is_64bit; } |