drivers: bcm283x: Set pre-location flag for OF_BOARD
[oweals/u-boot.git] / drivers / serial / serial_pl01x.c
index 23d9d839cbc1c249af6e0556ff11dbb8e03d4740..2a5f256184f2c195ed0088a211f31ca59540ab8c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000
  * Rob Taylor, Flying Pig Systems. robt@flyingpig.com.
@@ -5,8 +6,6 @@
  * (C) Copyright 2004
  * ARM Ltd.
  * Philippe Robin, <philippe.robin@arm.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* Simple U-Boot driver for the PrimeCell PL010/PL011 UARTs */
@@ -273,7 +272,7 @@ __weak struct serial_device *default_serial_console(void)
 
 #ifdef CONFIG_DM_SERIAL
 
-static int pl01x_serial_setbrg(struct udevice *dev, int baudrate)
+int pl01x_serial_setbrg(struct udevice *dev, int baudrate)
 {
        struct pl01x_serial_platdata *plat = dev_get_platdata(dev);
        struct pl01x_priv *priv = dev_get_priv(dev);
@@ -299,21 +298,21 @@ int pl01x_serial_probe(struct udevice *dev)
                return 0;
 }
 
-static int pl01x_serial_getc(struct udevice *dev)
+int pl01x_serial_getc(struct udevice *dev)
 {
        struct pl01x_priv *priv = dev_get_priv(dev);
 
        return pl01x_getc(priv->regs);
 }
 
-static int pl01x_serial_putc(struct udevice *dev, const char ch)
+int pl01x_serial_putc(struct udevice *dev, const char ch)
 {
        struct pl01x_priv *priv = dev_get_priv(dev);
 
        return pl01x_putc(priv->regs, ch);
 }
 
-static int pl01x_serial_pending(struct udevice *dev, bool input)
+int pl01x_serial_pending(struct udevice *dev, bool input)
 {
        struct pl01x_priv *priv = dev_get_priv(dev);
        unsigned int fr = readl(&priv->regs->fr);
@@ -324,7 +323,7 @@ static int pl01x_serial_pending(struct udevice *dev, bool input)
                return fr & UART_PL01x_FR_TXFF ? 0 : 1;
 }
 
-const struct dm_serial_ops pl01x_serial_ops = {
+static const struct dm_serial_ops pl01x_serial_ops = {
        .putc = pl01x_serial_putc,
        .pending = pl01x_serial_pending,
        .getc = pl01x_serial_getc,