mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] of: address: mark 64-bit PCI resources explicitly as such
@ 2021-11-18  6:25 Ahmad Fatoum
  2021-11-22  9:08 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2021-11-18  6:25 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: address: mark 64-bit PCI resources explicitly as such
  2021-11-18  6:25 [PATCH] of: address: mark 64-bit PCI resources explicitly as such Ahmad Fatoum
@ 2021-11-22  9:08 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-11-22  9:08 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Thu, Nov 18, 2021 at 07:25:46AM +0100, Ahmad Fatoum wrote:
> 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@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(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-22  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18  6:25 [PATCH] of: address: mark 64-bit PCI resources explicitly as such Ahmad Fatoum
2021-11-22  9:08 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox