summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-01 21:30:42 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-01 21:30:42 +0000
commit500b423c0c839e93ac679acad79f7580c13aeb88 (patch)
treed76d99cc028a7a9a0567ec7095a5180c987831ba
parentb22918cadc5ba07c037935644f8c6dcef0583e23 (diff)
downloadast2050-flashrom-500b423c0c839e93ac679acad79f7580c13aeb88.zip
ast2050-flashrom-500b423c0c839e93ac679acad79f7580c13aeb88.tar.gz
Refactor HT-1000 GPIO setting to use sio_mask
Although the HT-1000 GPIOs are not SuperIO related, the share the same index/data register access method. Corresponding to flashrom svn r561. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
-rw-r--r--board_enable.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/board_enable.c b/board_enable.c
index b073ed6..6fcf5ba 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -365,25 +365,20 @@ static int board_asus_p5a(const char *name)
static int board_ibm_x3455(const char *name)
{
- uint8_t byte;
-
/* Set GPIO lines in the Broadcom HT-1000 southbridge. */
- OUTB(0x45, 0xcd6);
- byte = INB(0xcd7);
- OUTB(byte | 0x20, 0xcd7);
+ /* It's not a superio but it uses the same index/data port method. */
+ sio_mask(0xcd6, 0x45, 0x20, 0x20);
return 0;
}
static int board_hp_dl145_g3_enable(const char *name)
{
- uint8_t byte;
-
/* Set GPIO lines in the Broadcom HT-1000 southbridge. */
- OUTB(0x44, 0xcd6); /* GPIO 0 reg from PM regs */
- byte = INB(0xcd7);
+ /* GPIO 0 reg from PM regs */
/* Set GPIO 2 and 5 high, connected to flash WP# and TBL# pins. */
- OUTB(byte | 0x24, 0xcd7);
+ /* It's not a superio but it uses the same index/data port method. */
+ sio_mask(0xcd6, 0x44, 0x24, 0x24);
return 0;
}
OpenPOWER on IntegriCloud