From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH] of: address: mark 64-bit PCI resources explicitly as such
Date: Thu, 18 Nov 2021 07:25:46 +0100 [thread overview]
Message-ID: <20211118062546.1380928-1-ahmad@a3f.at> (raw)
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
next reply other threads:[~2021-11-18 6:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 6:25 Ahmad Fatoum [this message]
2021-11-22 9:08 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211118062546.1380928-1-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox