Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34385 )
Change subject: drivers/i2c/dw: Don't try to generate unselected speeds in ACPI table ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/c/coreboot/+/34385/2/src/drivers/i2c/designware/... File src/drivers/i2c/designware/dw_i2c.c:
https://review.coreboot.org/c/coreboot/+/34385/2/src/drivers/i2c/designware/... PS2, Line 853: for (i = 0; i < DW_I2C_SPEED_CONFIG_COUNT; i++)
Do we need the loop at all?
That's fair...
https://review.coreboot.org/c/coreboot/+/34385/2/src/drivers/i2c/designware/... PS2, Line 854: bcfg->speed
What happens when bcfg->speed is not set? Do we need a default in that case?
Since it comes from the device-tree, and they are static structures, it will be assigned as zero by default. It seems like I2C_SPEED_STANDARD would be the safe default (every I2C device has to support that speed). I'll check for zero and use I2C_SPEED_STANDARD in that case.