From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A19A4C433EF for ; Fri, 6 May 2022 09:06:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F299E83EB7; Fri, 6 May 2022 11:06:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Lfh858mb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 29CD783AB7; Fri, 6 May 2022 11:05:50 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6F568839E6 for ; Fri, 6 May 2022 11:05:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91FB36207D; Fri, 6 May 2022 09:05:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9255C385AF; Fri, 6 May 2022 09:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651827934; bh=VYQps1AHauLzVFnHOJMpQJvFC2zCdLhXI4Q5QLtzM5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lfh858mbMa7ibA0UHMdW/8MDPiL9Vv7RQMA6YbNu/MzZsJNx4zm/wySxnxm9NyoUs +VMwGcPWrsgfuMr1dakOJuyjR9kTcE4l+gJ6w2W3RfQJ17QRBxpiJqiSiaUVxvOtpq gS/9OIoVcd/HwWgG/8R+Z9rTwfH8444df3U8zVx7S+/oquueDmTzdHZFtNRPJdUfmf 3HHvGsLrG+FEg8s2mFrWsnjQCNOny/a+AOtc4tjIYwcobs/0HcLK7Z/XreSMj7qVmU +3fLtCoqtfAqE+1RqZEbUpibaF4DE7qZUOsMRdeLQEg6fH6ecNLWyy+43jt9fQo3kz KqNbctBXaSCBw== Received: by pali.im (Postfix) id 823631141; Fri, 6 May 2022 11:05:33 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Marek Behun Cc: u-boot@lists.denx.de Subject: [PATCH 4/5] serial: ns16550: Add support for SPL_DEBUG_UART_BASE Date: Fri, 6 May 2022 11:05:16 +0200 Message-Id: <20220506090517.5935-5-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220506090517.5935-1-pali@kernel.org> References: <20220506090517.5935-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Use CONFIG_VAL(DEBUG_UART_BASE) instead of CONFIG_DEBUG_UART_BASE, so proper config value (CONFIG_DEBUG_UART_BASE or CONFIG_SPL_DEBUG_UART_BASE) is used based on building target. Signed-off-by: Pali Rohár --- drivers/serial/ns16550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index a4220fd0ae2f..78bfe6281ce3 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -325,7 +325,7 @@ int ns16550_tstc(struct ns16550 *com_port) static inline void _debug_uart_init(void) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; + struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); int baud_divisor; /* @@ -360,7 +360,7 @@ static inline int NS16550_read_baud_divisor(struct ns16550 *com_port) static inline void _debug_uart_putc(int ch) { - struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE; + struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE); while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) { #ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED -- 2.20.1