summaryrefslogtreecommitdiff
path: root/util/flashrom/flash.h
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2007-04-06 11:58:03 +0000
committerStefan Reinauer <stepan@openbios.org>2007-04-06 11:58:03 +0000
commit03cafbfdfe10d6797740c4456fd3a80c499e1c0b (patch)
treefd9163184ad2a3d7aca568ebea3ccb776f619215 /util/flashrom/flash.h
parent8944499617828164dff09203e5a259f1bb517399 (diff)
downloadcoreboot-03cafbfdfe10d6797740c4456fd3a80c499e1c0b.tar.xz
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. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2585 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash.h')
-rw-r--r--util/flashrom/flash.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/util/flashrom/flash.h b/util/flashrom/flash.h
index 9f743ddc35..b22227d22d 100644
--- a/util/flashrom/flash.h
+++ b/util/flashrom/flash.h
@@ -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__ */