[PATCH v2 13/25] sandbox: implement stub physical virtual translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 arch/sandbox/include/asm/io.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 0a07627a893d..6a0e77aead42 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 */
-- 
2.27.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux