Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30975 )
Change subject: mediatek: Refactor I2C code among similar SOCs ......................................................................
Patch Set 12:
(6 comments)
https://review.coreboot.org/c/coreboot/+/30975/2/src/soc/mediatek/common/i2c... File src/soc/mediatek/common/i2c.c:
https://review.coreboot.org/c/coreboot/+/30975/2/src/soc/mediatek/common/i2c... PS2, Line 195: bus
ok ,I will modify it.
Done
https://review.coreboot.org/c/coreboot/+/30975/2/src/soc/mediatek/common/i2c... PS2, Line 232: uint8_t
ok ,I will modify it.
Done
https://review.coreboot.org/c/coreboot/+/30975/2/src/soc/mediatek/common/i2c... PS2, Line 234: if (left_count >= 2 && : !(seg[0].flags & I2C_M_RD) && : (seg[1].flags & I2C_M_RD) && : seg[0].slave == seg[1].slave) : return 1; : else : return 0;
ok ,I will modify it.
Done
https://review.coreboot.org/c/coreboot/+/30975/11/src/soc/mediatek/common/i2... File src/soc/mediatek/common/i2c.c:
https://review.coreboot.org/c/coreboot/+/30975/11/src/soc/mediatek/common/i2... PS11, Line 41: (
Just feel safer, if you don't feel right, I will get rid of it. Thanks.
Done
https://review.coreboot.org/c/coreboot/+/30975/12/src/soc/mediatek/common/i2... File src/soc/mediatek/common/i2c.c:
https://review.coreboot.org/c/coreboot/+/30975/12/src/soc/mediatek/common/i2... PS12, Line 156: ASYNC_MODE | DMAACK_EN |
Yes, they won't affect i2c transfer when AP_DMA and I2C use the same source clocks.
Ack
https://review.coreboot.org/c/coreboot/+/30975/12/src/soc/mediatek/mt8173/i2... File src/soc/mediatek/mt8173/i2c.c:
https://review.coreboot.org/c/coreboot/+/30975/12/src/soc/mediatek/mt8173/i2... PS12, Line 83: static inline void i2c_dma_reset(struct mt_i2c_dma_regs *dma_regs)
It will be removed to src/soc/mediatek/common/i2c. […]
This is still unresolved.