Frans Hendriks has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33225 )
Change subject: soc/intel/braswell/smbus.c: Add support for i2c mode block write ......................................................................
Patch Set 9:
(2 comments)
https://review.coreboot.org/#/c/33225/9/src/soc/intel/braswell/smbus.c File src/soc/intel/braswell/smbus.c:
https://review.coreboot.org/#/c/33225/9/src/soc/intel/braswell/smbus.c@37 PS9, Line 37: smbus_i2c_block_write(u8 addr, u8 offset, const unsigned int bytes, : const u8 *buf)
I think "int smbus_i2c_block_write(u8 addr, const unsigned int bytes, const u8 *buf)" would be a nic […]
I agree with with having the API clean.
https://review.coreboot.org/#/c/33225/9/src/soc/intel/braswell/smbus.c@57 PS9, Line 57: status = do_smbus_block_write(smbase, addr, offset, bytes, buf);
It would probably be useful to add a bit of documentation here, since the code isn't that obvious. […]
The command byte is not forward in the i2c payload bytes. It is used to 'satisfy' the SMBus controller. For Braswell the i2c stream is <SMBXNITADD> <SMBHSTDAT1> <SMBBLKDAT> ... <SMBBLKDAT>