From e82b8de7a9be20bdc0ae48b49a0aaa95ba58f751 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 12 Aug 2021 14:19:43 +0200 Subject: x86: define phys_to_virt and virt_to_phys Some PCI drivers use those, so provide 1:1 implementations. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20210812121944.4419-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- 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 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 #endif /* __ASM_X86_IO_H */ -- cgit v1.2.3