]> git.sur5r.net Git - u-boot/commitdiff
serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI option
authorMichal Simek <michal.simek@xilinx.com>
Tue, 22 Jan 2013 23:40:06 +0000 (23:40 +0000)
committerTom Rini <trini@ti.com>
Mon, 4 Feb 2013 14:14:21 +0000 (09:14 -0500)
CONFIG_ARM_DCC_MULTI should be also removed in the patch
"serial: Remove CONFIG_SERIAL_MULTI from serial drivers"
(sha1: a3827250606895ec2dd4b8d867342b7cabf3692f)
Because the driver defines serial_* functions
which cause conflict with serial.c (multiple definition of serial_*)

Removing CONFIG_SERIAL_MULTI function also require to define
default_serial_console for cases where another serial driver
is not available in the system.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Marek Vasut <marex@denx.de>
common/stdio.c
drivers/serial/arm_dcc.c
include/stdio_dev.h

index 97ff9cf4a6a49f533f90240e9469bd4063986a11..5d5117c0ed838195a2caad7c28c128247771cd92 100644 (file)
@@ -207,7 +207,7 @@ int stdio_init (void)
        /* Initialize the list */
        INIT_LIST_HEAD(&(devs.list));
 
-#ifdef CONFIG_ARM_DCC_MULTI
+#ifdef CONFIG_ARM_DCC
        drv_arm_dcc_init ();
 #endif
 #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
index 7b5ecb5132d0de3bd5c508448579caea717104e0..812dcf0787c03591c9722c6b8bfa224dff99c659 100644 (file)
 
 #define TIMEOUT_COUNT 0x4000000
 
-#ifndef CONFIG_ARM_DCC_MULTI
-#define arm_dcc_init serial_init
-void serial_setbrg(void) {}
-#define arm_dcc_getc serial_getc
-#define arm_dcc_putc serial_putc
-#define arm_dcc_puts serial_puts
-#define arm_dcc_tstc serial_tstc
-#endif
-
 int arm_dcc_init(void)
 {
        return 0;
@@ -147,7 +138,6 @@ int arm_dcc_tstc(void)
        return reg;
 }
 
-#ifdef CONFIG_ARM_DCC_MULTI
 static struct stdio_dev arm_dcc_dev;
 
 int drv_arm_dcc_init(void)
@@ -167,4 +157,8 @@ int drv_arm_dcc_init(void)
 
        return stdio_register(&arm_dcc_dev);
 }
-#endif
+
+__weak struct serial_device *default_serial_console(void)
+{
+       return NULL;
+}
index 932d093345e59ade1c175b13fe677dfdcee935dc..9451740e8be4a51071a8e6aa4c94f45d1815ded9 100644 (file)
@@ -99,7 +99,7 @@ struct list_head* stdio_get_list(void);
 struct stdio_dev* stdio_get_by_name(const char* name);
 struct stdio_dev* stdio_clone(struct stdio_dev *dev);
 
-#ifdef CONFIG_ARM_DCC_MULTI
+#ifdef CONFIG_ARM_DCC
 int drv_arm_dcc_init(void);
 #endif
 #ifdef CONFIG_LCD