diff options
author | Maksim Kuleshov <mmcx@mail.ru> | 2013-10-02 01:21:57 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2013-10-02 01:21:57 +0000 |
commit | 3647b2d5ed1843f4a8607e0f2faca8d39c50798a (patch) | |
tree | 88c3c35f7c0742eeb7ebb20a768e57ca08957183 /rayer_spi.c | |
parent | 8b1bdf19b01d6c32155963fbd174673c8b70ce4a (diff) | |
download | ast2050-flashrom-3647b2d5ed1843f4a8607e0f2faca8d39c50798a.zip ast2050-flashrom-3647b2d5ed1843f4a8607e0f2faca8d39c50798a.tar.gz |
rayer_spi: Add pinout for Altera ByteBlasterMV
There is a ByteBlasterII product that is only almost compatible.
Corresponding to flashrom svn r1754.
Signed-off-by: Maksim Kuleshov <mmcx@mail.ru>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: Maksim Kuleshov <mmcx@mail.ru>
Acked-by: Kyösti Mälkki <kyosti.malkki@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 'rayer_spi.c')
-rw-r--r-- | rayer_spi.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/rayer_spi.c b/rayer_spi.c index ed0f774..04edd9c 100644 --- a/rayer_spi.c +++ b/rayer_spi.c @@ -70,9 +70,22 @@ static const struct rayer_pinout xilinx_dlc5 = { .miso_bit = 4, }; +static void byteblaster_preinit(const void *); +static int byteblaster_shutdown(void *); + +static const struct rayer_pinout altera_byteblastermv = { + .cs_bit = 1, + .sck_bit = 0, + .mosi_bit = 6, + .miso_bit = 7, + .preinit = byteblaster_preinit, + .shutdown = byteblaster_shutdown, +}; + static const struct rayer_programmer rayer_spi_types[] = { {"rayer", NT, "RayeR SPIPGM", &rayer_spipgm}, {"xilinx", NT, "Xilinx Parallel Cable III (DLC 5)", &xilinx_dlc5}, + {"byteblastermv", OK, "Altera ByteBlasterMV", &altera_byteblastermv}, {0}, }; @@ -195,6 +208,19 @@ int rayer_spi_init(void) return 0; } +static void byteblaster_preinit(const 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 |