Attention is currently required from: Hung-Te Lin, Xi Chen, Yidi Lin.
Yu-Ping Wu has posted comments on this change by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/84222?usp=email )
Change subject: soc/mediatek: Remove redundant struct pad_func and PAD_* definitions ......................................................................
Patch Set 3:
(4 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/84222/comment/84f07b76_15ccfd26?usp... : PS3, Line 10: micros macros
File src/soc/mediatek/common/include/soc/gpio_common.h:
https://review.coreboot.org/c/coreboot/+/84222/comment/c2d2c89e_3734f1c7?usp... : PS3, Line 53: struct pad_func { : gpio_t gpio; : u8 func; : enum pull_select select; : };
An alternative is adding a struct pad_func to soc/gpio.h for mt8173 and moving struct pad_func to gpio_defs.h
That doesn't seem good. The `pad_func` struct is referenced in flash_controller_common.h, which is needed for mt8173 and other SoCs, so that struct definition should be able to be referenced by all of these SoCs.
I don't actually have a good solution here. So, how about going back to your PS1 by moving the `PAD_FUNC*` macros here and leaving gpio_defs.h unmodified? Sorry, I didn't realize this is that complicated.
File src/soc/mediatek/common/include/soc/gpio_defs.h:
https://review.coreboot.org/c/coreboot/+/84222/comment/d11d644d_c5427514?usp... : PS3, Line 45:
The compiler will raise `error: initializer element is not constant`.
Okay, fine. I don't know why.
File src/soc/mediatek/mt8183/i2c.c:
https://review.coreboot.org/c/coreboot/+/84222/comment/a9fb17bc_c69fd78b?usp... : PS3, Line 56: PAD_FUNC If the common `PAD_FUNC` is moved back to gpio_common.h, then this should be removed, right?