From patchwork Fri Jul 19 13:23:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Webb X-Patchwork-Id: 1134062 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arachsys.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45qsC13TQ5z9s3l for ; Fri, 19 Jul 2019 23:23:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 03536C21C27; Fri, 19 Jul 2019 13:23:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 838EFC21C4A; Fri, 19 Jul 2019 13:23:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1ADB5C21E12; Fri, 19 Jul 2019 13:23:14 +0000 (UTC) Received: from cdw.me.uk (cdw.me.uk [91.203.57.136]) by lists.denx.de (Postfix) with ESMTPS id 47FA7C21DD7 for ; Fri, 19 Jul 2019 13:23:14 +0000 (UTC) Received: from chris by delta.arachsys.com with local (Exim 4.80) (envelope-from ) id 1hoSqt-0005SM-2I; Fri, 19 Jul 2019 14:23:11 +0100 Date: Fri, 19 Jul 2019 14:23:11 +0100 From: Chris Webb To: Kever Yang , Philipp Tomsich , Simon Glass Message-ID: <20190719132310.GB20880@arachsys.com> References: <20190719132245.GA20880@arachsys.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190719132245.GA20880@arachsys.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/2] rockchip: Fix TPL build without CONFIG_TPL_SERIAL_SUPPORT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the serial output should be available in SPL and full U-Boot, but not built in TPL. However, the rockchip tpl.c instead fails to compile with undefined references to the debug UART. Instead, initialise the debug UART and print the TPL banner only if both CONFIG_DEBUG_UART and CONFIG_TPL_SERIAL_SUPPORT are set. Signed-off-by: Reviewed-by: Kever Yang --- arch/arm/mach-rockchip/tpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 0ff2a197ed..5df88bddeb 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -44,7 +44,7 @@ void board_init_f(ulong dummy) struct udevice *dev; int ret; -#ifdef CONFIG_DEBUG_UART +#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT) /* * Debug UART can be used from here if required: *