Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(996)

Side by Side Diff: programmer.h

Issue 6897014: Do not call EC programmer shutdown functions explicitly. (Closed) Base URL: svn://coreboot.org/flashrom/trunk
Patch Set: rename shutdown() to flashrom_shutdown() to avoid conflict with shutdown(2) Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« mec1308.c ('K') | « mec1308.c ('k') | wpce775x.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the flashrom project. 2 * This file is part of the flashrom project.
3 * 3 *
4 * Copyright (C) 2000 Silicon Integrated System Corporation 4 * Copyright (C) 2000 Silicon Integrated System Corporation
5 * Copyright (C) 2000 Ronald G. Minnich <rminnich@gmail.com> 5 * Copyright (C) 2000 Ronald G. Minnich <rminnich@gmail.com>
6 * Copyright (C) 2005-2009 coresystems GmbH 6 * Copyright (C) 2005-2009 coresystems GmbH
7 * Copyright (C) 2006-2009 Carl-Daniel Hailfinger 7 * Copyright (C) 2006-2009 Carl-Daniel Hailfinger
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by 10 * it under the terms of the GNU General Public License as published by
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 uint8_t (*chip_readb) (const chipaddr addr); 102 uint8_t (*chip_readb) (const chipaddr addr);
103 uint16_t (*chip_readw) (const chipaddr addr); 103 uint16_t (*chip_readw) (const chipaddr addr);
104 uint32_t (*chip_readl) (const chipaddr addr); 104 uint32_t (*chip_readl) (const chipaddr addr);
105 void (*chip_readn) (uint8_t *buf, const chipaddr addr, size_t len); 105 void (*chip_readn) (uint8_t *buf, const chipaddr addr, size_t len);
106 void (*delay) (int usecs); 106 void (*delay) (int usecs);
107 }; 107 };
108 108
109 extern const struct programmer_entry programmer_table[]; 109 extern const struct programmer_entry programmer_table[];
110 110
111 int programmer_init(char *param); 111 int programmer_init(char *param);
112 int programmer_shutdown(void); 112 int flashrom_shutdown(void);
Louis 2011/04/26 10:06:06 hm... I am not sure if renaming is a good idea sin
dhendrix 2011/04/27 02:08:06 agreed -- reverted back to original naming for now
113 113
114 enum bitbang_spi_master_type { 114 enum bitbang_spi_master_type {
115 BITBANG_SPI_INVALID = 0, /* This must always be the first entry. */ 115 BITBANG_SPI_INVALID = 0, /* This must always be the first entry. */
116 #if CONFIG_RAYER_SPI == 1 116 #if CONFIG_RAYER_SPI == 1
117 BITBANG_SPI_MASTER_RAYER, 117 BITBANG_SPI_MASTER_RAYER,
118 #endif 118 #endif
119 #if CONFIG_NICINTEL_SPI == 1 119 #if CONFIG_NICINTEL_SPI == 1
120 BITBANG_SPI_MASTER_NICINTEL, 120 BITBANG_SPI_MASTER_NICINTEL,
121 #endif 121 #endif
122 #if CONFIG_INTERNAL == 1 122 #if CONFIG_INTERNAL == 1
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 uint16_t card_vendor, uint16_t card_device); 284 uint16_t card_vendor, uint16_t card_device);
285 #endif 285 #endif
286 void get_io_perms(void); 286 void get_io_perms(void);
287 void release_io_perms(void); 287 void release_io_perms(void);
288 #if CONFIG_INTERNAL == 1 288 #if CONFIG_INTERNAL == 1
289 extern int is_laptop; 289 extern int is_laptop;
290 extern int force_boardenable; 290 extern int force_boardenable;
291 extern int force_boardmismatch; 291 extern int force_boardmismatch;
292 void probe_superio(void); 292 void probe_superio(void);
293 int internal_init(void); 293 int internal_init(void);
294 int internal_shutdown(void); 294 void internal_shutdown(void *);
295 void internal_chip_writeb(uint8_t val, chipaddr addr); 295 void internal_chip_writeb(uint8_t val, chipaddr addr);
296 void internal_chip_writew(uint16_t val, chipaddr addr); 296 void internal_chip_writew(uint16_t val, chipaddr addr);
297 void internal_chip_writel(uint32_t val, chipaddr addr); 297 void internal_chip_writel(uint32_t val, chipaddr addr);
298 uint8_t internal_chip_readb(const chipaddr addr); 298 uint8_t internal_chip_readb(const chipaddr addr);
299 uint16_t internal_chip_readw(const chipaddr addr); 299 uint16_t internal_chip_readw(const chipaddr addr);
300 uint32_t internal_chip_readl(const chipaddr addr); 300 uint32_t internal_chip_readl(const chipaddr addr);
301 void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len); 301 void internal_chip_readn(uint8_t *buf, const chipaddr addr, size_t len);
302 #endif 302 #endif
303 303
304 /* hwaccess.c */ 304 /* hwaccess.c */
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 int ich_spi_send_command(unsigned int writecnt, unsigned int readcnt, 576 int ich_spi_send_command(unsigned int writecnt, unsigned int readcnt,
577 const unsigned char *writearr, unsigned char *readarr); 577 const unsigned char *writearr, unsigned char *readarr);
578 int ich_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len); 578 int ich_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
579 int ich_spi_write_256(struct flashchip *flash, uint8_t * buf, int start, int len ); 579 int ich_spi_write_256(struct flashchip *flash, uint8_t * buf, int start, int len );
580 int ich_spi_send_multicommand(struct spi_command *cmds); 580 int ich_spi_send_multicommand(struct spi_command *cmds);
581 #endif 581 #endif
582 582
583 /* it85spi.c */ 583 /* it85spi.c */
584 struct superio probe_superio_ite85xx(void); 584 struct superio probe_superio_ite85xx(void);
585 int it85xx_spi_init(void); 585 int it85xx_spi_init(void);
586 int it85xx_shutdown(void);
587 int it85xx_probe_spi_flash(const char *name); 586 int it85xx_probe_spi_flash(const char *name);
588 int it85xx_spi_send_command(unsigned int writecnt, unsigned int readcnt, 587 int it85xx_spi_send_command(unsigned int writecnt, unsigned int readcnt,
589 const unsigned char *writearr, unsigned char *readarr); 588 const unsigned char *writearr, unsigned char *readarr);
590 589
591 /* it87spi.c */ 590 /* it87spi.c */
592 void enter_conf_mode_ite(uint16_t port); 591 void enter_conf_mode_ite(uint16_t port);
593 void exit_conf_mode_ite(uint16_t port); 592 void exit_conf_mode_ite(uint16_t port);
594 struct superio probe_superio_ite(void); 593 struct superio probe_superio_ite(void);
595 int init_superio_ite(void); 594 int init_superio_ite(void);
596 int it87spi_init(void); 595 int it87spi_init(void);
597 int it8716f_spi_send_command(unsigned int writecnt, unsigned int readcnt, 596 int it8716f_spi_send_command(unsigned int writecnt, unsigned int readcnt,
598 const unsigned char *writearr, unsigned char *readarr); 597 const unsigned char *writearr, unsigned char *readarr);
599 int it8716f_spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len); 598 int it8716f_spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len);
600 int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start, int len); 599 int it8716f_spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start, int len);
601 600
602 /* mec1308.c */ 601 /* mec1308.c */
603 struct superio probe_superio_mec1308(void); 602 struct superio probe_superio_mec1308(void);
604 int mec1308_shutdown(void);
605 int mec1308_probe_spi_flash(const char *name); 603 int mec1308_probe_spi_flash(const char *name);
606 int mec1308_spi_read(struct flashchip *flash, 604 int mec1308_spi_read(struct flashchip *flash,
607 uint8_t * buf, int start, int len); 605 uint8_t * buf, int start, int len);
608 int mec1308_spi_write_256(struct flashchip *flash, 606 int mec1308_spi_write_256(struct flashchip *flash,
609 uint8_t *buf, int start, int len); 607 uint8_t *buf, int start, int len);
610 int mec1308_spi_send_command(unsigned int writecnt, unsigned int readcnt, 608 int mec1308_spi_send_command(unsigned int writecnt, unsigned int readcnt,
611 const unsigned char *writearr, 609 const unsigned char *writearr,
612 unsigned char *readarr); 610 unsigned char *readarr);
613 611
614 /* sb600spi.c */ 612 /* sb600spi.c */
(...skipping 23 matching lines...) Expand all
638 636
639 /* serial.c */ 637 /* serial.c */
640 #if _WIN32 638 #if _WIN32
641 typedef HANDLE fdtype; 639 typedef HANDLE fdtype;
642 #else 640 #else
643 typedef int fdtype; 641 typedef int fdtype;
644 #endif 642 #endif
645 643
646 /* wpce775x.c */ 644 /* wpce775x.c */
647 struct superio probe_superio_wpce775x(void); 645 struct superio probe_superio_wpce775x(void);
648 int wpce775x_shutdown(void);
649 int wpce775x_probe_spi_flash(const char *name); 646 int wpce775x_probe_spi_flash(const char *name);
650 int wpce775x_spi_read(struct flashchip *flash, 647 int wpce775x_spi_read(struct flashchip *flash,
651 uint8_t * buf, int start, int len); 648 uint8_t * buf, int start, int len);
652 int wpce775x_spi_write_256(struct flashchip *flash, 649 int wpce775x_spi_write_256(struct flashchip *flash,
653 uint8_t *buf, int start, int len); 650 uint8_t *buf, int start, int len);
654 int wpce775x_spi_send_command(unsigned int writecnt, unsigned int readcnt, 651 int wpce775x_spi_send_command(unsigned int writecnt, unsigned int readcnt,
655 const unsigned char *writearr, 652 const unsigned char *writearr,
656 unsigned char *readarr); 653 unsigned char *readarr);
657 654
658 void sp_flush_incoming(void); 655 void sp_flush_incoming(void);
659 fdtype sp_openserport(char *dev, unsigned int baud); 656 fdtype sp_openserport(char *dev, unsigned int baud);
660 void __attribute__((noreturn)) sp_die(char *msg); 657 void __attribute__((noreturn)) sp_die(char *msg);
661 extern fdtype sp_fd; 658 extern fdtype sp_fd;
662 int serialport_shutdown(void); 659 int serialport_shutdown(void);
663 int serialport_write(unsigned char *buf, unsigned int writecnt); 660 int serialport_write(unsigned char *buf, unsigned int writecnt);
664 int serialport_read(unsigned char *buf, unsigned int readcnt); 661 int serialport_read(unsigned char *buf, unsigned int readcnt);
665 662
666 663
667 /* tegra2_spi.c */ 664 /* tegra2_spi.c */
668 #if CONFIG_INTERNAL == 1 665 #if CONFIG_INTERNAL == 1
669 int tegra2_spi_init(void); 666 int tegra2_spi_init(void);
670 void tegra2_spi_shutdown(void*); 667 void tegra2_spi_shutdown(void*);
671 int tegra2_spi_send_command(unsigned int writecnt, unsigned int readcnt, 668 int tegra2_spi_send_command(unsigned int writecnt, unsigned int readcnt,
672 const unsigned char *writearr, unsigned char *readarr); 669 const unsigned char *writearr, unsigned char *readarr);
673 int tegra2_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len); 670 int tegra2_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
674 int tegra2_spi_write(struct flashchip *flash, uint8_t *buf, int start, int len); 671 int tegra2_spi_write(struct flashchip *flash, uint8_t *buf, int start, int len);
675 #endif 672 #endif
676 673
677 #endif /* !__PROGRAMMER_H__ */ 674 #endif /* !__PROGRAMMER_H__ */
OLDNEW
« mec1308.c ('K') | « mec1308.c ('k') | wpce775x.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698