From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/5] x86: define phys_to_virt and virt_to_phys
Date: Thu, 12 Aug 2021 14:19:43 +0200 [thread overview]
Message-ID: <20210812121944.4419-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20210812121944.4419-1-a.fatoum@pengutronix.de>
Some PCI drivers use those, so provide 1:1 implementations.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/x86/include/asm/io.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 5d19679b5064..0971727bc63d 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -82,6 +82,16 @@ static inline void io_delay(void)
inb(0x80);
}
+static inline void *phys_to_virt(unsigned long phys)
+{
+ return (void *)phys;
+}
+
+static inline unsigned long virt_to_phys(volatile void *mem)
+{
+ return (unsigned long)mem;
+}
+
#include <asm-generic/io.h>
#endif /* __ASM_X86_IO_H */
--
2.30.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-08-12 12:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 12:19 [PATCH 1/5] net: drop Calxeda Highbank xgmac driver support Ahmad Fatoum
2021-08-12 12:19 ` [PATCH 2/5] net: make ARC MAC driver 32-bit only Ahmad Fatoum
2021-08-12 12:19 ` [PATCH 3/5] asm-generic: include bitio.h from io.h Ahmad Fatoum
2021-08-12 12:19 ` Ahmad Fatoum [this message]
2021-08-12 12:19 ` [PATCH 5/5] net: e1000: split EEPROM and barebox MTD wrapper into separate files Ahmad Fatoum
2021-08-12 13:03 ` [PATCH 1/5] net: drop Calxeda Highbank xgmac driver support Ahmad Fatoum
2021-08-18 4:46 ` 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=20210812121944.4419-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--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