flashrom: Export Winbond SuperIO register access functions in board_enable.c.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3909 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Peter Stuge 2009-01-26 02:34:51 +00:00
parent 732a229a10
commit 8991302f54
2 changed files with 10 additions and 5 deletions

View File

@ -35,32 +35,32 @@
* Helper functions for many Winbond Super I/Os of the W836xx range. * Helper functions for many Winbond Super I/Os of the W836xx range.
*/ */
/* Enter extended functions */ /* Enter extended functions */
static void w836xx_ext_enter(uint16_t port) void w836xx_ext_enter(uint16_t port)
{ {
OUTB(0x87, port); OUTB(0x87, port);
OUTB(0x87, port); OUTB(0x87, port);
} }
/* Leave extended functions */ /* Leave extended functions */
static void w836xx_ext_leave(uint16_t port) void w836xx_ext_leave(uint16_t port)
{ {
OUTB(0xAA, port); OUTB(0xAA, port);
} }
/* General functions for reading/writing Winbond Super I/Os. */ /* General functions for reading/writing Winbond Super I/Os. */
static unsigned char wbsio_read(uint16_t index, uint8_t reg) unsigned char wbsio_read(uint16_t index, uint8_t reg)
{ {
OUTB(reg, index); OUTB(reg, index);
return INB(index + 1); return INB(index + 1);
} }
static void wbsio_write(uint16_t index, uint8_t reg, uint8_t data) void wbsio_write(uint16_t index, uint8_t reg, uint8_t data)
{ {
OUTB(reg, index); OUTB(reg, index);
OUTB(data, index + 1); OUTB(data, index + 1);
} }
static void wbsio_mask(uint16_t index, uint8_t reg, uint8_t data, uint8_t mask) void wbsio_mask(uint16_t index, uint8_t reg, uint8_t data, uint8_t mask)
{ {
uint8_t tmp; uint8_t tmp;

View File

@ -454,6 +454,11 @@ struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
uint16_t card_vendor, uint16_t card_device); uint16_t card_vendor, uint16_t card_device);
/* board_enable.c */ /* board_enable.c */
void w836xx_ext_enter(uint16_t port);
void w836xx_ext_leave(uint16_t port);
unsigned char wbsio_read(uint16_t index, uint8_t reg);
void wbsio_write(uint16_t index, uint8_t reg, uint8_t data);
void wbsio_mask(uint16_t index, uint8_t reg, uint8_t data, uint8_t mask);
int board_flash_enable(const char *vendor, const char *part); int board_flash_enable(const char *vendor, const char *part);
void print_supported_boards(void); void print_supported_boards(void);