SPI: re-init SMM SPI driver after lockdown

If the driver is initialized before the lockdown then it will
fail to work after the lockdown bit is set.

Change-Id: Idc05d33d8d726bf29cb3c9b1b4604522bd64170a
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: http://review.coreboot.org/1745
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Duncan Laurie 2012-09-09 20:12:32 -07:00 committed by Stefan Reinauer
parent 8e7d7fd4bf
commit 312ee0ca70
1 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include <arch/romcc_io.h>
#include <northbridge/intel/sandybridge/pcie_config.c>
#include "pch.h"
#include "spi.h"
void intel_pch_finalize_smm(void)
{
@ -34,6 +35,11 @@ void intel_pch_finalize_smm(void)
/* Lock SPIBAR */
RCBA32_OR(0x3804, (1 << 15));
#if CONFIG_SPI_FLASH_SMM
/* Re-init SPI driver to handle locked BAR */
spi_init();
#endif
/* TCLOCKDN: TC Lockdown */
RCBA32_OR(0x0050, (1 << 31));