Author: manu Date: Wed Aug 17 13:09:31 2016 New Revision: 304290 URL: https://svnweb.freebsd.org/changeset/base/304290
Log: Only set pud settings if this is a pullup or pulldown configuration. This removes the need to set the MMC pins with pullups in our DTS. Thanks to jmcneill@ for spotting this. Tested on Orange Pi One (Allwinner H3). MFC after: 1 week Modified: head/sys/arm/allwinner/a10_gpio.c Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Wed Aug 17 10:20:36 2016 (r304289) +++ head/sys/arm/allwinner/a10_gpio.c Wed Aug 17 13:09:31 2016 (r304290) @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #include <dev/extres/clk/clk.h> #include <dev/extres/hwreset/hwreset.h> +#include <dt-bindings/pinctrl/sun4i-a10.h> + #if defined(__aarch64__) #include "opt_soc.h" #endif @@ -599,7 +601,9 @@ aw_fdt_configure_pins(device_t dev, phan a10_gpio_set_function(sc, pin_num, pin_func); if (a10_gpio_get_drv(sc, pin_num) != pin_drive) a10_gpio_set_drv(sc, pin_num, pin_drive); - if (a10_gpio_get_pud(sc, pin_num) != pin_pull) + if (a10_gpio_get_pud(sc, pin_num) != pin_pull && + (pin_pull == SUN4I_PINCTRL_PULL_UP || + pin_pull == SUN4I_PINCTRL_PULL_DOWN)) a10_gpio_set_pud(sc, pin_num, pin_pull); A10_GPIO_UNLOCK(sc); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"