summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-02-24 22:14:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-02-24 22:14:55 +0000
commitce5d5d099626cc7dc30d665b5d8094e26f7b238d (patch)
treedbcd9ec99e006739d1ef90cd77cdbf4eab921918
parent2f72b19d92d8ab2d3459065eecf2c62a6af803b2 (diff)
Force write posting after changing GPIO pin status.
-rw-r--r--sys/arch/loongson/dev/voyager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/loongson/dev/voyager.c b/sys/arch/loongson/dev/voyager.c
index a72681e81ec..f470e968f4a 100644
--- a/sys/arch/loongson/dev/voyager.c
+++ b/sys/arch/loongson/dev/voyager.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: voyager.c,v 1.1 2010/02/18 22:45:28 miod Exp $ */
+/* $OpenBSD: voyager.c,v 1.2 2010/02/24 22:14:54 miod Exp $ */
/*
* Copyright (c) 2010 Miodrag Vallat.
@@ -210,6 +210,7 @@ voyager_gpio_pin_write(void *cookie, int pin, int val)
else
data &= ~mask;
bus_space_write_4(sc->sc_mmiot, sc->sc_mmioh, reg, data);
+ (void)bus_space_read_4(sc->sc_mmiot, sc->sc_mmioh, reg);
}
void
@@ -232,6 +233,7 @@ voyager_gpio_pin_ctl(void *cookie, int pin, int flags)
else
data &= ~mask;
bus_space_write_4(sc->sc_mmiot, sc->sc_mmioh, reg, data);
+ (void)bus_space_read_4(sc->sc_mmiot, sc->sc_mmioh, reg);
}
void