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>
diff --git a/programmer.h b/programmer.h
index c61f429..913522b 100644
--- a/programmer.h
+++ b/programmer.h
@@ -102,6 +102,9 @@
#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 @@
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 @@
#if CONFIG_MSTARDDC_SPI == 1
SPI_CONTROLLER_MSTARDDC,
#endif
+#if CONFIG_PICKIT2_SPI == 1
+ SPI_CONTROLLER_PICKIT2,
+#endif
};
#define MAX_DATA_UNSPECIFIED 0