Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33355 )
Change subject: mediatek/mt8183: Support RTC in ramstage ......................................................................
Patch Set 2: Code-Review+2
@jwerner do we prefer to add such rules in soc folder, or simply do that in board folder?
Not sure what you mean? This is correct. src/soc/... files should be referenced by the src/soc/.../Makefile (and this one already has these for romstage, this patch is just expanding that to ramstage).
If we had an optional SoC driver that only some boards need, we'd still have the rules in the SoC Makefile and maybe add an option in src/soc/.../Kconfig to guard it which gets selected by the mainboard. But that would only be necessary if you really have a need to exclude the code on some boards... most of the time it's just providing some functions that will simply be garbage collected if the mainboard code doesn't call them.