summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2016-11-01 09:58:52 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-11-03 07:12:10 +0100
commit9c29edf10bd44514acfddf86ff169e243ac206a4 (patch)
tree0040be50b74315f45575d6efe3ddf830ca691706 /drivers/pci/pci.c
parenta793b694be6fb696048b8b51fe1a2c22e2c4ab69 (diff)
downloadbarebox-9c29edf10bd44514acfddf86ff169e243ac206a4.tar.gz
barebox-9c29edf10bd44514acfddf86ff169e243ac206a4.tar.xz
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>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 46f5d5f7d..eb3ce0f32 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -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);