<p>Marshall Dawson has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/23305">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">amd/common/s3: Remove legacy spi.c<br><br>Remove the original spi.c file that writes S3 NV data to flash in a<br>proprietary format.  The s3 folder is retained to facilitate new<br>development.<br><br>Change-Id: I1b5fe8e854c3d2dd71506c2acd6ff73e4b86d7d4<br>Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com><br>---<br>D src/soc/amd/common/block/include/amdblocks/spi.h<br>M src/soc/amd/common/block/s3/Makefile.inc<br>D src/soc/amd/common/block/s3/spi.c<br>3 files changed, 0 insertions(+), 64 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/23305/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/soc/amd/common/block/include/amdblocks/spi.h b/src/soc/amd/common/block/include/amdblocks/spi.h</span><br><span>deleted file mode 100644</span><br><span>index 1825f62..0000000</span><br><span>--- a/src/soc/amd/common/block/include/amdblocks/spi.h</span><br><span>+++ /dev/null</span><br><span>@@ -1,23 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * This file is part of the coreboot project.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (C) 2017 Advanced Micro Devices, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(0, 100%, 40%);">- * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(0, 100%, 40%);">- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(0, 100%, 40%);">- * GNU General Public License for more details.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#ifndef __AMD_SPI_H__</span><br><span style="color: hsl(0, 100%, 40%);">-#define __AMD_SPI_H__</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include <stdint.h></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-void spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#endif /* __AMD_SPI_H__ */</span><br><span>diff --git a/src/soc/amd/common/block/s3/Makefile.inc b/src/soc/amd/common/block/s3/Makefile.inc</span><br><span>index f19cb2e..f3dd970 100644</span><br><span>--- a/src/soc/amd/common/block/s3/Makefile.inc</span><br><span>+++ b/src/soc/amd/common/block/s3/Makefile.inc</span><br><span>@@ -1,5 +1,3 @@</span><br><span> ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_S3),y)</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-ramstage-$(CONFIG_HAVE_ACPI_RESUME) += spi.c</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> endif</span><br><span>diff --git a/src/soc/amd/common/block/s3/spi.c b/src/soc/amd/common/block/s3/spi.c</span><br><span>deleted file mode 100644</span><br><span>index f72416a..0000000</span><br><span>--- a/src/soc/amd/common/block/s3/spi.c</span><br><span>+++ /dev/null</span><br><span>@@ -1,39 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * This file is part of the coreboot project.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright (C) 2012 Advanced Micro Devices, Inc.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is free software; you can redistribute it and/or modify</span><br><span style="color: hsl(0, 100%, 40%);">- * it under the terms of the GNU General Public License as published by</span><br><span style="color: hsl(0, 100%, 40%);">- * the Free Software Foundation; version 2 of the License.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * This program is distributed in the hope that it will be useful,</span><br><span style="color: hsl(0, 100%, 40%);">- * but WITHOUT ANY WARRANTY; without even the implied warranty of</span><br><span style="color: hsl(0, 100%, 40%);">- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span><br><span style="color: hsl(0, 100%, 40%);">- * GNU General Public License for more details.</span><br><span style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include <console/console.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <spi-generic.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <spi_flash.h></span><br><span style="color: hsl(0, 100%, 40%);">-#include <amdblocks/spi.h></span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-void spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len)</span><br><span style="color: hsl(0, 100%, 40%);">-{</span><br><span style="color: hsl(0, 100%, 40%);">-    struct spi_flash flash;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">- spi_init();</span><br><span style="color: hsl(0, 100%, 40%);">-     if (spi_flash_probe(0, 0, &flash)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                printk(BIOS_DEBUG, "Could not find SPI device\n");</span><br><span style="color: hsl(0, 100%, 40%);">-            /* Dont make flow stop. */</span><br><span style="color: hsl(0, 100%, 40%);">-              return;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       spi_flash_volatile_group_begin(&flash);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-     spi_flash_erase(&flash, pos, size);</span><br><span style="color: hsl(0, 100%, 40%);">- spi_flash_write(&flash, pos, sizeof(len), &len);</span><br><span style="color: hsl(0, 100%, 40%);">-        spi_flash_write(&flash, pos + sizeof(len), len, buf);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       spi_flash_volatile_group_end(&flash);</span><br><span style="color: hsl(0, 100%, 40%);">-}</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/23305">change 23305</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/23305"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1b5fe8e854c3d2dd71506c2acd6ff73e4b86d7d4 </div>
<div style="display:none"> Gerrit-Change-Number: 23305 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Marshall Dawson <marshalldawson3rd@gmail.com> </div>