[flashrom] [PATCH] Add pinout for ByteBlaster to rayer_spi.c.
mmcx at mail.ru
mmcx at mail.ru
Tue Mar 5 21:32:24 CET 2013
Thank you.
Subject: [PATCH] Add pinout for Atmel STK200/300 to rayer_spi.c.
Signed-off-by: Maksim Kuleshov <mmcx at mail.ru>
---
rayer_spi.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/rayer_spi.c b/rayer_spi.c
index 488b555..45b0067 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -40,6 +40,8 @@
static void rayer_byteblaster_preinit(void *);
static int rayer_byteblaster_shutdown(void *);
+static void rayer_stk200_preinit(void *);
+static int rayer_stk200_shutdown(void *);
static struct s_rayer_pinout {
const char * name;
@@ -54,6 +56,8 @@ static struct s_rayer_pinout {
{"rayer","RayeR SPIPGM",5,6,7,6},
{"xilinx","Xilinx Parallel Cable III (DLC 5)",2,1,0,4},
{"byteblaster","Altera ByteBlaster",1,0,6,7,rayer_byteblaster_preinit,rayer_byteblaster_shutdown},
+ //url="http://real.kiev.ua/old/avreal/en/adapters.html#STK"
+ {"stk200", "Atmel STK200/300 adapter", 7, 4, 5, 6, rayer_stk200_preinit, rayer_stk200_shutdown},
{0},
};
@@ -212,6 +216,18 @@ static int rayer_byteblaster_shutdown(void * data){
return 0;
}
+static void rayer_stk200_preinit(void *data) {
+ msg_pdbg("stk200_init\n");
+ lpt_outbyte = (1 << 6) ; //clear #EN signals, set LED signal
+ OUTB(lpt_outbyte, lpt_iobase);
+}
+
+static int rayer_stk200_shutdown(void *data) {
+ msg_pdbg("stk200_shutdown\n");
+ lpt_outbyte = (1 << 2) | (1 << 3) ; //set #EN signals, clear LED signal
+ OUTB(lpt_outbyte, lpt_iobase);
+ return 0;
+}
#else
#error PCI port I/O access is not supported on this architecture yet.
#endif
--
1.7.10.4
More information about the flashrom
mailing list