Module Name: src
Committed By: matt
Date: Sun Sep 8 00:55:25 UTC 2013
Modified Files:
src/sys/arch/arm/allwinner: awin_gpio.c
Log Message:
Make sure to actual push the configuration of the GPIO to its registers.
With this change, USB now works.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/allwinner/awin_gpio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/allwinner/awin_gpio.c
diff -u src/sys/arch/arm/allwinner/awin_gpio.c:1.5 src/sys/arch/arm/allwinner/awin_gpio.c:1.6
--- src/sys/arch/arm/allwinner/awin_gpio.c:1.5 Sat Sep 7 23:47:33 2013
+++ src/sys/arch/arm/allwinner/awin_gpio.c Sun Sep 8 00:55:25 2013
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: awin_gpio.c,v 1.5 2013/09/07 23:47:33 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_gpio.c,v 1.6 2013/09/08 00:55:25 matt Exp $");
#include <sys/bus.h>
#include <sys/device.h>
@@ -609,6 +609,11 @@ awin_gpio_pin_reserve(const char *name,
awin_gpio_set_pin_func(&ncfg, pin,
pin_data[0] == '<' ? AWIN_PIO_FUNC_INPUT : AWIN_PIO_FUNC_OUTPUT);
+ /*
+ * Now update any config register that changed.
+ */
+ awin_gpio_update_cfg_regs(sc->sc_bst, grp, &ncfg);
+
grp->grp_pin_inuse_mask &= ~__BIT(pin);
pd->pd_gc = &grp->grp_gc_tag;