diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2022-07-26 13:24:12 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-08-08 15:22:53 +0200 |
commit | f6eccbf5924514087074129dca102f8b632c3f17 (patch) | |
tree | 44c2e6f814f4f931cc0c65c95721ebbbe01ddbdf /arch/riscv | |
parent | 2a3008a347021bc2d3b91e1b252b328f64db7ffe (diff) | |
download | barebox-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/riscv')
-rw-r--r-- | arch/riscv/include/asm/io.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h index 978f644340..76d66c0a3b 100644 --- a/arch/riscv/include/asm/io.h +++ b/arch/riscv/include/asm/io.h @@ -7,14 +7,4 @@ #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_RISCV_IO_H */ |