Changeset 691 for trunk/spi.c


Ignore:
Timestamp:
Aug 19, 2009, 3:27:58 PM (5 years ago)
Author:
hailfinger
Message:

If FT2232H SPI is not enabled, it should be compiled out completely. We
can't remove ft2232_spi.o from unconditional OBJS yet due to our
makefile structure (make features), but this patch adds #ifdefs around
all FT2232H code, so the net effect is the same.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Acked-by: Stefan Reinauer <stepan@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/spi.c

    r673 r691  
    8383        }, 
    8484 
     85#if FT2232_SPI_SUPPORT == 1 
    8586        { /* SPI_CONTROLLER_FT2232 */ 
    8687                .command = ft2232_spi_send_command, 
     
    8990                .write_256 = ft2232_spi_write_256, 
    9091        }, 
     92#endif 
    9193 
    9294        { /* SPI_CONTROLLER_DUMMY */ 
     
    9698                .write_256 = NULL, 
    9799        }, 
     100 
     101        {}, /* This entry corresponds to SPI_CONTROLLER_INVALID. */ 
    98102}; 
    99103 
     104const int spi_programmer_count = ARRAY_SIZE(spi_programmer); 
    100105 
    101106int spi_send_command(unsigned int writecnt, unsigned int readcnt, 
     
    294299        case SPI_CONTROLLER_SB600: 
    295300        case SPI_CONTROLLER_WBSIO: 
     301#if FT2232_SPI_SUPPORT == 1 
    296302        case SPI_CONTROLLER_FT2232: 
     303#endif 
    297304        case SPI_CONTROLLER_DUMMY: 
    298305                return probe_spi_rdid_generic(flash, 4); 
Note: See TracChangeset for help on using the changeset viewer.