[flashrom] [PATCH 3/5] rayer_spi: Add pinout for Altera ByteBlasterMV
Kyösti Mälkki
kyosti.malkki at gmail.com
Mon Apr 1 23:55:58 CEST 2013
From: "mmcx at mail.ru" <mmcx at mail.ru>
Renamed type to byteblastermv after receiving Tested-by.
There is ByteBlasterII product that is only almost compatible.
Signed-off-by: Maksim Kuleshov <mmcx at mail.ru>
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
Tested-by: Maksim Kuleshov <mmcx at mail.ru>
Acked-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
rayer_spi.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/rayer_spi.c b/rayer_spi.c
index 28e8c9c..28336c6 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_byteblastermv = {
+ .cs_bit = 1,
+ .sck_bit = 0,
+ .mosi_bit = 6,
+ .miso_bit = 7,
+ .preinit = byteblaster_preinit,
+ .shutdown = byteblaster_shutdown,
+};
+
static 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},
+ {"byteblastermv", OK, "Altera ByteBlasterMV", &altera_byteblastermv},
{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
More information about the flashrom
mailing list