ar5211_reset.c (208644) | ar5211_reset.c (234450) |
---|---|
1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2006 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 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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 * | 1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2006 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 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c 208644 2010-05-29 16:14:02Z rpaulo $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c 234450 2012-04-19 03:26:21Z adrian $ |
18 */ 19#include "opt_ah.h" 20 21/* 22 * Chips specific device attachment and device info collection 23 * Connects Init Reg Vectors, EEPROM Data, and device Functions. 24 */ 25#include "ah.h" --- 733 unchanged lines hidden (view full) --- 759 OS_DELAY(15); 760 761 resetMask &= AR_RC_MAC | AR_RC_BB; 762 mask &= AR_RC_MAC | AR_RC_BB; 763 rt = ath_hal_wait(ah, AR_RC, mask, resetMask); 764 if ((resetMask & AR_RC_MAC) == 0) { 765 if (isBigEndian()) { 766 /* | 18 */ 19#include "opt_ah.h" 20 21/* 22 * Chips specific device attachment and device info collection 23 * Connects Init Reg Vectors, EEPROM Data, and device Functions. 24 */ 25#include "ah.h" --- 733 unchanged lines hidden (view full) --- 759 OS_DELAY(15); 760 761 resetMask &= AR_RC_MAC | AR_RC_BB; 762 mask &= AR_RC_MAC | AR_RC_BB; 763 rt = ath_hal_wait(ah, AR_RC, mask, resetMask); 764 if ((resetMask & AR_RC_MAC) == 0) { 765 if (isBigEndian()) { 766 /* |
767 * Set CFG, little-endian for register 768 * and descriptor accesses. | 767 * Set CFG, little-endian for descriptor accesses. |
769 */ | 768 */ |
770 mask = INIT_CONFIG_STATUS | 771 AR_CFG_SWTD | AR_CFG_SWRD | AR_CFG_SWRG; 772 OS_REG_WRITE(ah, AR_CFG, LE_READ_4(&mask)); | 769 mask = INIT_CONFIG_STATUS | AR_CFG_SWTD | AR_CFG_SWRD; 770 OS_REG_WRITE(ah, AR_CFG, mask); |
773 } else 774 OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS); 775 } 776 return rt; 777} 778 779/* 780 * Takes the MHz channel value and sets the Channel value --- 1341 unchanged lines hidden --- | 771 } else 772 OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS); 773 } 774 return rt; 775} 776 777/* 778 * Takes the MHz channel value and sets the Channel value --- 1341 unchanged lines hidden --- |