Changeset 1525 for trunk/programmer.h


Ignore:
Timestamp:
May 1, 2012 1:11:06 AM (13 months ago)
Author:
mkarcher
Message:

Add serial port bitbanging code

This adds the pony_spi driver which supports the SI_Prog adapter, which
is commonly used for SPI chips with PonyProg? 2000, and a custom adapter
called "SERBANG" which differs in the logic of two pins.

Signed-off-by: Virgil-Adrian Teaca <darkstarlinux@…>
Acked-by: Michael Karcher <flashrom@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/programmer.h

    r1524 r1525  
    7070        PROGRAMMER_RAYER_SPI, 
    7171#endif 
     72#if CONFIG_PONY_SPI == 1 
     73        PROGRAMMER_PONY_SPI, 
     74#endif 
    7275#if CONFIG_NICINTEL == 1 
    7376        PROGRAMMER_NICINTEL, 
     
    110113#if CONFIG_RAYER_SPI == 1 
    111114        BITBANG_SPI_MASTER_RAYER, 
     115#endif 
     116#if CONFIG_PONY_SPI == 1 
     117        BITBANG_SPI_MASTER_PONY, 
    112118#endif 
    113119#if CONFIG_NICINTEL_SPI == 1 
     
    431437#endif 
    432438 
     439/* pony_spi.c */ 
     440#if CONFIG_PONY_SPI == 1 
     441int pony_spi_init(void); 
     442#endif 
     443 
    433444/* bitbang_spi.c */ 
    434445int bitbang_spi_init(const struct bitbang_spi_master *master); 
     
    493504        SPI_CONTROLLER_DEDIPROG, 
    494505#endif 
    495 #if CONFIG_OGP_SPI == 1 || CONFIG_NICINTEL_SPI == 1 || CONFIG_RAYER_SPI == 1 || (CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__))) 
     506#if CONFIG_OGP_SPI == 1 || CONFIG_NICINTEL_SPI == 1 || CONFIG_RAYER_SPI == 1 || CONFIG_PONY_SPI == 1 || (CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__))) 
    496507        SPI_CONTROLLER_BITBANG, 
    497508#endif 
     
    637648int serialport_read(unsigned char *buf, unsigned int readcnt); 
    638649 
     650/* Serial port/pin mapping: 
     651 
     652  1     CD      <- 
     653  2     RXD     <- 
     654  3     TXD     -> 
     655  4     DTR     -> 
     656  5     GND     -- 
     657  6     DSR     <- 
     658  7     RTS     -> 
     659  8     CTS     <- 
     660  9     RI      <- 
     661*/ 
     662enum SP_PIN { 
     663        PIN_CD = 1, 
     664        PIN_RXD, 
     665        PIN_TXD, 
     666        PIN_DTR, 
     667        PIN_GND, 
     668        PIN_DSR, 
     669        PIN_RTS, 
     670        PIN_CTS, 
     671        PIN_RI, 
     672}; 
     673 
     674void sp_set_pin(enum SP_PIN pin, int val); 
     675int sp_get_pin(enum SP_PIN pin); 
     676 
    639677#endif                          /* !__PROGRAMMER_H__ */ 
Note: See TracChangeset for help on using the changeset viewer.