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 38807C43334 for ; Fri, 8 Jul 2022 16:40:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8B186845C8; Fri, 8 Jul 2022 18:39:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="GxqnXvFj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63ACC845C9; Fri, 8 Jul 2022 18:39:29 +0200 (CEST) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 91CB3845C4 for ; Fri, 8 Jul 2022 18:39:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72a.google.com with SMTP id x11so775739qki.1 for ; Fri, 08 Jul 2022 09:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UDVfm9oVKKmYOspzZunxMgbV28AGltgKgpBTa/tTHXw=; b=GxqnXvFjDZZeUt+jINe5cD/qM3cZixPa2zkpc9f6Sj7NGDnSCLqFxZeEwoGH/+6b6h jDSLRLkD6lC2eb+A2yzVvWVVRAPG34ov50FXWql+K0qcyd6XP4HJoWwCe9u4u4AYldZ4 143FKS/OEyHvnLckXBV1MNcyy1XeLdPc9wi20= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UDVfm9oVKKmYOspzZunxMgbV28AGltgKgpBTa/tTHXw=; b=E7HBs3SLFjLq0l5jEuhocl6l9rSi4+zlR055vt4af4PhGGJTm5XZZnZsedu6RuOFXm vdptORirMz52e/e0bE5/1nYS2UH8Zd4tcKJ9y+8Bs8CwfD/ZvEqKQ6Unq05gwTPlP4To AcBjEoyqO2OOOMKTdjM+LykVVwhKgTAVWU2kYhxvtO4SmHMcx6BCYNBGIv4S38WOobgt GJ1xbZHC2zbCAWqr5G4zEyyt2JGlj7FJgXsi63H1CMNevog08iaiPtO9s9qfiH7AzpVy KJ2Bqw7PvmlyW9UP89l8ggnddf6cKS6S9Xpt8FLWWH+VldwYtalUs83URXDHHNJvDm9/ NaXg== X-Gm-Message-State: AJIora/H9sJl8AGRdI0TP2NybXxcdWiQwuZrqjKwDVgliiRplKZNXEr0 Bpt0OlJ+YMkP08dZV7YVPvDSXEuKgNFymw== X-Google-Smtp-Source: AGRyM1srNu/d4hgHDQ98owMdBnWh1pp9Bt3tpTC9ZpzMcvAQqsZGSKoltNz/KAw5lAsNerZVV+z7EA== X-Received: by 2002:a37:d281:0:b0:6af:24c7:a981 with SMTP id f123-20020a37d281000000b006af24c7a981mr3019480qkj.736.1657298364329; Fri, 08 Jul 2022 09:39:24 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id v13-20020a05620a0f0d00b006aedb35d8a1sm35741394qkl.74.2022.07.08.09.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 09:39:23 -0700 (PDT) Date: Fri, 8 Jul 2022 12:39:21 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Stefan Roese , Simon Glass , u-boot@lists.denx.de, Marek =?iso-8859-1?Q?Beh=FAn?= Subject: Re: [PATCH] serial: ns16550: Wait in debug_uart_init until tx buffer is empty Message-ID: <20220708163921.GK1146598@bill-the-cat> References: <20220623121356.4149-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZbdQKWzlKAts+27q" Content-Disposition: inline In-Reply-To: <20220623121356.4149-1-pali@kernel.org> X-Clacks-Overhead: GNU Terry Pratchett 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 --ZbdQKWzlKAts+27q Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 23, 2022 at 02:13:56PM +0200, Pali Roh=E1r wrote: > Commit d293759d55cc ("serial: ns16550: Add support for > SPL_DEBUG_UART_BASE") fixed support for setting correct early debug UART > base address in SPL. >=20 > But after this commit, output from Marvell A385 BootROM is truncated or > lost and not fully present on serial console. >=20 > Debugging this issue showed that BootROM just put bytes into UART HW outp= ut > buffer and does not wait until UART HW transmit all characters. U-Boot > ns16550 early debug is initialized very early and during its initializati= on > is resetting UART HW and flushing remaining transmit buffer (which still > contains BootROM output). >=20 > Fix this issue by waiting in init function prior resetting UART HW until > TxEmpty bit in UART Line Status Register is set. TxEmpty is set when all > remaining bytes from HW buffer are transmitted. >=20 > Signed-off-by: Pali Roh=E1r > Reviewed-by: Stefan Roese Applied to u-boot/next, thanks! --=20 Tom --ZbdQKWzlKAts+27q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLIXbkACgkQFHw5/5Y0 tyynEAwApVFKFr7RZOZLFzjj8D7wJK2sVE4D0kpgc/x35uDzmBoz97tvytHl5qW+ dFERbDi8QimX7ZXq0S+TnDW0eCqYtJMUUOAJDBEbDRsftHqBp0srcCkLj+nWqJin 8x4u4SM3aIwKw8PM7JMgcOo/oSKn5omXfTVfcDK45wwXHoEJ5nn4Aqi+7JXMvhZ9 FoxZKCkMRgzQQHK2taaAscsqYozt/gXD8usOoHbQ1Lro2nbIF5gakU75I+sXtxOj u2j8QxoWfhKZQ2M8A6kfz04HfunIFeIP6EBPPGPKcxSyP4KXtDoVJStlRzB7g3wK jp4eWiVKVqZvepAmGFF6pDrlXz/NVGG0ysedh+CIFl8mNwIuzqy6KYOVSgvA3jbo VV7UYRC5lbBjWgveHmz/DoDAaz2Nk0rgAdMukSJrMpsHLqX62i5ecKKwRprGnvwA DqU6E7QTMt10pHxq+riPestx0skh09l6gY4dhf7LC0tdkYfSXt3vsSYpB5fW74st yZ82ftYr =hLeC -----END PGP SIGNATURE----- --ZbdQKWzlKAts+27q--