]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ns16550: unify serial_omap
authorThomas Chou <thomas@wytron.com.tw>
Thu, 19 Nov 2015 13:48:12 +0000 (21:48 +0800)
committerTom Rini <trini@konsulko.com>
Sun, 22 Nov 2015 02:50:17 +0000 (21:50 -0500)
Unify serial_omap, and use the generic binding.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
18 files changed:
board/isee/igep00x0/igep00x0.c
board/lge/sniper/sniper.c
board/logicpd/omap3som/omap3logic.c
board/logicpd/zoom1/zoom1.c
board/overo/overo.c
board/quipos/cairo/cairo.c
board/ti/beagle/beagle.c
board/timll/devkit8000/devkit8000.c
drivers/serial/Makefile
drivers/serial/serial_omap.c [deleted file]
include/configs/am43xx_evm.h
include/configs/cm_t43.h
include/configs/omap3_pandora.h
include/configs/sniper.h
include/configs/ti_am335x_common.h
include/configs/ti_omap3_common.h
include/configs/ti_omap4_common.h
include/configs/ti_omap5_common.h

index 044c6d5e9d68ed43507b1a8e88148094a566ee1d..57b89e0ba64e882177b5405be7ce90cbefd2d69c 100644 (file)
@@ -40,7 +40,7 @@ static const struct ns16550_platdata igep_serial = {
 };
 
 U_BOOT_DEVICE(igep_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &igep_serial
 };
 
index 4eff01a255f58cd2be89d0a1ae40843170c5d2cf..c818c9d4ced0ecb4372d12cb6cdbcd756689e745 100644 (file)
@@ -35,7 +35,7 @@ static const struct ns16550_platdata serial_omap_platdata = {
 };
 
 U_BOOT_DEVICE(sniper_serial) = {
-       .name = "serial_omap",
+       .name = "ns16550_serial",
        .platdata = &serial_omap_platdata
 };
 
index babb0dc0fe49962b025dfb47661028a94fa61b2e..fb89921e6b72222b06a9902eef68c8fe3558e188 100644 (file)
@@ -43,7 +43,7 @@ static const struct ns16550_platdata omap3logic_serial = {
 };
 
 U_BOOT_DEVICE(omap3logic_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &omap3logic_serial
 };
 
index 0a3b55b6c12b5e47b878313e85abf29e678b6f3b..4040114ce0aaa761cdb819dd4870e95675510ef4 100644 (file)
@@ -50,7 +50,7 @@ static const struct ns16550_platdata zoom1_serial = {
 };
 
 U_BOOT_DEVICE(zoom1_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &zoom1_serial
 };
 
index 20cbec208e810ea83d02b721f237071859dd9f5a..a38b959cb24f5c619d8a12d360766f354a3c9a6a 100644 (file)
@@ -74,7 +74,7 @@ static const struct ns16550_platdata overo_serial = {
 };
 
 U_BOOT_DEVICE(overo_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &overo_serial
 };
 
index b97a09ab1512b16bbd079b8b7a2a96555e01adc8..21793e85c4df7620e15f23c843e6cac7289a34fb 100644 (file)
@@ -97,7 +97,7 @@ static const struct ns16550_platdata cairo_serial = {
 };
 
 U_BOOT_DEVICE(cairo_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &cairo_serial
 };
 
index 56e3cfe935a4e79056b25598797673f848342323..ff317efc2c75de39a88f32b39c7d45a81753ab6a 100644 (file)
@@ -79,7 +79,7 @@ static const struct ns16550_platdata beagle_serial = {
 };
 
 U_BOOT_DEVICE(beagle_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &beagle_serial
 };
 
index a61cc1481b47c8304dba2572638b4e6b7a27b972..1a447c77df21203e169147a3680817d0226f6071 100644 (file)
@@ -52,7 +52,7 @@ static const struct ns16550_platdata devkit8000_serial = {
 };
 
 U_BOOT_DEVICE(devkit8000_uart) = {
-       "serial_omap",
+       "ns16550_serial",
        &devkit8000_serial
 };
 
index 86ae50faaa8512f026952b65c0d4838f92bb4429..dd871478ea9fccc911d9ddc717cdf9ab98b63fd3 100644 (file)
@@ -40,7 +40,6 @@ obj-$(CONFIG_FSL_LPUART) += serial_lpuart.o
 obj-$(CONFIG_MXS_AUART) += mxs_auart.o
 obj-$(CONFIG_ARC_SERIAL) += serial_arc.o
 obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o
