diff mbox

[U-Boot,v2,06/44] sandbox: Add string and 16-bit I/O functions

Message ID 1462124192-8748-7-git-send-email-sjg@chromium.org
State Accepted
Commit e54094f2f9e812ae7b0d2ab2353ca11c0502849a
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass May 1, 2016, 5:35 p.m. UTC
Add outsw() and insw() functions for sandbox, as these are needed by the IDE
code. The functions will not do anything useful if called, but allow the
code to be compiled.

Also add out16() and in16(), required by systemace.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Make the string functions empty, since the implementation is not useful

 arch/sandbox/include/asm/io.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Simon Glass May 14, 2016, 7:34 p.m. UTC | #1
On 1 May 2016 at 11:35, Simon Glass <sjg@chromium.org> wrote:
> Add outsw() and insw() functions for sandbox, as these are needed by the IDE
> code. The functions will not do anything useful if called, but allow the
> code to be compiled.
>
> Also add out16() and in16(), required by systemace.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Make the string functions empty, since the implementation is not useful
>
>  arch/sandbox/include/asm/io.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)

Applied to u-boot-dm.
diff mbox

Patch

diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index b87ee19..6919632 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -56,6 +56,21 @@  void outl(unsigned int value, unsigned int addr);
 void outw(unsigned int value, unsigned int addr);
 void outb(unsigned int value, unsigned int addr);
 
+static inline void _insw(volatile u16 *port, void *buf, int ns)
+{
+}
+
+static inline void _outsw(volatile u16 *port, const void *buf, int ns)
+{
+}
+
+#define insw(port, buf, ns)		_insw((u16 *)port, buf, ns)
+#define outsw(port, buf, ns)		_outsw((u16 *)port, buf, ns)
+
+/* For systemace.c */
+#define out16(addr, val)
+#define in16(addr)		0
+
 #include <iotrace.h>
 #include <asm/types.h>