[PATCH] i2c: mvtwsi: Swab the register address if its size is > 1

Heiko Schocher hs at denx.de
Mon Dec 20 08:03:23 CET 2021

Hello Marek,

On 18.12.21 23:41, Marek Behún wrote:
> On Sat, 18 Dec 2021 14:42:51 +0100
> Stefan Roese <sr at denx.de> wrote:
>> Hi Heiko,
>> On 11/18/21 09:18, Stefan Roese wrote:
>>> Testing on Armada XP with an EEPROM using register address with size
>>> of 2 has shown, that the register address bytes are sent to the I2C
>>> EEPROM in the incorrect order. This patch swabs the address bytes so
>>> that the correct address is transferred to the I2C device.
>>> BTW: This worked without any issues before migrating Armada XP to
>>> DM I2C.
>>> Signed-off-by: Stefan Roese <sr at denx.de>
>>> Cc: Heiko Schocher <hs at denx.de>
>>> Cc: Samuel Holland <samuel at sholland.org>
>>> Cc: Baruch Siach <baruch at tkos.co.il>
>>> Cc: Pali Rohár <pali at kernel.org>
>>> Cc: Marek Behún <marek.behun at nic.cz>
>>> ---
>>> It would be good if other users of this I2C driver could test this change
>>> with e.g. I2C EEPROM devices using 2 bytes (or more) for addressing.  
>> Could you and other please take a look at this? Would be great, if this
>> could be pulled in the next merge window.
> Tested-by: Marek Behún <marek.behun at nic.cz>

Thanks for testing. Just triggered azure build now,
if all works fine, I send a pull request to Tom.

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de

More information about the U-Boot mailing list