arm: add initial support for Amlogic Meson and ODROID-C2
[platform/kernel/u-boot.git] / drivers / serial / serial_s5p.c
index 4a553a3..feba467 100644 (file)
@@ -85,6 +85,7 @@ static void __maybe_unused s5p_serial_baud(struct s5p_uart *uart, uint uclk,
                writeb(val % 16, &uart->rest.value);
 }
 
+#ifndef CONFIG_SPL_BUILD
 int s5p_serial_setbrg(struct udevice *dev, int baudrate)
 {
        struct s5p_serial_platdata *plat = dev->platdata;
@@ -168,7 +169,7 @@ static int s5p_serial_ofdata_to_platdata(struct udevice *dev)
        struct s5p_serial_platdata *plat = dev->platdata;
        fdt_addr_t addr;
 
-       addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
+       addr = dev_get_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
@@ -200,12 +201,13 @@ U_BOOT_DRIVER(serial_s5p) = {
        .ops    = &s5p_serial_ops,
        .flags = DM_FLAG_PRE_RELOC,
 };
+#endif
 
 #ifdef CONFIG_DEBUG_UART_S5P
 
 #include <debug_uart.h>
 
-void debug_uart_init(void)
+static inline void _debug_uart_init(void)
 {
        struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;