]> git.sur5r.net Git - u-boot/commitdiff
serial: drop useless ctlr field
authorMike Frysinger <vapier@gentoo.org>
Fri, 29 Apr 2011 18:03:31 +0000 (18:03 +0000)
committerWolfgang Denk <wd@denx.de>
Tue, 26 Jul 2011 14:38:05 +0000 (16:38 +0200)
The multi serial support has a "ctlr" field which almost no one uses,
but everyone is forced to set to useless strings.  So punt it.

Funny enough, the only code that actually reads this field (the mpc8xx
driver) has a typo where it meant to look for the SCC driver.  Fix it
while converting the check to use the name field.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Heiko Schocher <hs@denx.de>
CC: Anatolij Gustschin <agust@denx.de>
CC: Tom Rix <Tom.Rix@windriver.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
CC: Craig Nauman <cnauman@diagraph.com>
CC: Marek Vasut <marek.vasut@gmail.com>
CC: Prafulla Wadaskar <prafulla@marvell.com>
CC: Mahavir Jain <mjain@marvell.com>
arch/powerpc/cpu/mpc512x/serial.c
arch/powerpc/cpu/mpc5xxx/serial.c
arch/powerpc/cpu/mpc8xx/serial.c
board/logicpd/zoom2/zoom2_serial.h
drivers/serial/serial.c
drivers/serial/serial_pxa.c
drivers/serial/serial_s3c24x0.c
drivers/serial/serial_s5p.c
include/serial.h

index 558e4e2e75b4a617bbda1853ba0b509deac9bebf..5ee9ceff49ac8079a1fdfd542b7848b9b999866f 100644 (file)
@@ -319,9 +319,8 @@ int serial_getcts_dev(unsigned int idx)
                serial_puts_dev(port, s); \
        }
 
-#define INIT_PSC_SERIAL_STRUCTURE(port, name, bus) { \
+#define INIT_PSC_SERIAL_STRUCTURE(port, name) { \
        name, \
-       bus, \
        serial##port##_init, \
        serial##port##_uninit, \
        serial##port##_setbrg, \
@@ -334,25 +333,25 @@ int serial_getcts_dev(unsigned int idx)
 #if defined(CONFIG_SYS_PSC1)
 DECLARE_PSC_SERIAL_FUNCTIONS(1);
 struct serial_device serial1_device =
-INIT_PSC_SERIAL_STRUCTURE(1, "psc1", "UART1");
+INIT_PSC_SERIAL_STRUCTURE(1, "psc1");
 #endif
 
 #if defined(CONFIG_SYS_PSC3)
 DECLARE_PSC_SERIAL_FUNCTIONS(3);
 struct serial_device serial3_device =
-INIT_PSC_SERIAL_STRUCTURE(3, "psc3", "UART3");
+INIT_PSC_SERIAL_STRUCTURE(3, "psc3");
 #endif
 
 #if defined(CONFIG_SYS_PSC4)
 DECLARE_PSC_SERIAL_FUNCTIONS(4);
 struct serial_device serial4_device =
-INIT_PSC_SERIAL_STRUCTURE(4, "psc4", "UART4");
+INIT_PSC_SERIAL_STRUCTURE(4, "psc4");
 #endif
 
 #if defined(CONFIG_SYS_PSC6)
 DECLARE_PSC_SERIAL_FUNCTIONS(6);
 struct serial_device serial6_device =
-INIT_PSC_SERIAL_STRUCTURE(6, "psc6", "UART6");
+INIT_PSC_SERIAL_STRUCTURE(6, "psc6");
 #endif
 
 __weak struct serial_device *default_serial_console(void)
