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 4E516C433FE for ; Wed, 30 Nov 2022 15:47:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9B54685359; Wed, 30 Nov 2022 16:47:06 +0100 (CET) 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="KjKMeVWk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB92585362; Wed, 30 Nov 2022 16:47:04 +0100 (CET) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 4313D85358 for ; Wed, 30 Nov 2022 16:47:02 +0100 (CET) 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-ed1-x534.google.com with SMTP id b8so24568911edf.11 for ; Wed, 30 Nov 2022 07:47:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=F2777jaUA1YNzvO1RwSfFgPFXi5T2KP3Wdihh5C2v+0=; b=KjKMeVWkxZnXe8cbDV0uuv4dYWRhEKV3gTO1mDmDsh61H17aCq0REUKErylMuvmy0M aaZCJUEK7iBHapbFxGllxefNLxXdCDwHGYFEDOVbJNDwKQwKxoqO1c+0lKM29X0lkmvb Q+6umYxP+qNeGdI3M2hh0XLWSRdn5dQyHx2g4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=F2777jaUA1YNzvO1RwSfFgPFXi5T2KP3Wdihh5C2v+0=; b=r5bLaTcfyyDPDm4ywwuGTejD4nxAsi8v9jKfR9N0eBS28R7lDvCIzvtS9Ucx23DUzk Z38IG/oI7guX+F0FNFll/aQYS7q/OpEtF4QEgZYFJnatq/eWspfQ+9M0/jts14adTd5r 5Mzyk7ubs0RhUmjQ5qcbGUQ0p/mAM54G9W+XFIT+PHmxTHcDBsQwBG5zp9lB4Yad310Z i7kobpKnB6QiArSLYGD5iBB/Fws/vGi0WqgjxNi2AOARf7l+jyLnX+Kk/bixS102s0Is UwfR3pRm6D8FjcsbkkyIMzdms7uHg5Mgzw+QJ2Id8Xtugv/p0oCNJLq0EzUUPp9iYq3f 0//Q== X-Gm-Message-State: ANoB5pkU0l2EWaEJg7Ab/xGldSdV0czVTHixTLwXVDX2/swcEaBTTfJZ zTXKoXWU3lj6Ja44gBInn/KncQ== X-Google-Smtp-Source: AA0mqf4r9iGN0BfaKQErWCaEUA5WxC3Z8+OUKfGujZBMMpwiEfBoghNk4txdREO3fUq1OBNbjspiuA== X-Received: by 2002:a05:6402:120c:b0:46b:86:20b5 with SMTP id c12-20020a056402120c00b0046b008620b5mr17063926edw.130.1669823221810; Wed, 30 Nov 2022 07:47:01 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-3ce7-df4b-a3b5-c900.res6.spectrum.com. [2603:6081:7b00:6400:3ce7:df4b:a3b5:c900]) by smtp.gmail.com with ESMTPSA id l28-20020a056402345c00b00457b5ba968csm754137edc.27.2022.11.30.07.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 07:47:01 -0800 (PST) Date: Wed, 30 Nov 2022 10:46:57 -0500 From: Tom Rini To: "Matwey V. Kornilov" Cc: Robert Nelson , Neha Malcom Francis , u-boot@lists.denx.de, nm@ti.com, vigneshr@ti.com Subject: Re: [RFC PATCH] board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte Message-ID: <20221130154657.GA3787616@bill-the-cat> References: <20221129065010.123065-1-n-francis@ti.com> <20221129133159.GR3787616@bill-the-cat> <36ecb238-d57f-718f-87a5-4f9dbe0c3fff@ti.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VLIBou5mBM6+kGHE" Content-Disposition: inline In-Reply-To: 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 --VLIBou5mBM6+kGHE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 30, 2022 at 06:38:43PM +0300, Matwey V. Kornilov wrote: > =D1=81=D1=80, 30 =D0=BD=D0=BE=D1=8F=D0=B1. 2022 =D0=B3. =D0=B2 18:36, Rob= ert Nelson : > > > > > >>> Tested on J721E, J7200, DRA7xx, AM64x > > > >> > > > >> I'll try to test this on the AM335x boards I have as soon as possi= ble. > > > > > > > > I wonder if we should re-factor this code a bit and not have a sing= le > > > > ti_i2c_eeprom_get but instead build for whichever sets of quirks a = given > > > > family of boards has with their EEPROMs. I really worry that we're = going > > > > to find that this change here breaks yet another different EEPROM t= han > > > > before. > > > > > > > > > > Yes that does make sense... considering a new behavior of EEPROM keeps > > > showing up. I will try refactoring the logic that way. > > > > Due to part shorages, sadly the BeagleBone AI64 (J721E) has both 1byte > > and 2byte eeproms in user hands today.. > > > > While I think most other previous designs have stuck with one type of > > eeprom throughout their production life. So just one big outlier that > > I personally know of.. >=20 > As was mentioned during the work on bf6376642fe8 ("board: ti: common: > board_detect: Fix EEPROM read quirk"), BeagleBone Black produced by > different companies has different kinds of EEPROMs. I guess at this point before trying to refactor it's worth confirming that we do have the case of boards that aren't still having some part of the family produced, and so we can refactor the code in to "safe for legacy boards" and "can't be sure if it's 1byte or 2byte". And then if it's worth doing the split anyhow, sigh. --=20 Tom --VLIBou5mBM6+kGHE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmOHeu4ACgkQFHw5/5Y0 tyzTdwwAt8PjshaEpUi9AP+/EghirqXezz184gyuI4cKXhvZQm2W1TLSQo4wW7+3 3ju+ZJ+k9eQu+V5lk7wxYHB97ORklc2iYOlQmqG7Oed8XwAX/CQRKewE6+gZ4Z92 IM0+diTAJzKzRkNhIz/3KKDaba/oxYO2k6w4WxoahYvd9tS/uyjRiHskfBiF+6wz COwsAPQhM8AYOuIXI+A61PeIJr+JqKLHZsj9Xk2vHRrOJBT7X6vI17WC3Zemcses 3Rsx9AeZUKhwsp+2JlYVGV5cGBE1YZjqn9zPOP8r4ftncfjc/BQ59PU16ZgJGq9G U8HSHXUTL6+M68YfS/wHHyznRoS252iACZYj4Itnoc87oOtB+nJQnum/Fk5o2uo+ 0gpZkR4awAX5bZef8dNRaiy8pDFuvH40Emee21ZGAcW+KhUDZxwAXYHL97TxtmCQ jxUuHjecRYrI/b9ohJ1/1CQOaAwOpuFYBtdvQSibdmrkM65OYlIc/wyk7P5y1d33 R4eY85Pu =Dfyv -----END PGP SIGNATURE----- --VLIBou5mBM6+kGHE--