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 CAABFC433EF for ; Thu, 7 Jul 2022 01:58:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1F07E84594; Thu, 7 Jul 2022 03:56:28 +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="UEm6jV8i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 580B584596; Thu, 7 Jul 2022 03:56:26 +0200 (CEST) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (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 DE97484593 for ; Thu, 7 Jul 2022 03:56:23 +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-qt1-x82e.google.com with SMTP id g14so20861266qto.9 for ; Wed, 06 Jul 2022 18:56:23 -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=yBRdKSPjZIpUD65NQRkiDwMnpYmxtrL5IWafoCEit8g=; b=UEm6jV8iCogT66gFz9UncKnNObZrqCBubMd8RMUy44p7KH5uTN7tg9txBCIr1hjKIY 7JWu8AlryAtGEYJ3BaqCMMdApj6HjfKxKa/x9cnSg7hw73oH8GYz5Nn8wTTO+lmtaH2I 6CXLyMHZ6m6SQkeCTua5l/eFDhp0u8vcWK7qc= 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=yBRdKSPjZIpUD65NQRkiDwMnpYmxtrL5IWafoCEit8g=; b=Fwdnxib7PqjM+AeCRukSzJf6c0V8cxR9jRKQU9qP9gjc+NkG6efnN/LAZJCuRLRMZU nABEqg0lgLfz/luY8ZIhRMUFNrlAl682HH7j3dtL6tkXr5fr+8uTXLGBY6+LP47N7z2G UjqivTuQwmAKihJtXl4aGJdqEwO5HsdLDPgTa7mbt3dzv03HwwqTQDMx4yyUAJm9+9OW 984IED3seBxmysNjXH9avcWFweb03Wvb3K5RIFCL+hz1ld8Ta1qPVEN+miuXBmneFcDY 0df9cQ/BLhXkE6DsnQJlCA2PAlgUSpzOWFGGscH1Iuzt75nhhXx332IZJ4dPWOcnZZA5 niLA== X-Gm-Message-State: AJIora+V2vm15fxOAq8cQvxApFtWitDEaORVCP55lj4g0tIoXrPROJds IVrQlYrbwHfKkKh4Qe7CS5RASEe1YoTqTg== X-Google-Smtp-Source: AGRyM1uSTYZ6z5k+eCqMitJRCKVY1dPcOZSx3DukNZ4QvfysQlXNic3OdmHqd2u+3vdf7wH0NE4adQ== X-Received: by 2002:a0c:b35b:0:b0:472:f2f2:99df with SMTP id a27-20020a0cb35b000000b00472f2f299dfmr16143493qvf.114.1657158983544; Wed, 06 Jul 2022 18:56:23 -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 w29-20020a05620a0e9d00b006a684c87f4bsm251233qkm.68.2022.07.06.18.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 18:56:22 -0700 (PDT) Date: Wed, 6 Jul 2022 21:56:20 -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: <20220707015620.GX1146598@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="QD/24sTm4v1mEEvu" 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.6 at phobos.denx.de X-Virus-Status: Clean --QD/24sTm4v1mEEvu 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 Applied to u-boot/next, thanks! --=20 Tom --QD/24sTm4v1mEEvu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLGPUQACgkQFHw5/5Y0 tyy5fQwAk03nnYuMsV07PG1ipoFiQuXm4PeBDiVuotcuy0OZ2nPKzVjCPwV2SJdk f3vGO13mv9ZHLut80mAJBeA70RDY3pHCk4Dc3Y3wZEEbYbFZt9lJjwqHbOHTnVY0 34UAgQkwotCUoXWcYzdaTJgDwCMtSsxLm2H/3e3/fvJSEKWDdbWaYTnDa7R8fyC9 DjiymRLSXyJODlWX4KH2fUNOh7AVCRrpX9SPPHvwi5HhNLoAzzINQJqHjg6VYpiq PhllZ6MOUP79Aj4PpBb+jzrriEepFb3q6cTeLQ7ZFbq9Tqk07CXX5VTsiSfCFSYW QpG/xI4oeX4upO2vZX9pRCmYCYcNTTEoEDgGL5AX7P+08IWqmXJZbBgBE3HOjfsU 3DplJAK1XwvNnSqCnFKJ27JO7mvApIqIC4UzKCVvkUhsWmMsqCtSvqoTOKOVUmSe 2RYbBkHs5DHR1t8kQFejtrfrGB5qp3NoUl190/eG1V5MW5+61ZJ2oOn9S+PhuEgG pKvWrrWp =EXGI -----END PGP SIGNATURE----- --QD/24sTm4v1mEEvu--