[coreboot-gerrit] Change in coreboot[master]: soc/amd/common: Add SPI to SMM
John E. Kabat Jr. (Code Review)
gerrit at coreboot.org
Tue Oct 17 03:25:59 CEST 2017
Hello frank vibrans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/22063
to review the following change.
Change subject: soc/amd/common: Add SPI to SMM
......................................................................
soc/amd/common: Add SPI to SMM
Add existing SPI access to SMM.
Change-Id: Id019fa56570c731dd10a691407f00810d6aa7916
Signed-off-by: Frank Vibrans <frank.vibrans at scarletltd.com>
---
M src/soc/amd/common/block/spi/Makefile.inc
M src/soc/amd/common/block/spi/spi.c
M src/soc/amd/stoneyridge/Kconfig
3 files changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/22063/1
diff --git a/src/soc/amd/common/block/spi/Makefile.inc b/src/soc/amd/common/block/spi/Makefile.inc
index bcb8c9c..f8ead4c 100644
--- a/src/soc/amd/common/block/spi/Makefile.inc
+++ b/src/soc/amd/common/block/spi/Makefile.inc
@@ -1,2 +1,3 @@
romstage-$(CONFIG_SPI_FLASH) += spi.c
ramstage-$(CONFIG_SPI_FLASH) += spi.c
+smm-$(CONFIG_SPI_FLASH) += spi.c
diff --git a/src/soc/amd/common/block/spi/spi.c b/src/soc/amd/common/block/spi/spi.c
index d0fa766..d7b0784 100644
--- a/src/soc/amd/common/block/spi/spi.c
+++ b/src/soc/amd/common/block/spi/spi.c
@@ -158,6 +158,7 @@
return 0;
}
+#if !ENV_SMM
void spi_init(void)
{
device_t dev;
@@ -165,6 +166,7 @@
dev = (device_t)dev_find_slot(0, PCI_DEVFN(SPI_PCI_DEV, SPI_PCI_FN));
spibar = pci_read_config32(dev, SPI_PCI_BASE_ADDR) & ~0x1F;
}
+#endif
static const struct spi_ctrlr spi_ctrlr = {
.xfer = spi_ctrlr_xfer,
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index 31bcebd..57d3e2f 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -57,6 +57,7 @@
select POSTCAR_STAGE
select POSTCAR_CONSOLE
select SPI_FLASH
+ select SPI_FLASH_SMM
select SSE
select SSE2
--
To view, visit https://review.coreboot.org/22063
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id019fa56570c731dd10a691407f00810d6aa7916
Gerrit-Change-Number: 22063
Gerrit-PatchSet: 1
Gerrit-Owner: John E. Kabat Jr. <john.kabat at scarletltd.com>
Gerrit-Reviewer: frank vibrans <frank.vibrans at scarletltd.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20171017/3776cf75/attachment-0001.html>
More information about the coreboot-gerrit
mailing list