Intel common SPI: Fix compilation breakage from refactoring

When the Intel SPI drivers were refactored, compilation for Chrome OS
devices broke, because ELOG uses the SPI driver in SMM.

Change-Id: If2b2da5d526196ed742e17409b01a381417d0ce8
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/8701
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
Stefan Reinauer 2015-03-16 16:50:27 -07:00 committed by Stefan Reinauer
parent 45a225b05d
commit c3d15a7210
1 changed files with 2 additions and 0 deletions

View File

@ -360,6 +360,7 @@ void spi_init(void)
bios_cntl &= ~(1 << 5); bios_cntl &= ~(1 << 5);
pci_write_config_byte(dev, 0xdc, bios_cntl | 0x1); pci_write_config_byte(dev, 0xdc, bios_cntl | 0x1);
} }
#ifndef __SMM__
static void spi_init_cb(void *unused) static void spi_init_cb(void *unused)
{ {
spi_init(); spi_init();
@ -368,6 +369,7 @@ static void spi_init_cb(void *unused)
BOOT_STATE_INIT_ENTRIES(spi_init_bscb) = { BOOT_STATE_INIT_ENTRIES(spi_init_bscb) = {
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, spi_init_cb, NULL), BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, spi_init_cb, NULL),
}; };
#endif
int spi_claim_bus(struct spi_slave *slave) int spi_claim_bus(struct spi_slave *slave)
{ {