Hi guys!
I present a proposal for dealing with the annoying: #include "superio/vendor/model/early_serial.c" present in virtually all romstage.c files.
The steps are as follows: 1) Declare a generic prototype: superio_enable_early_serial(); 2) Remove #include */early_serial.c from romstage 3) add a romstage-$(CONFIG_THIS_SUPERIO) += early_serial.c to the superio's Makefile.inc 4) Include the generic "superio/early_serial.h" definition in romstage.c 5) Include the superio specific header in romstage.c 6) Done
I'm demonstrating this with the fintek/f81865f superio, and the amd/persimmon board. Besides discussion, this patch is also intended for inclusion.
See patch for more details.