diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-06-02 10:54:00 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-06-03 10:03:33 +0200 |
commit | 14c86b1a71c175556126f9612cf910697f29209f (patch) | |
tree | 6bff0ff602ab785c02c73ffd8e1967be87aeb3e3 /arch/sandbox | |
parent | 5cab4fbbefda41fb40d618b6a7c78e52dab9eb7a (diff) | |
download | barebox-14c86b1a71c175556126f9612cf910697f29209f.tar.gz barebox-14c86b1a71c175556126f9612cf910697f29209f.tar.xz |
sandbox: implement stub physical virtual translation
For compile-testing drivers that use DMA operations under sandbox,
we want stub implementations of these. Provide them.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/sandbox')
-rw-r--r-- | arch/sandbox/include/asm/io.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 0a07627a89..6a0e77aead 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -6,4 +6,14 @@ #include <asm-generic/io.h> #include <asm-generic/bitio.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 */ |