[PATCH qemu] arm: aspeed: Add palmetto and evb EEPROM I2C devices

Joel Stanley joel at jms.id.au
Mon Sep 18 13:26:29 AEST 2017


On Fri, Sep 15, 2017 at 4:55 PM, Cédric Le Goater <clg at kaod.org> wrote:
> On 09/15/2017 08:18 AM, Joel Stanley wrote:
>> Signed-off-by: Joel Stanley <joel at jms.id.au>
>
> We could fill the eeprom_buf with some valid data if needed.



That's a good idea.

When I use this I see the following error:

# pwd
/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c at 1e78a000/1e78a100.i2c-bus
# hexdump -C i2c-0/0-0050/eeprom
hexdump: i2c-0/0-0050/eeprom: Operation timed out
00000000  74 65 73 74 20 64 61 74  61 0a 00 00 00 00 00     |test data......|
0000000f

A strace shows three reads, with the first succeeding and the second
two failing:

# strace hexdump -C i2c-0/0-0050/eeprom
execve("/usr/bin/hexdump", ["hexdump", "-C", "i2c-0/0-0050/eeprom"],
[/* 12 vars */]) = 0
set_tls(0x76fad764, 0x3c, 0x76fac47c, 0x24, 0x76fad698) = 0
set_tid_address(0x76fad6b4)             = 581
getuid32()                              = 0
open("i2c-0/0-0050/eeprom", O_RDONLY|O_LARGEFILE) = 3
dup2(3, 0)                              = 0
close(3)                                = 0
readv(0, [{iov_base="test data\n\0\0\0\0\0", iov_len=15},
{iov_base="", iov_len=1024}], 2) = 15
readv(0, 0x7e898cd4, 2)                 = -1 ETIMEDOUT (Operation timed out)
readv(0, 0x7e898cd4, 2)                 = -1 ETIMEDOUT (Operation timed out)
write(2, "hexdump: i2c-0/0-0050/eeprom: Op"..., 50hexdump:
i2c-0/0-0050/eeprom: Operation timed out
) = 50
ioctl(1, TIOCGWINSZ, {ws_row=0, ws_col=0, ws_xpixel=0, ws_ypixel=0}) = 0
writev(1, [{iov_base="00000000  74 65 73 74 20 64 61 7"...,
iov_len=76}, {iov_base="|\n", iov_len=2}], 200000000  74 65 73 74 20
64 61 74  61 0a 00 00 00 00 00     |test data......|
) = 78
writev(1, [{iov_base="0000000f", iov_len=8}, {iov_base="\n",
iov_len=1}], 20000000f
) = 9
exit_group(0)                           = ?
+++ exited with 0 +++

Any ideas there?

Cheers,

Joel


More information about the openbmc mailing list