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
This commit is contained in:
Stefan Reinauer
2007-04-06 11:58:03 +00:00
committed by Stefan Reinauer
parent 8944499617
commit 03cafbfdfe
8 changed files with 51 additions and 61 deletions

View File

@ -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__ */