diff options
Diffstat (limited to 'drivers/serial/serial_lpuart.c')
-rw-r--r-- | drivers/serial/serial_lpuart.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c index bfc3a13672..828a0dd0bb 100644 --- a/drivers/serial/serial_lpuart.c +++ b/drivers/serial/serial_lpuart.c @@ -1,18 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016 Zodiac Inflight Innovation * Author: Andrey Smirnov <andrew.smirnov@gmail.com> * * Based on analogous driver from U-Boot - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * */ #include <common.h> @@ -122,7 +113,7 @@ static int lpuart_clocksource_clock_change(struct notifier_block *nb, return lpuart_serial_setbaudrate(&lpuart->cdev, lpuart->baudrate); } -static int lpuart_serial_probe(struct device_d *dev) +static int lpuart_serial_probe(struct device *dev) { int ret; struct console_device *cdev; @@ -160,8 +151,8 @@ static int lpuart_serial_probe(struct device_d *dev) cdev->flush = lpuart_serial_flush; cdev->setbrg = lpuart_serial_setbaudrate; - if (dev->device_node) { - devname = of_alias_get(dev->device_node); + if (dev->of_node) { + devname = of_alias_get(dev->of_node); if (devname) { cdev->devname = xstrdup(devname); cdev->devid = DEVICE_ID_SINGLE; @@ -169,6 +160,8 @@ static int lpuart_serial_probe(struct device_d *dev) } cdev->linux_console_name = "ttyLP"; + cdev->linux_earlycon_name = "lpuart"; + cdev->phys_base = lpuart->base; lpuart_setup(lpuart->base, clk_get_rate(lpuart->clk)); @@ -193,8 +186,9 @@ static struct of_device_id lpuart_serial_dt_ids[] = { { .compatible = "fsl,vf610-lpuart" }, {} }; +MODULE_DEVICE_TABLE(of, lpuart_serial_dt_ids); -static struct driver_d lpuart_serial_driver = { +static struct driver lpuart_serial_driver = { .name = "lpuart-serial", .probe = lpuart_serial_probe, .of_compatible = DRV_OF_COMPAT(lpuart_serial_dt_ids), |