[PATCH] of: address: mark 64-bit PCI resources explicitly as such
Ahmad Fatoum
ahmad at a3f.at
Wed Nov 17 22:25:46 PST 2021
Eventually, we shouldn't need this, when all code can deal with 64-bit
addresses. For now, PCI drivers, when given the choice between 32-bit
and 64-bit resources, should select the 32-bit one.
This patch makes the resources straight forward to compare.
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
Needed for ECAM driver on list to work despite -M virt,highmem=on
---
drivers/of/address.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/of/address.c b/drivers/of/address.c
index 524a0f6a794d..926347cd841b 100644
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -133,8 +133,10 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr)
case 0x01:
flags |= IORESOURCE_IO;
break;
- case 0x02: /* 32 bits */
case 0x03: /* 64 bits */
+ flags |= IORESOURCE_MEM_64;
+ /* fallthrough */
+ case 0x02: /* 32 bits */
flags |= IORESOURCE_MEM;
break;
}
--
2.33.0
More information about the barebox
mailing list