From 547872b4ea74b821caec03f9ae6498f4a3e82443 Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Mon, 28 Sep 2009 13:15:16 +0000 Subject: This is the bitbanging SPI driver infrastructure If you want support for a particular piece of hardware, just fill in a few functions in spi_bitbang_master_table. That's it. On top of this, the RayeR SPI flasher should be supportable in ~20 LOC. Tested, trace looks OK. Corresponding to flashrom svn r736. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann --- flashrom.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 77c5e39..7eb4962 100644 --- a/flashrom.c +++ b/flashrom.c @@ -693,6 +693,12 @@ int main(int argc, char *argv[]) fprintf(stderr, "SPI programmer table miscompilation!\n"); exit(1); } +#if BITBANG_SPI_SUPPORT == 1 + if (spi_bitbang_master_count - 1 != SPI_BITBANG_INVALID) { + fprintf(stderr, "Bitbanging SPI master table miscompilation!\n"); + exit(1); + } +#endif setbuf(stdout, NULL); while ((opt = getopt_long(argc, argv, optstring, -- cgit v1.1