From patchwork Wed Jan 23 09:40:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 214865 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2A68F2C0084 for ; Wed, 23 Jan 2013 20:46:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5F55D4A09E; Wed, 23 Jan 2013 10:46:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RV00LajjP-1p; Wed, 23 Jan 2013 10:46:40 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B5FEF4A0B5; Wed, 23 Jan 2013 10:46:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 977654A0BE for ; Wed, 23 Jan 2013 10:46:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ooJjUis0z9iU for ; Wed, 23 Jan 2013 10:46:24 +0100 (CET) X-Greylist: delayed 363 seconds by postgrey-1.27 at theia; Wed, 23 Jan 2013 10:46:21 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by theia.denx.de (Postfix) with ESMTPS id 784BA4A0B5 for ; Wed, 23 Jan 2013 10:46:21 +0100 (CET) Received: by mail-wi0-f178.google.com with SMTP id hn3so515188wib.17 for ; Wed, 23 Jan 2013 01:46:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=U8Cb6SW+PNXzGp92j7tV4Vkj3Nn57YOYirozEkpGors=; b=B4b5V0clPzqzUAikpVFYxhTKcMIBlqy48Gk2et6LHVwbOjpV0+j6EUAlrFGsxXxJx/ 7YSn5RmE7Oi8Xv98hd9rCbWEh7V+ikM6rfbtTgUFCYgcT/wjx4QaNnJQhBn0eTP0/y81 entfZ6hSHpMq52swsjxvexJSB106okvevZlfeciTW3yqyLK36pSAHECKsvGcVXWwCMBk 2ERBXmU5VAV8xvaWez6b574J8dsdFirUgSHn8jcGp34WFwGiA2IrZasDraUdpokiCUk0 OposoCBHRYRVtKgIHOdrJgY9s5nCI/hbqqF3uIQnhP1hdjVkehnAoK2ntuft/mgDB2qo t7gQ== X-Received: by 10.180.75.208 with SMTP id e16mr26278519wiw.3.1358934015576; Wed, 23 Jan 2013 01:40:15 -0800 (PST) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPS id df2sm25942958wib.0.2013.01.23.01.40.13 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 23 Jan 2013 01:40:14 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Wed, 23 Jan 2013 10:40:06 +0100 Message-Id: <1358934007-14928-2-git-send-email-michal.simek@xilinx.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1358934007-14928-1-git-send-email-michal.simek@xilinx.com> References: <1358934007-14928-1-git-send-email-michal.simek@xilinx.com> X-Gm-Message-State: ALoCoQl3ZQjYLS1XyePvQDmqaymUC+zc+VTjt5lnYHfxsDJRpkHI7cZAyHz7dwwZNWvfK8MCVPp/ Cc: marex@denx.de Subject: [U-Boot] [PATCH 1/2] serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI option X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Acked-by: Marek Vasut --- Error log: serial.o: In function `serial_init': /mnt/projects/u-boot/drivers/serial/serial.c:402: multiple definition of `serial_init' arm_dcc.o:/mnt/projects/u-boot/drivers/serial/arm_dcc.c:104: first defined here serial.o: In function `serial_setbrg': /mnt/projects/u-boot/drivers/serial/serial.c:417: multiple definition of `serial_setbrg' arm_dcc.o:/mnt/projects/u-boot/drivers/serial/arm_dcc.c:94: first defined here serial.o: In function `serial_getc': /mnt/projects/u-boot/drivers/serial/serial.c:433: multiple definition of `serial_getc' arm_dcc.o:/mnt/projects/u-boot/drivers/serial/arm_dcc.c:112: first defined here serial.o: In function `serial_tstc': /mnt/projects/u-boot/drivers/serial/serial.c:448: multiple definition of `serial_tstc' arm_dcc.o:/mnt/projects/u-boot/drivers/serial/arm_dcc.c:145: first defined here serial.o: In function `serial_putc': /mnt/projects/u-boot/drivers/serial/serial.c:464: multiple definition of `serial_putc' arm_dcc.o:/mnt/projects/u-boot/drivers/serial/arm_dcc.c:124: first defined here serial.o: In function `serial_puts': /mnt/projects/u-boot/drivers/serial/serial.c:482: multiple definition of `serial_puts' arm_dcc.o:/mnt/projects/u-boot/drivers/serial/arm_dcc.c:136: first defined here The second error log: /mnt/projects/u-boot/drivers/serial/serial.c:374: undefined reference to `default_serial_console' drivers/serial/libserial.o: In function `serial_initialize': --- common/stdio.c | 2 +- drivers/serial/arm_dcc.c | 16 +++++----------- include/stdio_dev.h | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/common/stdio.c b/common/stdio.c index 97ff9cf..5d5117c 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -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) diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c index 7b5ecb5..812dcf0 100644 --- a/drivers/serial/arm_dcc.c +++ b/drivers/serial/arm_dcc.c @@ -89,15 +89,6 @@ #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; +} diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 932d093..9451740 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -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