ar5210_reset.c (208643) | ar5210_reset.c (234450) |
---|---|
1/* 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2004 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-2004 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/ar5210/ar5210_reset.c 208643 2010-05-29 16:11:51Z rpaulo $ | 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c 234450 2012-04-19 03:26:21Z adrian $ |
18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23 24#include "ar5210/ar5210.h" 25#include "ar5210/ar5210reg.h" --- 563 unchanged lines hidden (view full) --- 589 OS_DELAY(delay); 590 591 resetMask &= AR_RC_RPCU | AR_RC_RDMA | AR_RC_RPHY | AR_RC_RMAC; 592 mask &= AR_RC_RPCU | AR_RC_RDMA | AR_RC_RPHY | AR_RC_RMAC; 593 rt = ath_hal_wait(ah, AR_RC, mask, resetMask); 594 if ((resetMask & AR_RC_RMAC) == 0) { 595 if (isBigEndian()) { 596 /* | 18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23 24#include "ar5210/ar5210.h" 25#include "ar5210/ar5210reg.h" --- 563 unchanged lines hidden (view full) --- 589 OS_DELAY(delay); 590 591 resetMask &= AR_RC_RPCU | AR_RC_RDMA | AR_RC_RPHY | AR_RC_RMAC; 592 mask &= AR_RC_RPCU | AR_RC_RDMA | AR_RC_RPHY | AR_RC_RMAC; 593 rt = ath_hal_wait(ah, AR_RC, mask, resetMask); 594 if ((resetMask & AR_RC_RMAC) == 0) { 595 if (isBigEndian()) { 596 /* |
597 * Set CFG, little-endian for register 598 * and descriptor accesses. | 597 * Set CFG, little-endian for descriptor accesses. |
599 */ | 598 */ |
600 mask = INIT_CONFIG_STATUS | 601 AR_CFG_SWTD | AR_CFG_SWRD | AR_CFG_SWRG; 602 OS_REG_WRITE(ah, AR_CFG, LE_READ_4(&mask)); | 599 mask = INIT_CONFIG_STATUS | AR_CFG_SWTD | AR_CFG_SWRD; 600 OS_REG_WRITE(ah, AR_CFG, mask); |
603 } else 604 OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS); 605 } 606 return rt; 607} 608 609 610/* --- 393 unchanged lines hidden --- | 601 } else 602 OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS); 603 } 604 return rt; 605} 606 607 608/* --- 393 unchanged lines hidden --- |