summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-11-01 09:34:35 -0400
committerTom Rini <trini@konsulko.com>2019-11-01 09:34:35 -0400
commitbb1bb4bb5df9df4d3f07e39a632daaff79e4b77e (patch)
tree1ed8d0b3622961997a32cd648d5d1bd3de7a855a /arch/sandbox/include
parent82679624f9aa6d1be733c46f3555d5166b6f5b72 (diff)
parentd60ae4c59df55c08dc96202ff58fed21ab3afb7d (diff)
downloadu-boot-bb1bb4bb5df9df4d3f07e39a632daaff79e4b77e.tar.gz
u-boot-bb1bb4bb5df9df4d3f07e39a632daaff79e4b77e.tar.xz
u-boot-bb1bb4bb5df9df4d3f07e39a632daaff79e4b77e.zip
Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dm
- Fix for patman with email addresses containing commas - Bootstage improvements for TPL, SPL - Various sandbox and dm improvements and fixes
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r--arch/sandbox/include/asm/io.h11
-rw-r--r--arch/sandbox/include/asm/test.h11
2 files changed, 16 insertions, 6 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 4a35c41972..ad6c29a4e2 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -46,8 +46,7 @@ static inline void unmap_sysmem(const void *vaddr)
phys_addr_t map_to_sysmem(const void *ptr);
unsigned int sandbox_read(const void *addr, enum sandboxio_size_t size);
-void sandbox_write(const void *addr, unsigned int val,
- enum sandboxio_size_t size);
+void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size);
#define readb(addr) sandbox_read((const void *)addr, SB_SIZE_8)
#define readw(addr) sandbox_read((const void *)addr, SB_SIZE_16)
@@ -55,11 +54,11 @@ void sandbox_write(const void *addr, unsigned int val,
#ifdef CONFIG_SANDBOX64
#define readq(addr) sandbox_read((const void *)addr, SB_SIZE_64)
#endif
-#define writeb(v, addr) sandbox_write((const void *)addr, v, SB_SIZE_8)
-#define writew(v, addr) sandbox_write((const void *)addr, v, SB_SIZE_16)
-#define writel(v, addr) sandbox_write((const void *)addr, v, SB_SIZE_32)
+#define writeb(v, addr) sandbox_write((void *)addr, v, SB_SIZE_8)
+#define writew(v, addr) sandbox_write((void *)addr, v, SB_SIZE_16)
+#define writel(v, addr) sandbox_write((void *)addr, v, SB_SIZE_32)
#ifdef CONFIG_SANDBOX64
-#define writeq(v, addr) sandbox_write((const void *)addr, v, SB_SIZE_64)
+#define writeq(v, addr) sandbox_write((void *)addr, v, SB_SIZE_64)
#endif
/*
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index cd2b9e3155..b885e1a14f 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -213,4 +213,15 @@ int sandbox_get_pci_ep_irq_count(struct udevice *dev);
*/
uint sandbox_pci_read_bar(u32 barval, int type, uint size);
+/**
+ * sandbox_set_enable_memio() - Enable readl/writel() for sandbox
+ *
+ * Normally these I/O functions do nothing with sandbox. Certain tests need them
+ * to work as for other architectures, so this function can be used to enable
+ * them.
+ *
+ * @enable: true to enable, false to disable
+ */
+void sandbox_set_enable_memio(bool enable);
+
#endif