ar9285_attach.c (206420) | ar9285_attach.c (208711) |
---|---|
1/* 2 * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 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 * 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) 2008-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 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 * 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/ar5416/ar9285_attach.c 206420 2010-04-09 13:58:54Z rpaulo $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5416/ar9285_attach.c 208711 2010-06-01 15:33:10Z rpaulo $ |
18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ah_eeprom_v4k.h" /* XXX for tx/rx gain */ --- 285 unchanged lines hidden (view full) --- 311 modesIndex, regWrites); 312 if (AR_SREV_KITE_12_OR_LATER(ah)) { 313 regWrites = ath_hal_ini_write(ah, &AH9285(ah)->ah_ini_txgain, 314 modesIndex, regWrites); 315 } 316 regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_common, 317 1, regWrites); 318 | 18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_devid.h" 24 25#include "ah_eeprom_v4k.h" /* XXX for tx/rx gain */ --- 285 unchanged lines hidden (view full) --- 311 modesIndex, regWrites); 312 if (AR_SREV_KITE_12_OR_LATER(ah)) { 313 regWrites = ath_hal_ini_write(ah, &AH9285(ah)->ah_ini_txgain, 314 modesIndex, regWrites); 315 } 316 regWrites = ath_hal_ini_write(ah, &AH5212(ah)->ah_ini_common, 317 1, regWrites); 318 |
319 OS_REG_SET_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT)); 320 321 if (AR_SREV_MERLIN_10_OR_LATER(ah)) { 322 uint32_t val; 323 val = OS_REG_READ(ah, AR_PCU_MISC_MODE2) & 324 (~AR_PCU_MISC_MODE2_HWWAR1); 325 OS_REG_WRITE(ah, AR_PCU_MISC_MODE2, val); 326 OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11); 327 } 328 |
|
319} 320 321/* 322 * Fill all software cached or static hardware state information. 323 * Return failure if capabilities are to come from EEPROM and 324 * cannot be read. 325 */ 326static HAL_BOOL --- 71 unchanged lines hidden --- | 329} 330 331/* 332 * Fill all software cached or static hardware state information. 333 * Return failure if capabilities are to come from EEPROM and 334 * cannot be read. 335 */ 336static HAL_BOOL --- 71 unchanged lines hidden --- |