~ubuntu-branches/debian/wheezy/flashrom/wheezy

« back to all changes in this revision

Viewing changes to programmer.h

  • Committer: Package Import Robot
  • Author(s): Uwe Hermann
  • Date: 2012-06-29 20:49:55 UTC
  • mfrom: (1.3.17)
  • Revision ID: package-import@ubuntu.com-20120629204955-segsp5ay3ikzuwby
Tags: 0.9.5.2+r1546-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
#if CONFIG_RAYER_SPI == 1
70
70
        PROGRAMMER_RAYER_SPI,
71
71
#endif
 
72
#if CONFIG_PONY_SPI == 1
 
73
        PROGRAMMER_PONY_SPI,
 
74
#endif
72
75
#if CONFIG_NICINTEL == 1
73
76
        PROGRAMMER_NICINTEL,
74
77
#endif
110
113
#if CONFIG_RAYER_SPI == 1
111
114
        BITBANG_SPI_MASTER_RAYER,
112
115
#endif
 
116
#if CONFIG_PONY_SPI == 1
 
117
        BITBANG_SPI_MASTER_PONY,
 
118
#endif
113
119
#if CONFIG_NICINTEL_SPI == 1
114
120
        BITBANG_SPI_MASTER_NICINTEL,
115
121
#endif
240
246
/* board_enable.c */
241
247
void w836xx_ext_enter(uint16_t port);
242
248
void w836xx_ext_leave(uint16_t port);
 
249
void probe_superio_winbond(void);
243
250
int it8705f_write_enable(uint8_t port);
244
251
uint8_t sio_read(uint16_t port, uint8_t reg);
245
252
void sio_write(uint16_t port, uint8_t reg, uint8_t data);
284
291
extern int superio_count;
285
292
#define SUPERIO_VENDOR_NONE     0x0
286
293
#define SUPERIO_VENDOR_ITE      0x1
 
294
#define SUPERIO_VENDOR_WINBOND  0x2
287
295
#endif
288
296
#if NEED_PCI == 1
289
297
struct pci_dev *pci_dev_find_filter(struct pci_filter filter);
430
438
int rayer_spi_init(void);
431
439
#endif
432
440
 
 
441
/* pony_spi.c */
 
442
#if CONFIG_PONY_SPI == 1
 
443
int pony_spi_init(void);
 
444
#endif
 
445
 
433
446
/* bitbang_spi.c */
434
447
int bitbang_spi_init(const struct bitbang_spi_master *master);
435
448
 
492
505
#if CONFIG_DEDIPROG == 1
493
506
        SPI_CONTROLLER_DEDIPROG,
494
507
#endif
495
 
#if CONFIG_OGP_SPI == 1 || CONFIG_NICINTEL_SPI == 1 || CONFIG_RAYER_SPI == 1 || (CONFIG_INTERNAL == 1 && (defined(__i386__) || defined(__x86_64__)))
 
508
#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__)))
496
509
        SPI_CONTROLLER_BITBANG,
497
510
#endif
498
511
#if CONFIG_LINUX_SPI == 1
517
530
        /* Optimized functions for this programmer */
518
531
        int (*read)(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
519
532
        int (*write_256)(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
 
533
        int (*write_aai)(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
520
534
        const void *data;
521
535
};
522
536
 
525
539
int default_spi_send_multicommand(struct flashctx *flash, struct spi_command *cmds);
526
540
int default_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
527
541
int default_spi_write_256(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
 
542
int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len);
528
543
int register_spi_programmer(const struct spi_programmer *programmer);
529
544
 
530
 
/* ichspi.c */
531
 
#if CONFIG_INTERNAL == 1
 
545
/* The following enum is needed by ich_descriptor_tool and ich* code. */
532
546
enum ich_chipset {
533
547
        CHIPSET_ICH_UNKNOWN,
534
548
        CHIPSET_ICH7 = 7,
537
551
        CHIPSET_ICH10,
538
552
        CHIPSET_5_SERIES_IBEX_PEAK,
539
553
        CHIPSET_6_SERIES_COUGAR_POINT,
540
 
        CHIPSET_7_SERIES_PANTHER_POINT
 
554
        CHIPSET_7_SERIES_PANTHER_POINT,
 
555
        CHIPSET_8_SERIES_LYNX_POINT
541
556
};
542
557
 
 
558
/* ichspi.c */
 
559
#if CONFIG_INTERNAL == 1
543
560
extern uint32_t ichspi_bbar;
544
561
int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,
545
562
                 enum ich_chipset ich_generation);
634
651
int serialport_write(unsigned char *buf, unsigned int writecnt);
635
652
int serialport_read(unsigned char *buf, unsigned int readcnt);
636
653
 
 
654
/* Serial port/pin mapping:
 
655
 
 
656
  1     CD      <-
 
657
  2     RXD     <-
 
658
  3     TXD     ->
 
659
  4     DTR     ->
 
660
  5     GND     --
 
661
  6     DSR     <-
 
662
  7     RTS     ->
 
663
  8     CTS     <-
 
664
  9     RI      <-
 
665
*/
 
666
enum SP_PIN {
 
667
        PIN_CD = 1,
 
668
        PIN_RXD,
 
669
        PIN_TXD,
 
670
        PIN_DTR,
 
671
        PIN_GND,
 
672
        PIN_DSR,
 
673
        PIN_RTS,
 
674
        PIN_CTS,
 
675
        PIN_RI,
 
676
};
 
677
 
 
678
void sp_set_pin(enum SP_PIN pin, int val);
 
679
int sp_get_pin(enum SP_PIN pin);
 
680
 
637
681
#endif                          /* !__PROGRAMMER_H__ */