summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-05-12 03:15:21 +0000
committeradrian <adrian@FreeBSD.org>2011-05-12 03:15:21 +0000
commited33f6206bd5c59b7a2f404d1ea160f87053bd4a (patch)
tree740c87eec302f184e6210c5f43b1772b8ca2c078
parentf716e166a257e501400f78f3a0e75e3913456aa9 (diff)
downloadFreeBSD-src-ed33f6206bd5c59b7a2f404d1ea160f87053bd4a.zip
FreeBSD-src-ed33f6206bd5c59b7a2f404d1ea160f87053bd4a.tar.gz
Fixes from Atheros:
* If AR9130, give the chip extra time to reset * If AR5416, don't shutdown the chip during reset
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_power.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_power.c b/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
index 9ffae9d..2d8c7f9 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
@@ -56,7 +56,10 @@ ar5416SetPowerModeAwake(struct ath_hal *ah, int setChip)
OS_REG_SET_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
OS_REG_SET_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN);
- OS_DELAY(50); /* Give chip the chance to awake */
+ if (AR_SREV_HOWL(ah))
+ OS_DELAY(10000);
+ else
+ OS_DELAY(50); /* Give chip the chance to awake */
for (i = POWER_UP_TIME / 50; i != 0; i--) {
val = OS_REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M;
@@ -94,7 +97,8 @@ ar5416SetPowerModeSleep(struct ath_hal *ah, int setChip)
if (! AR_SREV_HOWL(ah))
OS_REG_WRITE(ah, AR_RC, AR_RC_AHB|AR_RC_HOSTIF);
/* Shutdown chip. Active low */
- OS_REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
+ if (! AR_SREV_OWL(ah))
+ OS_REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
}
}
OpenPOWER on IntegriCloud