summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-08-12 14:19:43 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-08-23 16:09:26 +0200
commite82b8de7a9be20bdc0ae48b49a0aaa95ba58f751 (patch)
treead0d360e1b96970036efe90a6acc0492cfc76da8 /arch
parent79f8074d9217fb3316b8f9426b361a70537e4094 (diff)
downloadbarebox-e82b8de7a9be20bdc0ae48b49a0aaa95ba58f751.tar.gz
barebox-e82b8de7a9be20bdc0ae48b49a0aaa95ba58f751.tar.xz
x86: define phys_to_virt and virt_to_phys
Some PCI drivers use those, so provide 1:1 implementations. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210812121944.4419-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/io.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index 5d19679b50..0971727bc6 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 */