From patchwork Mon Feb 20 07:33:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hornung X-Patchwork-Id: 142140 X-Patchwork-Delegate: thomas@wytron.com.tw 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 8DE56B6FAA for ; Mon, 20 Feb 2012 19:17:27 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ECD4328088; Mon, 20 Feb 2012 09:17:23 +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 Qwfk5dLgGPsi; Mon, 20 Feb 2012 09:17:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3128F28078; Mon, 20 Feb 2012 09:17:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3A4EE28078 for ; Mon, 20 Feb 2012 08:34:46 +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 MHe-Aqrqzhvy for ; Mon, 20 Feb 2012 08:34:45 +0100 (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-ww0-f52.google.com (mail-ww0-f52.google.com [74.125.82.52]) by theia.denx.de (Postfix) with ESMTPS id A550B28077 for ; Mon, 20 Feb 2012 08:34:44 +0100 (CET) Received: by wgbds10 with SMTP id ds10so4869028wgb.9 for ; Sun, 19 Feb 2012 23:34:42 -0800 (PST) Received-SPF: pass (google.com: domain of ahornung@gmail.com designates 10.180.74.177 as permitted sender) client-ip=10.180.74.177; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ahornung@gmail.com designates 10.180.74.177 as permitted sender) smtp.mail=ahornung@gmail.com; dkim=pass header.i=ahornung@gmail.com Received: from mr.google.com ([10.180.74.177]) by 10.180.74.177 with SMTP id u17mr14816196wiv.13.1329723282486 (num_hops = 1); Sun, 19 Feb 2012 23:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=dNXfQy8ZUcYwTeHB/2Yng7y89jnFbcDi6TF8FaKSLsI=; b=O3mxJyc3fDRyzjwCChjbm05ko0T+P7DoEOatACdnEd0hm5q089pZBCQOKPy+I2q+AX zmqB7i1S0mfrqyuqwBqz2zzgJry+toP9n+TySlgdtW8dKBBl8zlKPBR7jxuE0DrV2qDo CePw/cpw33gjmqoVgfPrr8Bkx0J2tEccsGY8Y= Received: by 10.180.74.177 with SMTP id u17mr12327282wiv.13.1329723282450; Sun, 19 Feb 2012 23:34:42 -0800 (PST) Received: from localhost.localdomain (94-192-45-141.zone6.bethere.co.uk. [94.192.45.141]) by mx.google.com with ESMTPS id df3sm982705wib.1.2012.02.19.23.34.41 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Feb 2012 23:34:41 -0800 (PST) From: Alex Hornung To: u-boot@lists.denx.de Date: Mon, 20 Feb 2012 07:33:55 +0000 Message-Id: <1329723235-11978-1-git-send-email-alex@alexhornung.com> X-Mailer: git-send-email 1.7.3.4 X-Mailman-Approved-At: Mon, 20 Feb 2012 09:17:18 +0100 Cc: Alex Hornung Subject: [U-Boot] [PATCH 1/2] nios2-generic: Fix logic around choosing UART 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 * Before, the normal altera UART driver was compiled in unconditionally and the JTAG UART was missed out. * Work around this by conditionalizing the driver to use based on the UART choice in the user's custom FPGA header file. If both were to be present, the JTAG UART would have preference. Signed-off-by: Alex Hornung --- include/configs/nios2-generic.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 9ba35e8..765b169 100644 --- a/include/configs/nios2-generic.h +++ b/include/configs/nios2-generic.h @@ -36,10 +36,11 @@ /* * SERIAL */ -#define CONFIG_ALTERA_UART #if defined(CONFIG_ALTERA_JTAG_UART) +# define CONFIG_ALTERA_JTAG_UART # define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_JTAG_UART_BASE #else +# define CONFIG_ALTERA_UART # define CONFIG_SYS_NIOS_CONSOLE CONFIG_SYS_UART_BASE #endif