Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42786 )
Change subject: mb/amd: Add Pollock CRB Cereme as Mandolin variant ......................................................................
Patch Set 21:
(1 comment)
https://review.coreboot.org/c/coreboot/+/42786/21/src/mainboard/amd/mandolin... File src/mainboard/amd/mandolin/variants/cereme/early_gpio.c:
https://review.coreboot.org/c/coreboot/+/42786/21/src/mainboard/amd/mandolin... PS21, Line 4: ../../gpio.h
IMHO, I find the baseboard subdir in `variants/` quite confusing. […]
I look at the baseboard as providing: 1. Common infrastructure that is used by all variants 2. Header files that provide declarations for functions used by variants and common macro definitions used by all variants. 3. Weak function implementations which can be easily overriden by variant if required.
In my opinion, this provides a flexible way for variants to utilize common code at the reference board level while still retaining the ability to override if required and it also removes a lot of duplication that we used to do early on without baseboard/variants.
So, mainboard top level provides support for basic boot flows and callbacks from other common code e.g. SoC, library, drivers, etc. Mainboard top level code then makes a variant_* call to perform some task. Now, this variant_* can either be the default implementation provided by baseboard or something that is variant specific. So, all this implementation whether provided by baseboard/variant all lives under variants/.
But, I would be curious to understand your proposal for "baseboard out of variants".