svn commit: r333045 - head/sys/arm64/rockchip

Emmanuel Vadot manu at FreeBSD.org
Thu Apr 26 22:15:11 UTC 2018


Author: manu
Date: Thu Apr 26 22:15:09 2018
New Revision: 333045
URL: https://svnweb.freebsd.org/changeset/base/333045

Log:
  arm64: rockchip: rk_gpio fix rk_gpio_pin_config32
  
  Pointy Hat to:	 me

Modified:
  head/sys/arm64/rockchip/rk_gpio.c

Modified: head/sys/arm64/rockchip/rk_gpio.c
==============================================================================
--- head/sys/arm64/rockchip/rk_gpio.c	Thu Apr 26 22:15:06 2018	(r333044)
+++ head/sys/arm64/rockchip/rk_gpio.c	Thu Apr 26 22:15:09 2018	(r333045)
@@ -352,9 +352,12 @@ static int
 rk_gpio_pin_config_32(device_t dev, uint32_t first_pin, uint32_t num_pins,
     uint32_t *pin_flags)
 {
-	uint32_t reg, set, mask, flask;
+	struct rk_gpio_softc *sc;
+	uint32_t reg, set, mask, flags;
 	int i;
 
+	sc = device_get_softc(dev);
+
 	if (first_pin != 0 || num_pins > 32)
 		return (EINVAL);
 
@@ -374,7 +377,7 @@ rk_gpio_pin_config_32(device_t dev, uint32_t first_pin
 	reg = RK_GPIO_READ(sc, RK_GPIO_SWPORTA_DDR);
 	reg &= ~mask;
 	reg |= set;
-	RK_GPIO_WRITE(sc, RK_GPIO_SWPORTA_DDR);
+	RK_GPIO_WRITE(sc, RK_GPIO_SWPORTA_DDR, reg);
 	RK_GPIO_UNLOCK(sc);
 
 	return (0);


More information about the svn-src-all mailing list