Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46234 )
Change subject: mb/google/volteer: Source Memory strap GPIOs from variant ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46234/3/src/mainboard/google/voltee... File src/mainboard/google/volteer/variants/halvor/include/variant/gpio.h:
https://review.coreboot.org/c/coreboot/+/46234/3/src/mainboard/google/voltee... PS3, Line 13: #define GPIO_MEM_CONFIG_0 GPP_C12 : #define GPIO_MEM_CONFIG_1 GPP_C15 : #define GPIO_MEM_CONFIG_2 GPP_C14 : #define GPIO_MEM_CONFIG_3 GPP_D15 I think instead of making a copy of GPIO_MEM_CONFIG_* in every variant/gpio.h, it would be better to make use of the weak/strong implementation of variant_memory_sku():
variants/baseboard/memory.c:
int __weak variant_memory_sku(void) { » gpio_t spd_gpios[] = { » » GPP_C12, » » GPP_C15, » » GPP_C14, » » GPP_D15, » };
» return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios)); }
i.e. replace the use of GPIO_MEM_CONFIG_* with actual GPIOs and the variant/ that uses a different GPIO combination can provide its own strong implementation.