From 1bb0a46d4d3d641078dd156c09e9bb7eee07f7d7 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 24 Feb 2009 00:12:16 +0000 Subject: 5416 and later parts mux the gpio outputs; extend the api to include a signal type that's used to select the appropriate mux --- sys/dev/ath/ath_hal/ar5312/ar5312.h | 6 ++++-- sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c | 4 ++-- sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'sys/dev/ath/ath_hal/ar5312') diff --git a/sys/dev/ath/ath_hal/ar5312/ar5312.h b/sys/dev/ath/ath_hal/ar5312/ar5312.h index 210e744..0fb9b75 100644 --- a/sys/dev/ath/ath_hal/ar5312/ar5312.h +++ b/sys/dev/ath/ath_hal/ar5312/ar5312.h @@ -41,14 +41,16 @@ extern HAL_BOOL ar5312IsInterruptPending(struct ath_hal *ah); /* AR5312 */ -extern HAL_BOOL ar5312GpioCfgOutput(struct ath_hal *, uint32_t gpio); +extern HAL_BOOL ar5312GpioCfgOutput(struct ath_hal *, uint32_t gpio, + HAL_GPIO_MUX_TYPE); extern HAL_BOOL ar5312GpioCfgInput(struct ath_hal *, uint32_t gpio); extern HAL_BOOL ar5312GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val); extern uint32_t ar5312GpioGet(struct ath_hal *ah, uint32_t gpio); extern void ar5312GpioSetIntr(struct ath_hal *ah, u_int, uint32_t ilevel); /* AR2315+ */ -extern HAL_BOOL ar5315GpioCfgOutput(struct ath_hal *, uint32_t gpio); +extern HAL_BOOL ar5315GpioCfgOutput(struct ath_hal *, uint32_t gpio, + HAL_GPIO_MUX_TYPE); extern HAL_BOOL ar5315GpioCfgInput(struct ath_hal *, uint32_t gpio); extern HAL_BOOL ar5315GpioSet(struct ath_hal *, uint32_t gpio, uint32_t val); extern uint32_t ar5315GpioGet(struct ath_hal *ah, uint32_t gpio); diff --git a/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c b/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c index 02ed565..20a575d 100644 --- a/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c +++ b/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312_gpio.c,v 1.3 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -35,7 +35,7 @@ * Configure GPIO Output lines */ HAL_BOOL -ar5312GpioCfgOutput(struct ath_hal *ah, uint32_t gpio) +ar5312GpioCfgOutput(struct ath_hal *ah, uint32_t gpio, HAL_GPIO_MUX_TYPE type) { uint32_t gpioOffset = (AR5312_GPIO_BASE - ((uint32_t) ah->ah_sh)); diff --git a/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c b/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c index 2aca97a..4c04c86 100644 --- a/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c +++ b/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5315_gpio.c,v 1.3 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -35,7 +35,7 @@ * Configure GPIO Output lines */ HAL_BOOL -ar5315GpioCfgOutput(struct ath_hal *ah, uint32_t gpio) +ar5315GpioCfgOutput(struct ath_hal *ah, uint32_t gpio, HAL_GPIO_MUX_TYPE type) { uint32_t gpioOffset = (AR5315_GPIO_BASE - ((uint32_t) ah->ah_sh)); -- cgit v1.1