diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2006-01-05 15:32:47 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2006-01-05 15:32:47 +0000 |
commit | 2b978a7b0a5cba13fd8e174cfe38a7493097b1e3 (patch) | |
tree | f41048945e00841609418c95735049003d26cf4e /sys/arch/i386 | |
parent | dc2c2590f510a1d38ce88326bcfaecbd7fca9edb (diff) |
Don't change pins state on attach.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/pci/gscpcib.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/i386/pci/gscpcib.c b/sys/arch/i386/pci/gscpcib.c index 2d33423c6f2..23816855dd5 100644 --- a/sys/arch/i386/pci/gscpcib.c +++ b/sys/arch/i386/pci/gscpcib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $ */ +/* $OpenBSD: gscpcib.c,v 1.4 2006/01/05 15:32:46 grange Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org> * @@ -111,11 +111,9 @@ gscpcib_attach(struct device *parent, struct device *self, void *aux) GPIO_PIN_PUSHPULL | GPIO_PIN_TRISTATE | GPIO_PIN_PULLUP; - /* safe defaults */ - sc->sc_gpio_pins[i].pin_flags = GPIO_PIN_TRISTATE; - sc->sc_gpio_pins[i].pin_state = GPIO_PIN_LOW; - gscpcib_gpio_pin_ctl(sc, i, sc->sc_gpio_pins[i].pin_flags); - gscpcib_gpio_pin_write(sc, i, sc->sc_gpio_pins[i].pin_state); + /* Read initial state */ + sc->sc_gpio_pins[i].pin_state = gscpcib_gpio_pin_read(sc, i) ? + GPIO_PIN_HIGH : GPIO_PIN_LOW; } /* Create controller tag */ |