Deleted Added
full compact
ar5212_reset.c (188194) ar5212_reset.c (188979)
1/*
2 * Copyright (c) 2002-2009 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 *
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-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/ar5212/ar5212_reset.c 188194 2009-02-05 20:56:33Z sam $
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c 188979 2009-02-24 01:07:06Z sam $
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23#include "ah_devid.h"
24
25#include "ar5212/ar5212.h"

--- 1076 unchanged lines hidden (view full) ---

1102static HAL_BOOL
1103ar5212SetResetReg(struct ath_hal *ah, uint32_t resetMask)
1104{
1105 uint32_t mask = resetMask ? resetMask : ~0;
1106 HAL_BOOL rt;
1107
1108 /* XXX ar5212MacStop & co. */
1109
18 */
19#include "opt_ah.h"
20
21#include "ah.h"
22#include "ah_internal.h"
23#include "ah_devid.h"
24
25#include "ar5212/ar5212.h"

--- 1076 unchanged lines hidden (view full) ---

1102static HAL_BOOL
1103ar5212SetResetReg(struct ath_hal *ah, uint32_t resetMask)
1104{
1105 uint32_t mask = resetMask ? resetMask : ~0;
1106 HAL_BOOL rt;
1107
1108 /* XXX ar5212MacStop & co. */
1109
1110 if (IS_PCIE(ah)) {
1110 if (AH_PRIVATE(ah)->ah_ispcie) {
1111 resetMask &= ~AR_RC_PCI;
1112 }
1113
1114 (void) OS_REG_READ(ah, AR_RXDP);/* flush any pending MMR writes */
1115 OS_REG_WRITE(ah, AR_RC, resetMask);
1116 OS_DELAY(15); /* need to wait at least 128 clocks
1117 when reseting PCI before read */
1118 mask &= (AR_RC_MAC | AR_RC_BB);

--- 1518 unchanged lines hidden ---
1111 resetMask &= ~AR_RC_PCI;
1112 }
1113
1114 (void) OS_REG_READ(ah, AR_RXDP);/* flush any pending MMR writes */
1115 OS_REG_WRITE(ah, AR_RC, resetMask);
1116 OS_DELAY(15); /* need to wait at least 128 clocks
1117 when reseting PCI before read */
1118 mask &= (AR_RC_MAC | AR_RC_BB);

--- 1518 unchanged lines hidden ---