summaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2022-07-26 13:24:12 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2022-08-08 15:22:53 +0200
commitf6eccbf5924514087074129dca102f8b632c3f17 (patch)
tree44c2e6f814f4f931cc0c65c95721ebbbe01ddbdf /arch/sandbox
parent2a3008a347021bc2d3b91e1b252b328f64db7ffe (diff)
downloadbarebox-f6eccbf5924514087074129dca102f8b632c3f17.tar.gz
asm-generic: provide phys_to_virt() and virt_to_phys()
The arm, riscv, sandbox and x86 architectures use just the same phys_to_virt()/virt_to_phys() implementation. Only the mips architecture has its own special implementation. So we can move phys_to_virt() and virt_to_phys() generic implementation to include/asm-generic/io.h. Use override functions way introduced in the 9216efafc52ff99e ("asm-generic/io.h: Reconcile I/O accessor overrides") linux kernel commit. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Link: https://lore.barebox.org/20220726102412.1104232-1-antonynpavlov@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r--arch/sandbox/include/asm/io.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 71cf50cd9a..eec279b888 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -11,14 +11,4 @@ extern unsigned char __pci_iobase[IO_SPACE_LIMIT];
#include <asm-generic/io.h>
-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;
-}
-
#endif /* __ASM_SANDBOX_IO_H */