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 7CDBBC433EF for ; Sat, 18 Jun 2022 17:04:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7B484843D8; Sat, 18 Jun 2022 19:04:21 +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="Uz9zBsLt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4CB03843D8; Sat, 18 Jun 2022 19:04:18 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (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 80A9F843DB for ; Sat, 18 Jun 2022 19:04:14 +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-x72e.google.com with SMTP id o73so5292054qke.7 for ; Sat, 18 Jun 2022 10:04:14 -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=eDfw7ADFT8Z4k1t/YK3Mnki8nAWAir7E0s0WlCVA6s4=; b=Uz9zBsLtMfnHKAz4it0CY8DjBsUCgRH7mQHLdhCMe69QCqUp6D93iVVCHNVGOuZMS7 6cBOtOmzbe2DnvTUTSZ+7x8C6+h2UfcuxVcKQbMG7vhXV7QqiuBVTpHxRd2O0MdmEAuU vp5vXChql1R3esg4JFnapRbCvxGkwyZz5Mb1w= 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=eDfw7ADFT8Z4k1t/YK3Mnki8nAWAir7E0s0WlCVA6s4=; b=48gGE/i2pah3HwdHgEAGXZfVILAbqxa4035xR3fV+B7mLPe/nM+H9qTazrExY7ci9g 0aoqwDt6rkwGOE2iAEhzZZB2yyAZjWzD1GFt6qbNVAtbBGxvi3tW5B6ayoQ1B9+fxpBZ cFxw/YV0q9NSo+kmBA2znQi0Tpfdm9ihF9Fh6Z8CE2veo8N6HaVUE55ElEv79AP/PieK my531B3mEdPIZKXRD8XUoFecoMJdgEvrqrzIKAVOyAqxnvOVO3282XdcchE7u+yX9ndk 8JoUtT2ShuJGbhGHlZKx0/EKHNRD0wpU8gwpkN0EeMxCM5YNHvtiUdj0swaePzPMvgNd JNqw== X-Gm-Message-State: AJIora/S6mNBj/0pHi/xAUYr75nIY7w9qbjvC4IE5Yk0IiRxnwRP8TEm O4x+MaiZYfrOgM8YlhiuRj8HDw== X-Google-Smtp-Source: AGRyM1ueg7an/GV5A+zQjyRWICljoTsWoydH6DJugKn0z7wGHpDp5Yw7sC6mq1YtSmSKT4HLnFiGFA== X-Received: by 2002:a05:620a:2991:b0:6a6:cde5:4f23 with SMTP id r17-20020a05620a299100b006a6cde54f23mr11240501qkp.209.1655571853382; Sat, 18 Jun 2022 10:04:13 -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 y6-20020ae9f406000000b006ab91fd03fasm4401684qkl.19.2022.06.18.10.04.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 10:04:12 -0700 (PDT) Date: Sat, 18 Jun 2022 13:04:10 -0400 From: Tom Rini To: Nishanth Menon Cc: Robert Nelson , gadiyar@ti.com, Praneeth Bajjuri , Jason Kridner , u-boot@lists.denx.de Subject: Re: [PATCH 3/3] board: ti: common: board_detect: Do 1byte address checks first. Message-ID: <20220618170410.GG2484912@bill-the-cat> References: <20220617182612.12575-1-nm@ti.com> <20220617182612.12575-4-nm@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0lgBsWZvwbEqroRZ" Content-Disposition: inline In-Reply-To: <20220617182612.12575-4-nm@ti.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 --0lgBsWZvwbEqroRZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 17, 2022 at 01:26:12PM -0500, Nishanth Menon wrote: > Do 1 byte address checks first prior to doing 2 byte address checks. > When performing 2 byte addressing on 1 byte addressing eeprom, the > second byte is taken in as a write operation and ends up erasing the > eeprom region we want to preserve. >=20 > While we could have theoretically handled this by ensuring the write > protect of the eeproms are properly managed, this is not true in case > where board are updated with 1 byte eeproms to handle supply status. >=20 > Flipping the checks by checking for 1 byte addressing prior to 2 byte > addressing check prevents this problem at the minor cost of additional > overhead for boards with 2 byte addressing eeproms. >=20 > Signed-off-by: Nishanth Menon Reviewed-by: Tom Rini --=20 Tom --0lgBsWZvwbEqroRZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmKuBYoACgkQFHw5/5Y0 tywaEwwAsqt2h+92QPg1pkNZlVVEQJCNZ9V8hdTA/tZ3R8xUHiOKVNDvMau3HByC OdAIHqXxtxZ2+gNSrwuxXcBXpwozNWS/RKk66t7uFVLyloarSIVOvNBEofNLdh1U 5bymOWty57ZxoSeRqz4EVRMPYdfIkth50tAMj9v4RtQF91bpa2p/U92XvpDqIkQ8 0Uy8IEQlyFGS7Jd3h1lPf0rNQTdL3/71qfkpwHR/bWFmh1dtFvW+EwaYbUq0Zz0X 6PSmmJSk+Q80DPB16WGOa6ed4Nz0xh19TjmZu+3V7Px+orB09mPtAZbbZJBLXwlH Bqp+HvHBjfJNh1jvPCExvUzgJehzib+LIEX8+KZCCSZ7oUV9YkOjizTSd0vx0qRn WkvPiL6Gy3a+QM7IZYii3gg7ttwDW8bW/Tm17eNSZJE3c+yocxgYGtP7ZfBi7ySO kZnAKxTrn0P6BDWGrvq/6S5nRV9n1KofQ8ph0hSDDKpKiBSuKnnV8//qczNfuXXn UMQr3ult =LHcQ -----END PGP SIGNATURE----- --0lgBsWZvwbEqroRZ--