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 56E12C433EF for ; Sun, 3 Apr 2022 00:22:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49C4583F59; Sun, 3 Apr 2022 02:17:13 +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="jtY/I6pm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EA09983B06; Sun, 3 Apr 2022 02:17:10 +0200 (CEST) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (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 4F77483CCB for ; Sun, 3 Apr 2022 02:17:03 +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-x735.google.com with SMTP id v15so4973614qkg.8 for ; Sat, 02 Apr 2022 17:17:03 -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=9tGZHNrhpdvamIcONITk93V9j1hxdmZ176FMn819zUw=; b=jtY/I6pmgppV6yqBssR+oF9zElu3JX5PRQKZ29rV5Qxhk9VCYRyo0tesLmu4qkh70+ AOi9FxIO8Ip2CRlWBdo4DyKS98cfyOgMUdkOsy/ChdgzxpeRC1ihkDQeufFM775hSRKz R3oh/GWwi7syQxTsEllbXE7s3kwx4tje8YotE= 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=9tGZHNrhpdvamIcONITk93V9j1hxdmZ176FMn819zUw=; b=d5ADc2KP61Sr6mgvQ6wtP4iljnSkKgpdajSB5B8lNsTJVd9+K3go9+UtSPnBEyFXP8 Zp8esXl85Twf3uOwdUWfaC8LoMD8I4rupP21JO7lRXdTE1n+nDfuaE+pzfULJWwZMsV3 nqJVFOWQv0OurxgDZ+FzBmISlgVySMkQXDcd9nWM5treKvkF2UAFJXlnilIuNYwvf+qU Bpzj310D6ii2HqOO+ojhkHj8RFTLCeIPvRPjtgZWgjYPFxxLwJGH4fbF8Wbzu6JDITGC Bu5d1QsE1h4j9zn1up+p3Eh9MVfgD09eC2DDqOJvQVzSKt30LAgoEFSl3IMGf6NLhON8 wF/Q== X-Gm-Message-State: AOAM533XY7naUXsA6bBkWVZXcQHXd4R/rdKh043TPcHyJ5ShSpSi9bXR lHqSN0k3+h5Q1H0FhCEtj4wO/A== X-Google-Smtp-Source: ABdhPJxpUBmSf6dn4ZnmwJroeRsaKt3oX9gMtrdeW+IEi3YyiyWxjtuRpebzBDgjCFKvtA/+FCOZkw== X-Received: by 2002:a05:620a:1794:b0:67f:21a9:ad85 with SMTP id ay20-20020a05620a179400b0067f21a9ad85mr10569302qkb.119.1648945022183; Sat, 02 Apr 2022 17:17:02 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id y12-20020a05622a164c00b002e1e277885esm5072389qtj.8.2022.04.02.17.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 17:17:01 -0700 (PDT) Date: Sat, 2 Apr 2022 20:16:59 -0400 From: Tom Rini To: Sean Anderson Cc: Linus Walleij , Liviu Dudau , Andre Przywara , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH v3 26/29] serial: dm: Add support for puts Message-ID: <20220403001659.GI14476@bill-the-cat> References: <20220322205938.1721846-1-sean.anderson@seco.com> <20220322205938.1721846-27-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+GUUlqgaeopBXFm2" Content-Disposition: inline In-Reply-To: <20220322205938.1721846-27-sean.anderson@seco.com> 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.5 at phobos.denx.de X-Virus-Status: Clean --+GUUlqgaeopBXFm2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 04:59:34PM -0400, Sean Anderson wrote: > Some serial drivers can be vastly more efficient when printing multiple > characters at once. Non-DM serial has had a puts option for these sorts > of drivers; implement it for DM serial as well. >=20 > Because we have to add carriage returns, we can't just pass the whole > string directly to the serial driver. Instead, we print up to the > newline, then print a carriage return, and then continue on. This is > less efficient, but it is better than printing each character > individually. It also avoids having to allocate memory just to add a few > characters. >=20 > Drivers may perform short writes (such as filling a FIFO) and return the > number of characters written in len. We loop over them in the same way > that _serial_putc loops over putc. >=20 > This results in around sizeof(void *) growth for all boards with > DM_SERIAL. The full implementation takes around 140 bytes. >=20 > Signed-off-by: Sean Anderson > Reviewed-by: Simon Glass Applied to u-boot/next, thanks! --=20 Tom --+GUUlqgaeopBXFm2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJI53sACgkQFHw5/5Y0 tyyuTQv+KdDXko6HeYLHUIisVejmwGNyY6+vY52BrbBbBNcUz7ezVnrP2KPP7dm3 UZpjplq1xz1SOZxCQkFJ7BJfeLALrPl37Mt+yqdYIMq7oE3r1fgggsMMSKs2VUPb 5HZlL7fEVxs+eGpwtCjVQDZhFWoE3QKk6uanbV8oF/P053HLOdhUgKME9MTo3h3l jinjuH+aKJvmDcZmnXovuQAU3nAqERCNNu1twF6KikqzMVPzTdGOWYJjZ+BgJDDq JcH3+CbRxjmXopgMAdXL2pDsU0p/sUrvJublhVMzp//7+noWqxElCw02FSTPlE2J wbGoyo0UPO9VTx0SvjhmsUKrpCVoteObhx+4ArhULblPX9DbcYH6xEXDyc7KyM03 rzqhyafsiXe+nDbeiBu9oyeZubLYXziSyeW/WIyqpzH7WPd2J2bbQqpF4F5IEfJq rX9EFmVniFkjBtS4jejc46ChcSbifPUir2oyX7iuAg18HRRQonllXcOueI9UNeRd gNrjsp/y =TLQh -----END PGP SIGNATURE----- --+GUUlqgaeopBXFm2--