Merge tag 'video-for-2019.07' of https://gitlab.denx.de/u-boot/custodians/u-boot...
[oweals/u-boot.git] / drivers / serial / serial_meson.c
index 1b494265ce61fb0d8d2aad01c2b7511f64c41c98..b3dad77aa28c21b2ae9494549e96366dbc869a3e 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -11,8 +10,6 @@
 #include <linux/compiler.h>
 #include <serial.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct meson_uart {
        u32 wfifo;
        u32 rfifo;
@@ -108,7 +105,7 @@ static int meson_serial_ofdata_to_platdata(struct udevice *dev)
        struct meson_serial_platdata *plat = dev->platdata;
        fdt_addr_t addr;
 
-       addr = dev_get_addr(dev);
+       addr = devfdt_get_addr(dev);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
@@ -125,6 +122,7 @@ static const struct dm_serial_ops meson_serial_ops = {
 
 static const struct udevice_id meson_serial_ids[] = {
        { .compatible = "amlogic,meson-uart" },
+       { .compatible = "amlogic,meson-gx-uart" },
        { }
 };
 
@@ -134,7 +132,6 @@ U_BOOT_DRIVER(serial_meson) = {
        .of_match       = meson_serial_ids,
        .probe          = meson_serial_probe,
        .ops            = &meson_serial_ops,
-       .flags          = DM_FLAG_PRE_RELOC,
        .ofdata_to_platdata = meson_serial_ofdata_to_platdata,
        .platdata_auto_alloc_size = sizeof(struct meson_serial_platdata),
 };