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.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-ht1000_gpio_refactor/board_enable.c =================================================================== --- flashrom-ht1000_gpio_refactor/board_enable.c (Revision 547) +++ flashrom-ht1000_gpio_refactor/board_enable.c (Arbeitskopie) @@ -365,25 +365,20 @@
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; }
Has this been tested anywhere?
I get a little worried about changes like this, which look fine in the abstract, unless they are tested. It "should" work, it looks fine to me, but ...
ron
On Mon, May 25, 2009 at 06:58:42PM -0700, ron minnich wrote:
Has this been tested anywhere?
I get a little worried about changes like this, which look fine in the abstract, unless they are tested. It "should" work, it looks fine to me, but ...
Yeah, should work. Sure, testing would be nice also, but I think it's ok to commit this.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Uwe.
Hi Mondrian,
could you test if flashrom r561 still works for you? Thanks!
On 01.06.2009 03:08, Uwe Hermann wrote:
On Mon, May 25, 2009 at 06:58:42PM -0700, ron minnich wrote:
Has this been tested anywhere?
I get a little worried about changes like this, which look fine in the abstract, unless they are tested. It "should" work, it looks fine to me, but ...
Yeah, should work. Sure, testing would be nice also, but I think it's ok to commit this.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Thanks, committed in r561.
Regards, Carl-Daniel