Merge tag 'v2021.01-rc5' into next
[platform/kernel/u-boot.git] / drivers / serial / serial_sti_asc.c
index ce26c94..5d1a46c 100644 (file)
@@ -1,16 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Support for Serial I/O using STMicroelectronics' on-chip ASC.
  *
- *  Copyright (c) 2017
- *  Patrice Chotard <patrice.chotard@st.com>
- *
- * SPDX-License-Identifier:    GPL-2.0
+ * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
  */
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <serial.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -170,7 +171,7 @@ static int sti_asc_serial_probe(struct udevice *dev)
        unsigned long val;
        fdt_addr_t base;
 
-       base = dev_get_addr(dev);
+       base = dev_read_addr(dev);
        if (base == FDT_ADDR_T_NONE)
                return -EINVAL;
 
@@ -205,7 +206,6 @@ U_BOOT_DRIVER(serial_sti_asc) = {
        .of_match = sti_serial_of_match,
        .ops = &sti_asc_serial_ops,
        .probe = sti_asc_serial_probe,
-       .priv_auto_alloc_size = sizeof(struct sti_asc_serial),
-       .flags = DM_FLAG_PRE_RELOC,
+       .priv_auto      = sizeof(struct sti_asc_serial),
 };