dm: serial: ns16550: Add a cast to the I/O operations
authorSimon Glass <sjg@chromium.org>
Fri, 10 Oct 2014 13:49:13 +0000 (07:49 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 24 Oct 2014 01:45:28 +0000 (19:45 -0600)
This generates a warning when driver model is enabled, so fix it by adding
a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/serial/ns16550.c

index 0799aa4..8f05191 100644 (file)
@@ -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)