summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/barebox.lds.h3
-rw-r--r--arch/sandbox/include/asm/common.h2
-rw-r--r--arch/sandbox/include/asm/debug_ll.h16
-rw-r--r--arch/sandbox/include/asm/dma.h18
-rw-r--r--arch/sandbox/include/asm/io.h10
-rw-r--r--arch/sandbox/include/asm/linkage.h8
-rw-r--r--arch/sandbox/include/asm/reset_source.h16
-rw-r--r--arch/sandbox/include/asm/word-at-a-time.h2
8 files changed, 52 insertions, 23 deletions
diff --git a/arch/sandbox/include/asm/barebox.lds.h b/arch/sandbox/include/asm/barebox.lds.h
new file mode 100644
index 0000000000..540d740959
--- /dev/null
+++ b/arch/sandbox/include/asm/barebox.lds.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <asm-generic/barebox.lds.h>
diff --git a/arch/sandbox/include/asm/common.h b/arch/sandbox/include/asm/common.h
index 66ed2f5e9c..002dfb52b5 100644
--- a/arch/sandbox/include/asm/common.h
+++ b/arch/sandbox/include/asm/common.h
@@ -3,6 +3,4 @@
#ifndef ASM_COMMON_H
#define ASM_COMMON_H
-#define ARCH_HAS_CTRLC
-
#endif /* ASM_COMMON_H */
diff --git a/arch/sandbox/include/asm/debug_ll.h b/arch/sandbox/include/asm/debug_ll.h
new file mode 100644
index 0000000000..7bef871058
--- /dev/null
+++ b/arch/sandbox/include/asm/debug_ll.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ASM_DEBUG_LL__
+#define __ASM_DEBUG_LL__
+
+#undef putchar
+
+static inline void PUTC_LL(char ch)
+{
+ int putchar(int c);
+ putchar(ch);
+}
+
+#define putchar barebox_putchar
+
+#endif /* __ASM_DEBUG_LL__ */
diff --git a/arch/sandbox/include/asm/dma.h b/arch/sandbox/include/asm/dma.h
index 958d10e2a1..cafbb7fe6a 100644
--- a/arch/sandbox/include/asm/dma.h
+++ b/arch/sandbox/include/asm/dma.h
@@ -12,11 +12,7 @@
#include <linux/string.h>
#include <driver.h>
-#define dma_alloc dma_alloc
-static inline void *dma_alloc(size_t size)
-{
- return xmemalign(64, ALIGN(size, 64));
-}
+#define DMA_ALIGNMENT 64
#define dma_alloc_coherent dma_alloc_coherent
static inline void *dma_alloc_coherent(size_t size, dma_addr_t *dma_handle)
@@ -43,15 +39,15 @@ static inline void dma_free_coherent(void *mem, dma_addr_t dma_handle,
free(mem);
}
-#define dma_sync_single_for_cpu dma_sync_single_for_cpu
-static inline void dma_sync_single_for_cpu(dma_addr_t address, size_t size,
- enum dma_data_direction dir)
+#define arch_sync_dma_for_cpu arch_sync_dma_for_cpu
+static inline void arch_sync_dma_for_cpu(void *vaddr, size_t size,
+ enum dma_data_direction dir)
{
}
-#define dma_sync_single_for_device dma_sync_single_for_device
-static inline void dma_sync_single_for_device(dma_addr_t address, size_t size,
- enum dma_data_direction dir)
+#define arch_sync_dma_for_device arch_sync_dma_for_device
+static inline void arch_sync_dma_for_device(void *vaddr, size_t size,
+ enum dma_data_direction dir)
{
}
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 */
diff --git a/arch/sandbox/include/asm/linkage.h b/arch/sandbox/include/asm/linkage.h
new file mode 100644
index 0000000000..1d78d9169b
--- /dev/null
+++ b/arch/sandbox/include/asm/linkage.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
+
+/* referenced by <linux/linkage.h> */
+
+#endif
diff --git a/arch/sandbox/include/asm/reset_source.h b/arch/sandbox/include/asm/reset_source.h
new file mode 100644
index 0000000000..1690299c47
--- /dev/null
+++ b/arch/sandbox/include/asm/reset_source.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef __SANDBOX_RESET_SOURCE_H
+#define __SANDBOX_RESET_SOURCE_H
+
+#include <reset_source.h>
+#include <linux/nvmem-consumer.h>
+
+static inline void sandbox_save_reset_source(struct nvmem_cell *reset_source_cell,
+ enum reset_src_type src)
+{
+ if (reset_source_cell)
+ WARN_ON(nvmem_cell_write(reset_source_cell, &(u8) { src }, 1) <= 0);
+}
+
+#endif
diff --git a/arch/sandbox/include/asm/word-at-a-time.h b/arch/sandbox/include/asm/word-at-a-time.h
new file mode 100644
index 0000000000..f6306fb896
--- /dev/null
+++ b/arch/sandbox/include/asm/word-at-a-time.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+#include <asm-generic/word-at-a-time.h>