summaryrefslogtreecommitdiff
path: root/src/cpu/amd/agesa/spi.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-24 09:06:03 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-05-26 19:14:38 +0200
commit90a54b087419faf15bef27f5dbd57e79de667f99 (patch)
tree0c2d733c5a01d821e0796bb3082c495ec3411dfa /src/cpu/amd/agesa/spi.c
parent7138ee445c713867edd67c20fef10444f7aea6d1 (diff)
downloadcoreboot-90a54b087419faf15bef27f5dbd57e79de667f99.tar.xz
AGESA: Move S3 related SPI writes again
This is more agesawrapper-related code than CPU. Change-Id: I3058ef965a83aed1972e02f0f566f81d5dbd7adf Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/10295 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Diffstat (limited to 'src/cpu/amd/agesa/spi.c')
-rw-r--r--src/cpu/amd/agesa/spi.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/cpu/amd/agesa/spi.c b/src/cpu/amd/agesa/spi.c
deleted file mode 100644
index 05a29d7e5d..0000000000
--- a/src/cpu/amd/agesa/spi.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2012 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc.
- */
-
-#include <console/console.h>
-#include <spi-generic.h>
-#include <spi_flash.h>
-
-#include "s3_resume.h"
-
-void spi_SaveS3info(u32 pos, u32 size, u8 *buf, u32 len)
-{
- struct spi_flash *flash;
-
- spi_init();
- flash = spi_flash_probe(0, 0);
- if (!flash) {
- printk(BIOS_DEBUG, "Could not find SPI device\n");
- /* Dont make flow stop. */
- return;
- }
-
- flash->spi->rw = SPI_WRITE_FLAG;
- spi_claim_bus(flash->spi);
-
- flash->erase(flash, pos, size);
- flash->write(flash, pos, sizeof(len), &len);
- flash->write(flash, pos + sizeof(len), len, buf);
-
- flash->spi->rw = SPI_WRITE_FLAG;
- spi_release_bus(flash->spi);
-
- return;
-}