diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2007-04-06 11:58:03 +0000 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2007-04-06 11:58:03 +0000 |
commit | 7038564346f660ce043d7942398f3e8a3a2db7ad (patch) | |
tree | 2d6573bc465284fa3fc57fe2afaa8f7b1dabd1ad /flash.h | |
parent | 8e3a600123110d47076926cb8ee7c68195658f20 (diff) | |
download | ast2050-flashrom-7038564346f660ce043d7942398f3e8a3a2db7ad.zip ast2050-flashrom-7038564346f660ce043d7942398f3e8a3a2db7ad.tar.gz |
Trivial (cosmetic) cleanup
* Only open /dev/mem once and do it early.
* Drop extern for function prototypes.
* Minimize ts5300 impact in probe_flash()
This cleanup will making ICH7 SPI support quite some easier.
Corresponding to flashrom svn r100 and coreboot v2 svn r2585.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Diffstat (limited to 'flash.h')
-rw-r--r-- | flash.h | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -45,7 +45,6 @@ struct flashchip { int (*write) (struct flashchip *flash, uint8_t *buf); int (*read) (struct flashchip *flash, uint8_t *buf); - int fd_mem; volatile uint8_t *virt_addr_2; }; @@ -126,17 +125,17 @@ extern struct flashchip flashchips[]; /* function prototypes from udelay.h */ -extern void myusec_delay(int time); -extern void myusec_calibrate_delay(); +void myusec_delay(int time); +void myusec_calibrate_delay(); /* pci handling for board/chipset_enable */ -extern struct pci_access *pacc; /* For board and chipset_enable */ -extern struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); -extern struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device, - uint16_t card_vendor, uint16_t card_device); +struct pci_access *pacc; /* For board and chipset_enable */ +struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device); +struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device, + uint16_t card_vendor, uint16_t card_device); -extern int board_flash_enable(char *vendor, char *part); /* board_enable.c */ -extern int chipset_flash_enable(void); /* chipset_enable.c */ +int board_flash_enable(char *vendor, char *part); /* board_enable.c */ +int chipset_flash_enable(void); /* chipset_enable.c */ /* physical memory mapping device */ @@ -146,4 +145,6 @@ extern int chipset_flash_enable(void); /* chipset_enable.c */ # define MEM_DEV "/dev/mem" #endif +extern int fd_mem; + #endif /* !__FLASH_H__ */ |