From patchwork Mon Feb 20 07:45:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hornung X-Patchwork-Id: 142142 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 34A67B6FAA for ; Mon, 20 Feb 2012 19:17:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D726828094; Mon, 20 Feb 2012 09:17:38 +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 SHghu-rtqpEL; Mon, 20 Feb 2012 09:17:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2179028085; Mon, 20 Feb 2012 09:17:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7822A28078 for ; Mon, 20 Feb 2012 08:46:10 +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 2Gcar7Y9mzDe for ; Mon, 20 Feb 2012 08:46:09 +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-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by theia.denx.de (Postfix) with ESMTPS id D25AD28077 for ; Mon, 20 Feb 2012 08:46:08 +0100 (CET) Received: by werg1 with SMTP id g1so2059666wer.3 for ; Sun, 19 Feb 2012 23:46:08 -0800 (PST) Received-SPF: pass (google.com: domain of ahornung@gmail.com designates 10.180.107.99 as permitted sender) client-ip=10.180.107.99; Authentication-Results: mr.google.com; spf=pass (google.com: domain of ahornung@gmail.com designates 10.180.107.99 as permitted sender) smtp.mail=ahornung@gmail.com; dkim=pass header.i=ahornung@gmail.com Received: from mr.google.com ([10.180.107.99]) by 10.180.107.99 with SMTP id hb3mr14958135wib.5.1329723968017 (num_hops = 1); Sun, 19 Feb 2012 23:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=H6fIIUiQ5fAJ381PwBEjRdJrS7VvrDTsObnbETYFEGg=; b=xqQPhjZI2b0guBdgpGKKFPXP8Jpht6zCIN3e8PYxC3Rh1xerETtQdiySv84LwzImUV 1uvVEwXqslZLf9jGj5u+C9H1AeoD83jp+v5ZLD8Q46rQea17yj8PuutT+0B3W/8qdRe+ 4QWXCmSy49TfRIRSUB+ZpR9vMaQUDE9dXLt9s= Received: by 10.180.107.99 with SMTP id hb3mr12420625wib.5.1329723967970; Sun, 19 Feb 2012 23:46:07 -0800 (PST) Received: from alex-laptop.local (94-192-45-141.zone6.bethere.co.uk. [94.192.45.141]) by mx.google.com with ESMTPS id y1sm36050803wiw.6.2012.02.19.23.46.07 (version=SSLv3 cipher=OTHER); Sun, 19 Feb 2012 23:46:07 -0800 (PST) Message-ID: <4F41FA1E.3000701@alexhornung.com> Date: Mon, 20 Feb 2012 07:45:34 +0000 From: Alex Hornung User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Alex Hornung References: <1329723235-11978-1-git-send-email-alex@alexhornung.com> In-Reply-To: <1329723235-11978-1-git-send-email-alex@alexhornung.com> X-Mailman-Approved-At: Mon, 20 Feb 2012 09:17:18 +0100 Cc: u-boot@lists.denx.de Subject: Re: [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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de On 20/02/12 07:33, Alex Hornung wrote: > * 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 > I'm sorry, I just messed this one up submitting a previous version that wasn't ready. Below is a new one: From 8d616c75b4e45907d66de057146c7991deb442dc Mon Sep 17 00:00:00 2001 From: Alex Hornung Date: Mon, 20 Feb 2012 07:26:18 +0000 Subject: [PATCH 1/1] nios2-generic: Fix logic around choosing UART * 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 | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h index 9ba35e8..6f4d166 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) +#if defined(CONFIG_SYS_JTAG_UART_BASE) +# 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