Matt DeVillier has uploaded a new patch set (#14) to the change originally created by Nicola Corna. ( https://review.coreboot.org/c/coreboot/+/21107 )
Change subject: sb,soc/intel: Fix flashconsole on older architectures ......................................................................
sb,soc/intel: Fix flashconsole on older architectures
Building coreboot with CONSOLE_SPI_FLASH on Sandybridge (and others) fails with the following errors:
build/romstage/drivers/spi/spi-generic.o: In function `spi_setup_slave': src/drivers/spi/spi-generic.c:119: undefined reference to `spi_ctrlr_bus_map' src/drivers/spi/spi-generic.c:121: undefined reference to `spi_ctrlr_bus_map_count' src/drivers/spi/spi-generic.c:124: undefined reference to `spi_ctrlr_bus_map'
This is due to the fact that sb/intel/common/spi.c is currently not built in romstage, but drivers/spi/spi-generic.c requires it.
In this commit sb/intel/common/spi.c is adapted to the romstage and it is added to it.
The qemu-q35 mainboard also had to have the LAPIC_MONOTONIC_TIMER config selected because its southbridge now selects the common/spi which selects SPI_FLASH, and the drivers/spi/spi_flash.c uses timer_monotonic_get. Other boards will usually have the LAPIC_MONOTONIC_TIMER config enabled from their northbridge, but qemu-q35 has no config for a northbridge, so it had to be added manually for compilation to succeed.
In this commit, the broadwell monotonic_timer was also modified to be simpler and not reset to 0 at every stage (based on a now deprecated/removed change in the skylake implementation).
Change-Id: Ifd3e8621fa4cb349b7e0e07118cab0380f24ff55 Signed-off-by: Nicola Corna nicola@corna.info Signed-off-by: Youness Alaoui youness.alaoui@puri.sm Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/mainboard/emulation/qemu-q35/Kconfig M src/soc/intel/baytrail/Makefile.inc M src/soc/intel/baytrail/spi.c M src/soc/intel/braswell/Makefile.inc M src/soc/intel/braswell/spi.c M src/soc/intel/broadwell/Makefile.inc M src/soc/intel/broadwell/monotonic_timer.c M src/soc/intel/broadwell/spi.c M src/soc/intel/fsp_baytrail/Makefile.inc M src/soc/intel/fsp_baytrail/spi.c M src/southbridge/intel/common/spi.c M src/southbridge/intel/i82801ix/Kconfig 12 files changed, 213 insertions(+), 206 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/21107/14