diff options
author | Simon Glass <sjg@chromium.org> | 2014-10-10 07:49:13 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-10-23 19:45:28 -0600 |
commit | 1f77690e164e95fba0423a18b4597fd3ecd2817b (patch) | |
tree | 0fd7027d9167532548c11081db5bad56ede54bc9 | |
parent | 85bfe6e4f6ecb667a8f65698e92bfa9a1a481850 (diff) |
dm: serial: ns16550: Add a cast to the I/O operations
This generates a warning when driver model is enabled, so fix it by adding
a cast.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | drivers/serial/ns16550.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 0799aa4cd3..8f051914f5 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -67,7 +67,7 @@ static void ns16550_writeb(NS16550_t port, int offset, int value) * these options at run-time, so use the existing CONFIG options. */ #ifdef CONFIG_SYS_NS16550_PORT_MAPPED - outb(value, addr); + outb(value, (ulong)addr); #elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_SYS_BIG_ENDIAN) out_le32(addr, value); #elif defined(CONFIG_SYS_NS16550_MEM32) && defined(CONFIG_SYS_BIG_ENDIAN) @@ -87,7 +87,7 @@ static int ns16550_readb(NS16550_t port, int offset) offset *= 1 << plat->reg_shift; addr = map_sysmem(plat->base, 0) + offset; #ifdef CONFIG_SYS_NS16550_PORT_MAPPED - return inb(addr); + return inb((ulong)addr); #elif defined(CONFIG_SYS_NS16550_MEM32) && !defined(CONFIG_SYS_BIG_ENDIAN) return in_le32(addr); #elif defined(CONFIG_SYS_NS16550_MEM32) && defined(CONFIG_SYS_BIG_ENDIAN) |