Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/22716
Change subject: soc/amd/common: Rename spi.c and add prototype ......................................................................
soc/amd/common: Rename spi.c and add prototype
The common/spi.c file contains a function for storing S3 data into flash during POST. In preparation for supporting S3, rename the file and add a prototype for the one function. Also change its build dependency to CONFIG_HAVE_ACPI_RESUME. This will be the only mechanism for supporting S3 in subsequent patches.
BUG=b:69930455
Change-Id: I6545ac1c0a04202af63be269d88c091121358bc9 Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/soc/amd/common/Makefile.inc R src/soc/amd/common/s3_resume.c A src/soc/amd/common/s3_resume.h 3 files changed, 22 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/22716/1
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc index aa27512..926262c 100644 --- a/src/soc/amd/common/Makefile.inc +++ b/src/soc/amd/common/Makefile.inc @@ -15,7 +15,7 @@ ramstage-y += amd_pci_util.c ramstage-y += def_callouts.c ramstage-y += heapmanager.c -ramstage-$(CONFIG_SPI_FLASH) += spi.c +ramstage-$(CONFIG_HAVE_ACPI_RESUME) += s3_resume.c
subdirs-$(CONFIG_SOC_AMD_COMMON_BLOCK) += block
diff --git a/src/soc/amd/common/spi.c b/src/soc/amd/common/s3_resume.c similarity index 100% rename from src/soc/amd/common/spi.c rename to src/soc/amd/common/s3_resume.c diff --git a/src/soc/amd/common/s3_resume.h b/src/soc/amd/common/s3_resume.h new file mode 100644 index 0000000..39a0712 --- /dev/null +++ b/src/soc/amd/common/s3_resume.h @@ -0,0 +1,21 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2011-2017 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __S3_RESUME_H__ +#define __S3_RESUME_H__ + +void spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len); + +#endif /* __S3_RESUME_H__ */