index 0e1a8ec8e971304e0aea5ed40c225a7ac1b54be6..aa09f67ccf3ac2889edb53983382c9203f27438e 100644 (file)
@@ -339,7 +339,6 @@ int serial1_tstc(void)
 struct serial_device serial0_device =
 {
        "serial0",
-       "UART0",
        serial0_init,
        NULL,
        serial0_setbrg,
@@ -357,7 +356,6 @@ __weak struct serial_device *default_serial_console(void)
 struct serial_device serial1_device =
 {
        "serial1",
-       "UART1",
        serial1_init,
        NULL,
        serial1_setbrg,
index 21803f58769cc0862f0d1d9b683661cb1281257a..9239b24d20466f78f18df8b5a5f6bcde778a322a 100644 (file)
@@ -391,7 +391,6 @@ smc_tstc(void)
 struct serial_device serial_smc_device =
 {
        "serial_smc",
-       "SMC",
        smc_init,
        NULL,
        smc_setbrg,
@@ -662,7 +661,6 @@ scc_tstc(void)
 struct serial_device serial_scc_device =
 {
        "serial_scc",
-       "SCC",
        scc_init,
        NULL,
        scc_setbrg,
@@ -702,7 +700,7 @@ kgdb_serial_init(void)
 {
        int i = -1;
 
-       if (strcmp(default_serial_console()->ctlr, "SMC") == 0)
+       if (strcmp(default_serial_console()->name, "serial_smc") == 0)
        {
 #if defined(CONFIG_8xx_CONS_SMC1)
                i = 1;
@@ -710,7 +708,7 @@ kgdb_serial_init(void)
                i = 2;
 #endif
        }
-       else if (strcmp(default_serial_console()->ctlr, "SMC") == 0)
+       else if (strcmp(default_serial_console()->name, "serial_scc") == 0)
        {
 #if defined(CONFIG_8xx_CONS_SCC1)
                i = 1;
@@ -725,7 +723,7 @@ kgdb_serial_init(void)
 
        if (i >= 0)
        {
-               serial_printf("[on %s%d] ", default_serial_console()->ctlr, i);
+               serial_printf("[on %s%d] ", default_serial_console()->name, i);
        }
 }
 
index a6d2427fef028e3ee7d0efbe7d5d07c5495da7cd..4e30587066ca754a35bf7919071ba522820028be 100644 (file)
@@ -33,7 +33,6 @@ extern int zoom2_debug_board_connected (void);
 
 #define S(a) #a
 #define N(a) S(quad##a)
-#define U(a) S(UART##a)
 
 #define QUAD_INIT(n)                           \
 int quad_init_##n(void)                                \
@@ -63,7 +62,6 @@ int quad_tstc_##n(void)                               \
 struct serial_device zoom2_serial_device##n =  \
 {                                              \
        N(n),                                   \
-       U(n),                                   \
        quad_init_##n,                          \
        NULL,                                   \
        quad_setbrg_##n,                        \
index 4afdd414e78f50ba1000cedda3789238d7b435c5..0d56e78c50b3ad63d8e6264f145d2c9644a53b55 100644 (file)
@@ -118,9 +118,8 @@ static NS16550_t serial_ports[4] = {
        serial_puts_dev(port, s);}
 
 /* Serial device descriptor */
-#define INIT_ESERIAL_STRUCTURE(port,name,bus) {\
+#define INIT_ESERIAL_STRUCTURE(port, name) {\
        name,\
-       bus,\
        eserial##port##_init,\
        NULL,\
        eserial##port##_setbrg,\
@@ -326,16 +325,16 @@ serial_setbrg(void)
 
 DECLARE_ESERIAL_FUNCTIONS(1);
 struct serial_device eserial1_device =
-       INIT_ESERIAL_STRUCTURE(1,"eserial0","EUART1");
+       INIT_ESERIAL_STRUCTURE(1, "eserial0");
 DECLARE_ESERIAL_FUNCTIONS(2);
 struct serial_device eserial2_device =
-       INIT_ESERIAL_STRUCTURE(2,"eserial1","EUART2");
+       INIT_ESERIAL_STRUCTURE(2, "eserial1");
 DECLARE_ESERIAL_FUNCTIONS(3);
 struct serial_device eserial3_device =
-       INIT_ESERIAL_STRUCTURE(3,"eserial2","EUART3");
+       INIT_ESERIAL_STRUCTURE(3, "eserial2");
 DECLARE_ESERIAL_FUNCTIONS(4);
 struct serial_device eserial4_device =
-       INIT_ESERIAL_STRUCTURE(4,"eserial3","EUART4");
+       INIT_ESERIAL_STRUCTURE(4, "eserial3");
 
 __weak struct serial_device *default_serial_console(void)
 {
index e4579801f2dde5af9cc9e688a9c1078449f965f1..68469a4f358409673d4882061bd461784ad6906c 100644 (file)
@@ -268,7 +268,6 @@ static int ffuart_tstc(void)
 struct serial_device serial_ffuart_device =
 {
        "serial_ffuart",
-       "PXA",
        ffuart_init,
        NULL,
        ffuart_setbrg,
@@ -313,7 +312,6 @@ static int btuart_tstc(void)
 struct serial_device serial_btuart_device =
 {
        "serial_btuart",
-       "PXA",
        btuart_init,
        NULL,
        btuart_setbrg,
@@ -358,7 +356,6 @@ static int stuart_tstc(void)
 struct serial_device serial_stuart_device =
 {
        "serial_stuart",
-       "PXA",
        stuart_init,
        NULL,
        stuart_setbrg,
index ff35ce595567be4f11656ec7cb1243904f551b6b..12bcdd3dbf68fcac5db97d6d94b33de6d02959d5 100644 (file)
@@ -69,9 +69,8 @@ DECLARE_GLOBAL_DATA_PTR;
                serial_puts_dev(port, s); \
        }
 
-#define INIT_S3C_SERIAL_STRUCTURE(port, name, bus) { \
+#define INIT_S3C_SERIAL_STRUCTURE(port, name) { \
        name, \
-       bus, \
        s3serial##port##_init, \
        NULL,\
        s3serial##port##_setbrg, \
@@ -304,13 +303,13 @@ void serial_puts(const char *s)
 #if defined(CONFIG_SERIAL_MULTI)
 DECLARE_S3C_SERIAL_FUNCTIONS(0);
 struct serial_device s3c24xx_serial0_device =
-INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0", "S3UART1");
+INIT_S3C_SERIAL_STRUCTURE(0, "s3ser0");
 DECLARE_S3C_SERIAL_FUNCTIONS(1);
 struct serial_device s3c24xx_serial1_device =
-INIT_S3C_SERIAL_STRUCTURE(1, "s3ser1", "S3UART2");
+INIT_S3C_SERIAL_STRUCTURE(1, "s3ser1");
 DECLARE_S3C_SERIAL_FUNCTIONS(2);
 struct serial_device s3c24xx_serial2_device =
-INIT_S3C_SERIAL_STRUCTURE(2, "s3ser2", "S3UART3");
+INIT_S3C_SERIAL_STRUCTURE(2, "s3ser2");
 
 __weak struct serial_device *default_serial_console(void)
 {
index 6604aa94a7f56e644b0eed58491ef2e2c7d8a94f..6819bb07b7df717f90aea0027a8c6dcb92103ead 100644 (file)
@@ -183,9 +183,8 @@ int s5p_serial##port##_tstc(void) { return serial_tstc_dev(port); } \
 void s5p_serial##port##_putc(const char c) { serial_putc_dev(c, port); } \
 void s5p_serial##port##_puts(const char *s) { serial_puts_dev(s, port); }
 
-#define INIT_S5P_SERIAL_STRUCTURE(port, name, bus) { \
+#define INIT_S5P_SERIAL_STRUCTURE(port, name) { \
        name, \
-       bus, \
        s5p_serial##port##_init, \
        NULL, \
        s5p_serial##port##_setbrg, \
@@ -196,16 +195,16 @@ void s5p_serial##port##_puts(const char *s) { serial_puts_dev(s, port); }
 
 DECLARE_S5P_SERIAL_FUNCTIONS(0);
 struct serial_device s5p_serial0_device =
-       INIT_S5P_SERIAL_STRUCTURE(0, "s5pser0", "S5PUART0");
+       INIT_S5P_SERIAL_STRUCTURE(0, "s5pser0");
 DECLARE_S5P_SERIAL_FUNCTIONS(1);
 struct serial_device s5p_serial1_device =
-       INIT_S5P_SERIAL_STRUCTURE(1, "s5pser1", "S5PUART1");
+       INIT_S5P_SERIAL_STRUCTURE(1, "s5pser1");
 DECLARE_S5P_SERIAL_FUNCTIONS(2);
 struct serial_device s5p_serial2_device =
-       INIT_S5P_SERIAL_STRUCTURE(2, "s5pser2", "S5PUART2");
+       INIT_S5P_SERIAL_STRUCTURE(2, "s5pser2");
 DECLARE_S5P_SERIAL_FUNCTIONS(3);
 struct serial_device s5p_serial3_device =
-       INIT_S5P_SERIAL_STRUCTURE(3, "s5pser3", "S5PUART3");
+       INIT_S5P_SERIAL_STRUCTURE(3, "s5pser3");
 
 __weak struct serial_device *default_serial_console(void)
 {
index f21d96171f1455a434680db74fb5c08c499441c4..e6d3859bd929dc734b5c9b51eb29fada40c680c9 100644 (file)
@@ -2,11 +2,9 @@
 #define __SERIAL_H__
 
 #define NAMESIZE 16
-#define CTLRSIZE 8
 
 struct serial_device {
        char name[NAMESIZE];
-       char ctlr[CTLRSIZE];
 
        int  (*init) (void);
        int  (*uninit) (void);