From: "[email protected]" <[email protected]>
Signed-off-by: Maksim Kuleshov <[email protected]>
Signed-off-by: Kyösti Mälkki <[email protected]>
---
rayer_spi.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/rayer_spi.c b/rayer_spi.c
index dfa093d..a2338b6 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -84,10 +84,23 @@ static struct rayer_pinout xilinx_dlc5b = {
.shutdown = dlc5b_shutdown,
};
+static void byteblaster_preinit(void *);
+static int byteblaster_shutdown(void *);
+
+static struct rayer_pinout altera_byteblaster = {
+ .cs_bit = 1,
+ .sck_bit = 0,
+ .mosi_bit = 6,
+ .miso_bit = 7,
+ .preinit = byteblaster_preinit,
+ .shutdown = byteblaster_shutdown,
+};
+
struct rayer_programmer rayer_spi_types[] = {
{"rayer", NT, "RayeR SPIPGM",
&rayer_spipgm},
{"xilinx", NT, "Xilinx Parallel Cable III (DLC 5)",
&xilinx_dlc5},
{"dlc-5b", NT, "Xilinx Parallel Cable III (DLC 5) (buffered)",
&xilinx_dlc5b},
+ {"byteblaster", NT, "Altera ByteBlaster",
&altera_byteblaster},
{0},
};
@@ -225,6 +238,19 @@ static int dlc5b_shutdown(void * data) {
return 0;
}
+static void byteblaster_preinit(void * data){
+ msg_pdbg("byteblaster_preinit\n");
+ /* Assert #EN signal. */
+ OUTB(2, lpt_iobase + 2 );
+}
+
+static int byteblaster_shutdown(void * data){
+ msg_pdbg("byteblaster_shutdown\n");
+ /* De-Assert #EN signal. */
+ OUTB(0, lpt_iobase + 2 );
+ return 0;
+}
+
#else
#error PCI port I/O access is not supported on this architecture yet.
#endif
--
1.8.1.1
_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom