PCI: only check specific flag for 64bit BAR
The memory type may include other flags, so just check for the 64bit allocation flag to see if the BAR is a 64bit one. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
a793b694be
commit
9c29edf10b
|
@ -227,8 +227,7 @@ static void setup_device(struct pci_dev *dev, int max_bar)
|
|||
dev->resource[bar].start = last_addr;
|
||||
dev->resource[bar].end = last_addr + size - 1;
|
||||
|
||||
if ((mask & PCI_BASE_ADDRESS_MEM_TYPE_MASK) ==
|
||||
PCI_BASE_ADDRESS_MEM_TYPE_64) {
|
||||
if ((mask & PCI_BASE_ADDRESS_MEM_TYPE_64)) {
|
||||
dev->resource[bar].flags |= IORESOURCE_MEM_64;
|
||||
pci_write_config_dword(dev,
|
||||
PCI_BASE_ADDRESS_1 + bar * 4, 0);
|
||||
|
|
Loading…
Reference in New Issue