From 90021f28ff6cb97c53aeb18667addefb43c706e3 Mon Sep 17 00:00:00 2001 From: Mark Marshall Date: Fri, 3 Dec 2010 14:48:11 +0000 Subject: Add support for the Open Graphics Project development card, OGD1, as a SPI flash programmer The project is in the the process of designing and making a complete, open source, graphics card. More info at http://wiki.opengraphics.org. The first development card is a PCI add in card containing a couple of FPGAs and a couple of serial flash chips (amongst other things). The FPGAs are called XP10 and S3 (their part numbers). The XP10 contains its own flash and does not need to be programmed by flashrom - it ensures that the device can enumerate on the PCI bus without needing further configuration. The larger FPGA is the S3. This is configured from a large SPI flash (2 MBytes). The second SPI flash is used to store the VGA BIOS. It is smaller (128 KBytes). This patch adds support for programming either of the two SPI flash chips. The programmer device takes one configuration option which selects which of the two flash chips is accessed. This must be set to either "cprom" or "bprom". (The project refers to the two chips as "cprom" / "bprom", "s3" and "bios" are more readable alternatives). Add support for SST SST25VF010 (REMS). Mark SST SST25VF016B as tested for write. Corresponding to flashrom svn r1241. Signed-off-by: Mark Marshall Acked-by: Carl-Daniel Hailfinger --- spi.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spi.c') diff --git a/spi.c b/spi.c index 3df7458..7d76120 100644 --- a/spi.c +++ b/spi.c @@ -146,6 +146,15 @@ const struct spi_programmer spi_programmer[] = { }, #endif +#if CONFIG_OGP_SPI == 1 + { /* SPI_CONTROLLER_OGP */ + .command = bitbang_spi_send_command, + .multicommand = default_spi_send_multicommand, + .read = bitbang_spi_read, + .write_256 = bitbang_spi_write_256, + }, +#endif + {}, /* This entry corresponds to SPI_CONTROLLER_INVALID. */ }; -- cgit v1.1