Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31358 )
Change subject: mb/google/hatch: Use MEM_CH_SEL to indicate single_channel sku ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/#/c/31358/3/src/mainboard/google/hatch/romstage.... File src/mainboard/google/hatch/romstage.c:
https://review.coreboot.org/#/c/31358/3/src/mainboard/google/hatch/romstage.... PS3, Line 22: struct static
https://review.coreboot.org/#/c/31358/3/src/mainboard/google/hatch/romstage.... PS3, Line 24: const static
https://review.coreboot.org/#/c/31358/3/src/mainboard/google/hatch/variants/... File src/mainboard/google/hatch/variants/baseboard/memory.c:
https://review.coreboot.org/#/c/31358/3/src/mainboard/google/hatch/variants/... PS3, Line 22: : : : : : : : : : : : : : : : : : : : :
Making the struct non-const results in the error that I mentioned before: […]
Aah yes!
We can probably do:
void __weak variant_memory_params(struct cnl_mb_cfg *bcfg) { memcpy(bcfg, &baseboard_memcfg, sizeof(baseboard_memcfg)); if (gpio_get(GPP_F2)) bcfg.single_channel = 1; }
That way you don't have to split the above structure and do individual copies.