summaryrefslogtreecommitdiffstats
path: root/programmer.h
diff options
context:
space:
mode:
authorJustin Chevrier <jchevrier@gmail.com>2015-02-08 21:58:10 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-02-08 21:58:10 +0000
commit66e554bc88a29ec6bc55c86320799c31b5b0e6c1 (patch)
tree597dd6c02ecd223e56d3088682e1c5314409af1f /programmer.h
parent5673450316b0624f3b0a763babdcaf9f13fde12c (diff)
downloadflashrom-66e554bc88a29ec6bc55c86320799c31b5b0e6c1.tar.gz
flashrom-66e554bc88a29ec6bc55c86320799c31b5b0e6c1.tar.bz2
flashrom-66e554bc88a29ec6bc55c86320799c31b5b0e6c1.zip
Add support for the Microchip PICkit2 as an SPI programmer
This patch was inspired by the code in AVRDude (open source Atmel AVR programmer) to support the PICkit2 written by Doug Brown [1]. The Dediprog code in flashrom was used as the template for this code with some reference to the ft2232 code as well. [1] - https://github.com/steve-m/avrdude/blob/master/pickit2.c Corresponding to flashrom svn r1881. Signed-off-by: Justin Chevrier <jchevrier@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
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 c61f42964..913522b2d 100644
--- a/programmer.h
+++ b/programmer.h
@@ -102,6 +102,9 @@ enum programmer {
#if CONFIG_MSTARDDC_SPI == 1
PROGRAMMER_MSTARDDC_SPI,
#endif
+#if CONFIG_PICKIT2_SPI == 1
+ PROGRAMMER_PICKIT2_SPI,
+#endif
PROGRAMMER_INVALID /* This must always be the last entry. */
};
@@ -480,6 +483,11 @@ extern const struct dev_entry devs_usbblasterspi[];
int mstarddc_spi_init(void);
#endif
+/* pickit2_spi.c */
+#if CONFIG_PICKIT2_SPI == 1
+int pickit2_spi_init(void);
+#endif
+
/* rayer_spi.c */
#if CONFIG_RAYER_SPI == 1
int rayer_spi_init(void);
@@ -564,6 +572,9 @@ enum spi_controller {
#if CONFIG_MSTARDDC_SPI == 1
SPI_CONTROLLER_MSTARDDC,
#endif
+#if CONFIG_PICKIT2_SPI == 1
+ SPI_CONTROLLER_PICKIT2,
+#endif
};
#define MAX_DATA_UNSPECIFIED 0