Attention is currently required from: Roger Lu, Yu-Ping Wu, Yuchen Huang. Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46878 )
Change subject: soc/mediatek/mt8192: add clkbuf and srclken_rc MT6359P driver ......................................................................
Patch Set 59:
(6 comments)
Patchset:
PS59: Thanks for refactoring, much easier to read now. Just a few nits!
File src/soc/mediatek/mt8192/clkbuf.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/34e1f3cf_5c28d857 PS59, Line 15: #define PMIC_REG_MASK 0xFFFF : #define PMIC_REG_SHIFT 0 not used any more?
https://review.coreboot.org/c/coreboot/+/46878/comment/a6d033de_a20c8a6a PS59, Line 121: / one blank line before this comment
File src/soc/mediatek/mt8192/include/soc/clkbuf.h:
https://review.coreboot.org/c/coreboot/+/46878/comment/80fb740a_1b1e267f PS59, Line 7: #define _BUF_BF_MASK(name) \ : (_BF_MASK(name, 0) >> name##_BITFIELD_SHIFT) : #define BUF_READ_FIELDS(addr, name) \ : (buf_read_field(addr, _BUF_BF_MASK(name), name##_BITFIELD_SHIFT)) : #define BUF_WRITE_FIELDS(addr, value, name) \ : (buf_write_field(addr, value, _BUF_BF_MASK(name), name##_BITFIELD_SHIFT)) : 1. I think we'll only use these APIs in clkbuf.c? It's probably better to move it there since it'll be pretty 'local'.
2. I think it's easier to read if we do BUF_WRITE_FIELDS(addr, name, value) instead of (addr, value, name).
3. The 'read' can return only one value so it should be named READ_FIELD.
File src/soc/mediatek/mt8192/pmif.c:
https://review.coreboot.org/c/coreboot/+/46878/comment/72971bd3_0ac9f0a8 PS59, Line 218: break one blank line after break
https://review.coreboot.org/c/coreboot/+/46878/comment/73499f8c_498d0a5b PS59, Line 248: break one blank line after break