summaryrefslogtreecommitdiffstats
path: root/programmer.h
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2011-09-03 18:37:52 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2011-09-03 18:37:52 +0000
commit34833ba1cf934d5e33cd0d5c5eb77a4ca7a0a06f (patch)
tree8e0e42a7177fb3a56c5d269c42b9034a92b82793 /programmer.h
parent839e5ab37905dadb4951f10462ad2d2194002418 (diff)
downloadflashrom-34833ba1cf934d5e33cd0d5c5eb77a4ca7a0a06f.zip
flashrom-34833ba1cf934d5e33cd0d5c5eb77a4ca7a0a06f.tar.gz
Add support for the Linux SPI subsystem (spidev)
See http://www.kernel.org/doc/Documentation/spi/spidev for an introduction. Usage is as follows: flashrom -p linux_spi:dev=/dev/spidevX.Y where X is the bus number, and Y device. It accepts an optional parameter 'speed' which allows to set the SPI clock speed in kHz. Tested on an Atmel AVR32AP7000 board (NGW100 Network Gateway Kit), see below, which was used to program a ThinkPad X60, but it should work on every other Linux system, too. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4102) Corresponding to flashrom svn r1427. Signed-off-by: Sven Schnelle <svens@stackframe.org> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'programmer.h')
-rw-r--r--programmer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/programmer.h b/programmer.h
index 20e0f17..f878a53 100644
--- a/programmer.h
+++ b/programmer.h
@@ -79,6 +79,9 @@ enum programmer {
#if CONFIG_SATAMV == 1
PROGRAMMER_SATAMV,
#endif
+#if CONFIG_LINUX_SPI == 1
+ PROGRAMMER_LINUX_SPI,
+#endif
PROGRAMMER_INVALID /* This must always be the last entry. */
};
@@ -485,6 +488,11 @@ int bitbang_spi_shutdown(const struct bitbang_spi_master *master);
int buspirate_spi_init(void);
#endif
+/* linux_spi.c */
+#if CONFIG_LINUX_SPI == 1
+int linux_spi_init(void);
+#endif
+
/* dediprog.c */
#if CONFIG_DEDIPROG == 1
int dediprog_init(void);
@@ -536,6 +544,9 @@ enum spi_controller {
#if CONFIG_OGP_SPI == 1 || CONFIG_NICINTEL_SPI == 1 || CONFIG_RAYER_SPI == 1 || (CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__)))
SPI_CONTROLLER_BITBANG,
#endif
+#if CONFIG_LINUX_SPI == 1
+ SPI_CONTROLLER_LINUX,
+#endif
};
extern const int spi_programmer_count;
OpenPOWER on IntegriCloud