Skip to content

Commit ad234e2

Browse files
Yu Tugregkh
authored andcommitted
tty: serial: meson: Drop the legacy compatible strings and clock code
All mainline .dts files have been using the stable UART since Linux 4.16. Drop the legacy compatible strings and related clock code. Signed-off-by: Yu Tu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e3b27e2 commit ad234e2

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

drivers/tty/serial/meson_uart.c

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -622,10 +622,7 @@ meson_serial_early_console_setup(struct earlycon_device *device, const char *opt
622622
device->con->write = meson_serial_early_console_write;
623623
return 0;
624624
}
625-
/* Legacy bindings, should be removed when no more used */
626-
OF_EARLYCON_DECLARE(meson, "amlogic,meson-uart",
627-
meson_serial_early_console_setup);
628-
/* Stable bindings */
625+
629626
OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart",
630627
meson_serial_early_console_setup);
631628

@@ -668,25 +665,6 @@ static inline struct clk *meson_uart_probe_clock(struct device *dev,
668665
return clk;
669666
}
670667

671-
/*
672-
* This function gets clocks in the legacy non-stable DT bindings.
673-
* This code will be remove once all the platforms switch to the
674-
* new DT bindings.
675-
*/
676-
static int meson_uart_probe_clocks_legacy(struct platform_device *pdev,
677-
struct uart_port *port)
678-
{
679-
struct clk *clk = NULL;
680-
681-
clk = meson_uart_probe_clock(&pdev->dev, NULL);
682-
if (IS_ERR(clk))
683-
return PTR_ERR(clk);
684-
685-
port->uartclk = clk_get_rate(clk);
686-
687-
return 0;
688-
}
689-
690668
static int meson_uart_probe_clocks(struct platform_device *pdev,
691669
struct uart_port *port)
692670
{
@@ -755,12 +733,7 @@ static int meson_uart_probe(struct platform_device *pdev)
755733
if (!port)
756734
return -ENOMEM;
757735

758-
/* Use legacy way until all platforms switch to new bindings */
759-
if (of_device_is_compatible(pdev->dev.of_node, "amlogic,meson-uart"))
760-
ret = meson_uart_probe_clocks_legacy(pdev, port);
761-
else
762-
ret = meson_uart_probe_clocks(pdev, port);
763-
736+
ret = meson_uart_probe_clocks(pdev, port);
764737
if (ret)
765738
return ret;
766739

@@ -805,9 +778,6 @@ static int meson_uart_remove(struct platform_device *pdev)
805778
}
806779

807780
static const struct of_device_id meson_uart_dt_match[] = {
808-
/* Legacy bindings, should be removed when no more used */
809-
{ .compatible = "amlogic,meson-uart" },
810-
/* Stable bindings */
811781
{ .compatible = "amlogic,meson6-uart" },
812782
{ .compatible = "amlogic,meson8-uart" },
813783
{ .compatible = "amlogic,meson8b-uart" },

0 commit comments

Comments
 (0)