path: root/flashrom.c
diff options
authorMark Marshall <>2010-12-03 14:48:11 +0000
committerCarl-Daniel Hailfinger <>2010-12-03 14:48:11 +0000
commit90021f28ff6cb97c53aeb18667addefb43c706e3 (patch)
tree7ec04388c7b9dbb9796953d6616b855bf451d341 /flashrom.c
parent859f3f0d751e92ec99c79408a4a7789bfb61a514 (diff)
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 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 <>
Diffstat (limited to 'flashrom.c')
1 files changed, 23 insertions, 1 deletions
diff --git a/flashrom.c b/flashrom.c
index 55d4d7b..9ac857e 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -52,7 +52,7 @@ enum programmer programmer = PROGRAMMER_DUMMY;
* if more than one of them is selected. If only one is selected, it is clear
* that the user wants that one to become the default.
#error Please enable either CONFIG_DUMMY or CONFIG_INTERNAL or disable support for all programmers except one.
enum programmer programmer =
@@ -96,6 +96,9 @@ enum programmer programmer =
+#if CONFIG_OGP_SPI == 1
@@ -439,6 +442,25 @@ const struct programmer_entry programmer_table[] = {
+#if CONFIG_OGP_SPI == 1
+ {
+ .name = "ogp_spi",
+ .init = ogp_spi_init,
+ .shutdown = ogp_spi_shutdown,
+ .map_flash_region = fallback_map,
+ .unmap_flash_region = fallback_unmap,
+ .chip_readb = noop_chip_readb,
+ .chip_readw = fallback_chip_readw,
+ .chip_readl = fallback_chip_readl,
+ .chip_readn = fallback_chip_readn,
+ .chip_writeb = noop_chip_writeb,
+ .chip_writew = fallback_chip_writew,
+ .chip_writel = fallback_chip_writel,
+ .chip_writen = fallback_chip_writen,
+ .delay = internal_delay,
+ },
{}, /* This entry corresponds to PROGRAMMER_INVALID. */
OpenPOWER on IntegriCloud