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 D47F7C38A2D for ; Tue, 25 Oct 2022 22:19:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E06C684F1A; Wed, 26 Oct 2022 00:19:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1666736346; bh=E4XAMS5YaeAjcnH954Wf4bFNND16q8eqOi+kjb3TLco=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BOjpDLUB2fbi1k3QYV2y1Iddlw+KgGK+mFUHd72L+w1dzGCuifB7CHyebzmPDhVo/ KJQZvIJ52ROzIq3ZBPtPloUhJGBJ37bmik/zGYkHMv2ORO4I3rT4A+atBUoa5D6Mes B14pD9JzPJuNqwsOzvScmITbKrvzGVnFr4USUZ7vhnUlSWAnmcd4X9GMt67uq+RQYc TOiy2ud1P26XQq3BaMQwwVTAP25N9WfNX1ZX6NDld9COw+OxU8YeGLJb0xzu440Cz5 WnxtaphALSicLljtO9TGQuvvq+4XvTkKFCg9Y2O0R9fsC2z/BKNaRZzRYRHynKkwid 4Wq6io/j5CGxw== Received: from mail.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: festevam@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id A763583E65; Wed, 26 Oct 2022 00:19:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1666736341; bh=E4XAMS5YaeAjcnH954Wf4bFNND16q8eqOi+kjb3TLco=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bg7SjKaUDl8Z87eyQAYwbfDNJEyGuzifAwAbkU0lafAfIRiHKVeSYgpsyKmMyUXXB P6I15MMA2hC03FNpbrp726/YtkodWuDl/cF79axiX1bg4kaBOqpG7Q4Pvo8xA215QT AixsI+iFTH8j4omC00xYL3nLWZEyqd0F55yox0vu3T71aS7vk76gysZLj/8xoD9RhK 6xIRRxP6xydcpaVmIORfW1J53ZlgAdKYRP0QHnncoexTyOAdOIrM+M8UL/QGLtY69i LJirWJJoWTjUvBAkkEgUnXbLm+uicQv895Qu9ZyPbybJ9b03M6D8z58kG8XhlzEseH DVj8EFHooTTyw== MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 25 Oct 2022 19:19:01 -0300 From: Fabio Estevam To: Tim Harvey Cc: =?UTF-8?Q?Pali_Roh=C3=A1r?= , Johannes Schneider , u-boot@lists.denx.de, peng.fan@oss.nxp.com, sbabic@denx.de, trini@konsulko.com, bsp-development.geo@leica-geosystems.com, Peng Fan Subject: Re: [PATCH v5 2/2] serial: mxc: have putc use the TXFIFO In-Reply-To: References: <20220906121504.2200171-1-johannes.schneider@leica-geosystems.com> <20220906121504.2200171-3-johannes.schneider@leica-geosystems.com> <20221025202335.k5isd54j6ubhdglu@pali> <4e715158a0c58e2ae42b7748676851ff@denx.de> Message-ID: <4d9e14631817a586e735e7c9f5a86596@denx.de> X-Sender: festevam@denx.de User-Agent: Roundcube Webmail/1.3.6 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.6 at phobos.denx.de X-Virus-Status: Clean Hi Tim, On 25/10/2022 18:37, Tim Harvey wrote: > Fabio and Pali, > > Seems reasonable but this does not resolve the problem. Whatever I > print in board_init gets cutoff by the print from dm_announce. Should we check for both TXFULL and TXEMPTY conditions? --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -311,7 +311,7 @@ static int mxc_serial_putc(struct udevice *dev, const char ch) struct mxc_serial_plat *plat = dev_get_plat(dev); struct mxc_uart *const uart = plat->reg; - if (readl(&uart->ts) & UTS_TXFULL) + if ((readl(&uart->ts) & UTS_TXFULL) || !(readl(&uart->ts) & UTS_TXEMPTY)) return -EAGAIN; writel(ch, &uart->txd);