summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorLeonardo Bras <leobras.c@gmail.com>2021-04-15 15:00:51 -0300
committerRob Herring <robh@kernel.org>2021-04-21 07:49:45 -0500
commit9d57e61bf72336e13e4cd3c31e93ab26266296a8 (patch)
tree36ed7a0d714463b5f4c8cd20b830b17d7d0b57bc /drivers/of
parentb4193622707846637ea58bd3bdcaf8be997c4db9 (diff)
downloadlinux-9d57e61bf72336e13e4cd3c31e93ab26266296a8.tar.gz
linux-9d57e61bf72336e13e4cd3c31e93ab26266296a8.tar.bz2
linux-9d57e61bf72336e13e4cd3c31e93ab26266296a8.zip
of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses
Many other resource flag parsers already add this flag when the input has bits 24 & 25 set, so update this one to do the same. Some devices (like virtio-net) have more than one memory resource (like MMIO32 and MMIO64) and without this flag it would be needed to verify the address range to know which one is which. Signed-off-by: Leonardo Bras <leobras.c@gmail.com> Link: https://lore.kernel.org/r/20210415180050.373791-1-leobras.c@gmail.com Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/address.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 7de41abe7153..d3d10d45b9fa 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -116,9 +116,12 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr)
flags |= IORESOURCE_IO;
break;
case 0x02: /* 32 bits */
- case 0x03: /* 64 bits */
flags |= IORESOURCE_MEM;
break;
+
+ case 0x03: /* 64 bits */
+ flags |= IORESOURCE_MEM | IORESOURCE_MEM_64;
+ break;
}
if (w & 0x40000000)
flags |= IORESOURCE_PREFETCH;