-obj-$(CONFIG_OMAP_SERIAL) += serial_omap.o
 obj-$(CONFIG_STM32_SERIAL) += serial_stm32.o
 
 ifndef CONFIG_SPL_BUILD
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
deleted file mode 100644 (file)
index 891cd7b..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2014 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <dm.h>
-#include <fdtdec.h>
-#include <ns16550.h>
-#include <serial.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz */
-
-#if CONFIG_IS_ENABLED(OF_CONTROL)
-static const struct udevice_id omap_serial_ids[] = {
-       { .compatible = "ti,omap2-uart" },
-       { .compatible = "ti,omap3-uart" },
-       { .compatible = "ti,omap4-uart" },
-       { .compatible = "ti,am3352-uart" },
-       { .compatible = "ti,am4372-uart" },
-       { .compatible = "ti,dra742-uart" },
-       { }
-};
-
-static int omap_serial_ofdata_to_platdata(struct udevice *dev)
-{
-       struct ns16550_platdata *plat = dev_get_platdata(dev);
-       int ret;
-
-       ret = ns16550_serial_ofdata_to_platdata(dev);
-       if (ret)
-               return ret;
-       plat->clock = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-                                    "clock-frequency", DEFAULT_CLK_SPEED);
-       plat->reg_shift = 2;
-
-       return 0;
-}
-#endif
-
-U_BOOT_DRIVER(serial_omap_ns16550) = {
-       .name   = "serial_omap",
-       .id     = UCLASS_SERIAL,
-       .of_match = of_match_ptr(omap_serial_ids),
-       .ofdata_to_platdata = of_match_ptr(omap_serial_ofdata_to_platdata),
-       .platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
-       .priv_auto_alloc_size = sizeof(struct NS16550),
-       .probe = ns16550_serial_probe,
-       .ops    = &ns16550_serial_ops,
-       .flags  = DM_FLAG_PRE_RELOC,
-};
index 76d4032ab2f44da67152da33710822b612164077..1126cdd1b67e44fdca1ed589da4acfc2aa3177a0 100644 (file)
 
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_CLK         48000000
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
 #define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_CLK         48000000
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #else
-#define CONFIG_OMAP_SERIAL
+#define CONFIG_NS16550_SERIAL
 #endif
 
 /* I2C Configuration */
index c4d3b94ee58bb65dfe3f9cae096ec35d12758e2c..e1019ff65ec3f632cdc2968e2c708045f3718748 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/arch/omap.h>
 
 /* Serial support */
-#define CONFIG_OMAP_SERIAL
+#define CONFIG_NS16550_SERIAL
 #define CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
index 4e93705081697983c96088db0122d88a3bf693e7..c15c699ff79377a11600538242ebdc025947d805 100644 (file)
@@ -49,7 +49,8 @@
 /*
  * NS16550 Configuration
  */
-#undef CONFIG_OMAP_SERIAL
+#undef CONFIG_NS16550_SERIAL
+#undef CONFIG_SYS_NS16550_CLK
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
index f168e8f97ac41fac435404cf1f4a0f7f4891f539..34f7f6e51475920033b0907286c810044149382a 100644 (file)
 
 
 #ifndef CONFIG_SPL_BUILD
-#define CONFIG_OMAP_SERIAL
+#define CONFIG_NS16550_SERIAL
 #else
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
-#define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
 #endif
 
 #define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
 #define CONFIG_SYS_NS16550_COM3                OMAP34XX_UART3
 #define CONFIG_CONS_INDEX              3
 #define CONFIG_SERIAL3                 3
index 9697431b449638e0a88124be96d686a711211d0e..32348ab52071162a3b2d10c5e1477ecaaa6d944f 100644 (file)
@@ -20,7 +20,7 @@
 #define CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
 
 #ifndef CONFIG_SPL_BUILD
-# define CONFIG_OMAP_SERIAL
+# define CONFIG_NS16550_SERIAL
 #endif
 
 #include <asm/arch/omap.h>
index e399a879ac3140775d19918d16a291122d67a817..e749d5dfb592c9eee60b86e7049e0b6c8c383fd6 100644 (file)
@@ -19,7 +19,7 @@
 #include <asm/arch/omap.h>
 
 #ifndef CONFIG_SPL_BUILD
-# define CONFIG_OMAP_SERIAL
+# define CONFIG_NS16550_SERIAL
 #endif
 
 /* Common ARM Erratas */
 /* NS16550 Configuration */
 #define V_NS16550_CLK                  48000000        /* 48MHz (APLL96/2) */
 #define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_CLK         V_NS16550_CLK
 #ifdef CONFIG_SPL_BUILD
 # define CONFIG_SYS_NS16550_SERIAL
 # define CONFIG_SYS_NS16550_REG_SIZE   (-4)
-# define CONFIG_SYS_NS16550_CLK                V_NS16550_CLK
 #endif
 #define CONFIG_SYS_BAUDRATE_TABLE      {4800, 9600, 19200, 38400, 57600, \
                                        115200}
index 741f71fc1653d176a2c5d51b1c5508900e1d667c..0a03cd5860482e02693b17c1e1541ac0622a5814 100644 (file)
  * Hardware drivers
  */
 #define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_CLK         48000000
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
-#define CONFIG_SYS_NS16550_CLK         48000000
 #define CONFIG_SYS_NS16550_COM3                UART3_BASE
 #else
-#define CONFIG_OMAP_SERIAL
+#define CONFIG_NS16550_SERIAL
 #endif
 #define CONFIG_CONS_INDEX              3
 
index 5acbc92c3f60923c18348191dfec99992bebf94e..be1f4c14b8f9446d3b6e9a0b29b137d0e762bacf 100644 (file)
  * Hardware drivers
  */
 #define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_CLK         48000000
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
-#define CONFIG_SYS_NS16550_CLK         48000000
 #else
-#define CONFIG_OMAP_SERIAL
+#define CONFIG_NS16550_SERIAL
 #endif
 
 /*