u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Neha Malcom Francis <n-francis@ti.com>
Cc: u-boot@lists.denx.de, nm@ti.com, matwey.kornilov@gmail.com,
	robertcnelson@gmail.com, vigneshr@ti.com
Subject: Re: [PATCH v2] board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte
Date: Tue, 13 Dec 2022 11:42:05 -0500	[thread overview]
Message-ID: <20221213164205.GD3787616@bill-the-cat> (raw)
In-Reply-To: <20221213062734.10930-1-n-francis@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]

On Tue, Dec 13, 2022 at 11:57:34AM +0530, Neha Malcom Francis wrote:

> EEPROM detection logic in ti_i2c_eeprom_get() involves figuring out
> whether addressing is 1-byte or 2-byte. There are currently different
> behaviours seen across boards as documented in commit bf6376642fe8
> ("board: ti: common: board_detect: Fix EEPROM read quirk"). Adding to
> the list, we see that there are 2-byte EEPROMs that read properly
> with 1-byte addressing with no offset.
> 
> For ti_i2c_eeprom_am6_get where eeprom parse operation is dynamic, the
> earlier commit d2ab2a2bafd5 ("board: ti: common: board_detect: Fix
> EEPROM read quirk for AM6 style data") tried to resolve this by running
> ti_i2c_eeprom_get() twice. However this commit along with its former
> commit fails on J7 platforms where EEPROM successfully return back the
> header on 1-byte addressing and continues to do so until an offset is
> introduced. So the second read incorrectly determines the EEPROM as
> 1-byte addressing.
> 
> A more generic solution is introduced here to solve
> this issue: 1-byte read without offset and 1-byte read with offset. If
> both passes, it follows 1-byte addressing else we proceed with 2-byte
> addressing check.
> 
> Tested on J721E, J7200, DRA7xx, AM64x
> 
> Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
> Fixes: d2ab2a2bafd5 (board: ti: common: board_detect: Fix EEPROM read quirk for AM6 style data)
> Fixes: bf6376642fe8 (board: ti: common: board_detect: Fix EEPROM read quirk)

There's not a great choice here between take this now for v2023.01 (when
lots of people are going to be busy and not catch a new possible corner
case) or put this in -next and have it be in v2023.04 (as places might
pick v2023.01 to base on for a while). But, I'm leaning towards putting
this in -next since it should be easy to cherry-pick this as needed.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-12-13 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  6:27 [PATCH v2] board: ti: common: board_detect: Fix EEPROM read quirk for 2-byte Neha Malcom Francis
2022-12-13 16:42 ` Tom Rini [this message]
2022-12-17 14:04 ` Matwey V. Kornilov
2023-01-03 15:42 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221213164205.GD3787616@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=matwey.kornilov@gmail.com \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=robertcnelson@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).