Add AT24Cxx I2C EEPROM device model
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 661021052fba1fed3d9d872b47ae050c5593ebfc.1361565596.git.jan.kiszka@siemens.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Andreas Färber
Quoted 1 line
+static int
at24_init(I2CSlave *i2c)hw/i2c.c:i2c_slave_qdev_init() calls
I2CSlaveClass::initonly, so please use a realize function instead. Cf.hw/qdev-core.h.
Quoted 11 lines
Review
Quoted 9 lines
(quoted diff) +9
-0+{ + AT24State *s = DO_UPCAST(AT24State, i2c, i2c); + unsigned int page_size; + int64_t image_size; + int device_bits; + int hi_addr_bits; + int dev_no; + + assert(AT24_MAX_PAGE_LEN <= BDRV_SECTOR_SIZE);This should instead do
error_setg(errp, "...")then.
I just noticed with my latest code that the messages set via error_setg do not make it to the terminal when initializing the device from the command line. Known issue?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux