summaryrefslogtreecommitdiff
path: root/arch/sandbox/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/io.h6
-rw-r--r--arch/sandbox/include/asm/types.h17
2 files changed, 19 insertions, 4 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index d3e8b969d6..1a0a772adc 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -43,9 +43,15 @@ phys_addr_t map_to_sysmem(const void *ptr);
#define readb(addr) ((void)addr, 0)
#define readw(addr) ((void)addr, 0)
#define readl(addr) ((void)addr, 0)
+#ifdef CONFIG_SANDBOX64
+#define readq(addr) ((void)addr, 0)
+#endif
#define writeb(v, addr) ((void)addr)
#define writew(v, addr) ((void)addr)
#define writel(v, addr) ((void)addr)
+#ifdef CONFIG_SANDBOX64
+#define writeq(v, addr) ((void)addr)
+#endif
/*
* Clear and set bits in one shot. These macros can be used to clear and
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
index 623cdafefa..6657f3a7b9 100644
--- a/arch/sandbox/include/asm/types.h
+++ b/arch/sandbox/include/asm/types.h
@@ -51,14 +51,23 @@ typedef __UINT64_TYPE__ u64;
#endif
/*
- * Number of bits in a C 'long' on this architecture. Set this to 32 when
- * building on a 32-bit machine.
+ * Number of bits in a C 'long' on this architecture.
*/
-#define BITS_PER_LONG 32
-
+#ifdef CONFIG_PHYS64
+#define BITS_PER_LONG 64
+#else /* CONFIG_PHYS64 */
+#define BITS_PER_LONG 32
+#endif /* CONFIG_PHYS64 */
+
+#ifdef CONFIG_PHYS64
+typedef unsigned long long dma_addr_t;
+typedef u64 phys_addr_t;
+typedef u64 phys_size_t;
+#else /* CONFIG_PHYS64 */
typedef unsigned long dma_addr_t;
typedef u32 phys_addr_t;
typedef u32 phys_size_t;
+#endif /* CONFIG_PHYS64 */
#endif /* __KERNEL__ */