ar5212_gpio.c (185377) | ar5212_gpio.c (185406) |
---|---|
1/* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 4 unchanged lines hidden (view full) --- 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * 17 * $Id: ar5212_gpio.c,v 1.3 2008/11/10 04:08:03 sam Exp $ 18 */ 19#include "opt_ah.h" 20 | 1/* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2008 Atheros Communications, Inc. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * --- 4 unchanged lines hidden (view full) --- 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 * 17 * $Id: ar5212_gpio.c,v 1.3 2008/11/10 04:08:03 sam Exp $ 18 */ 19#include "opt_ah.h" 20 |
21#ifdef AH_SUPPORT_AR5212 22 | |
23#include "ah.h" 24#include "ah_internal.h" 25#include "ah_devid.h" 26#ifdef AH_DEBUG 27#include "ah_desc.h" /* NB: for HAL_PHYERR* */ 28#endif 29 30#include "ar5212/ar5212.h" 31#include "ar5212/ar5212reg.h" 32#include "ar5212/ar5212phy.h" | 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24#ifdef AH_DEBUG 25#include "ah_desc.h" /* NB: for HAL_PHYERR* */ 26#endif 27 28#include "ar5212/ar5212.h" 29#include "ar5212/ar5212reg.h" 30#include "ar5212/ar5212phy.h" |
33#ifdef AH_SUPPORT_AR5311 34#include "ar5212/ar5311reg.h" 35#endif | |
36 37#define AR_NUM_GPIO 6 /* 6 GPIO pins */ 38#define AR_GPIOD_MASK 0x0000002F /* GPIO data reg r/w mask */ 39 40/* 41 * Configure GPIO Output lines 42 */ 43HAL_BOOL --- 78 unchanged lines hidden (view full) --- 122 val |= AR_GPIOCR_INT_SELL; /* interrupt on pin low */ 123 124 /* Don't need to change anything for low level interrupt. */ 125 OS_REG_WRITE(ah, AR_GPIOCR, val); 126 127 /* Change the interrupt mask. */ 128 (void) ar5212SetInterrupts(ah, AH5212(ah)->ah_maskReg | HAL_INT_GPIO); 129} | 31 32#define AR_NUM_GPIO 6 /* 6 GPIO pins */ 33#define AR_GPIOD_MASK 0x0000002F /* GPIO data reg r/w mask */ 34 35/* 36 * Configure GPIO Output lines 37 */ 38HAL_BOOL --- 78 unchanged lines hidden (view full) --- 117 val |= AR_GPIOCR_INT_SELL; /* interrupt on pin low */ 118 119 /* Don't need to change anything for low level interrupt. */ 120 OS_REG_WRITE(ah, AR_GPIOCR, val); 121 122 /* Change the interrupt mask. */ 123 (void) ar5212SetInterrupts(ah, AH5212(ah)->ah_maskReg | HAL_INT_GPIO); 124} |
130 131#endif /* AH_SUPPORT_AR5212 */ | |