[PATCH] of: address: mark 64-bit PCI resources explicitly as such

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux