mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
i2c: mv_i2c.c: Correct address endianness
0c0f719ad2
accidentally changed the
endianness of the i2c read and write addresses. This was noticable when
accessing EEPROMs that use 2 byte addressing as the LSB was being sent
first.
Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
0b4bc1b3ab
commit
77466267eb
1 changed files with 2 additions and 2 deletions
|
@ -270,7 +270,7 @@ static int __i2c_read(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
|
|||
msg.condition = I2C_COND_NORMAL;
|
||||
msg.acknack = I2C_ACKNAK_WAITACK;
|
||||
msg.direction = I2C_WRITE;
|
||||
msg.data = *(addr++);
|
||||
msg.data = addr[alen];
|
||||
if (i2c_transfer(base, &msg))
|
||||
return -1;
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ static int __i2c_write(struct mv_i2c *base, uchar chip, u8 *addr, int alen,
|
|||
msg.condition = I2C_COND_NORMAL;
|
||||
msg.acknack = I2C_ACKNAK_WAITACK;
|
||||
msg.direction = I2C_WRITE;
|
||||
msg.data = *(addr++);
|
||||
msg.data = addr[alen];
|
||||
if (i2c_transfer(base, &msg))
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue