diff options
author | adrian <adrian@FreeBSD.org> | 2012-05-25 05:01:27 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2012-05-25 05:01:27 +0000 |
commit | d6bb741dfb281f0bbb1d8e2e4c57dd471d1bf910 (patch) | |
tree | f58721e274825c623378bf926219031813fe4c79 /sys/dev/ath/ath_hal/ar9002/ar9287_attach.c | |
parent | f162edc8256cdf933668ed8a30625452e0400359 (diff) | |
download | FreeBSD-src-d6bb741dfb281f0bbb1d8e2e4c57dd471d1bf910.zip FreeBSD-src-d6bb741dfb281f0bbb1d8e2e4c57dd471d1bf910.tar.gz |
oops - ath_hal_disablepcie is actually destined for another purpose,
not to disable the PCIe PHY in prepration for reset.
Extend the enablepci method to have a "poweroff" flag, which if equal
to true means the hardware is about to go to sleep.
Diffstat (limited to 'sys/dev/ath/ath_hal/ar9002/ar9287_attach.c')
-rw-r--r-- | sys/dev/ath/ath_hal/ar9002/ar9287_attach.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c index c729824..fc69103 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c @@ -65,7 +65,8 @@ static const HAL_PERCAL_DATA ar9287_adc_init_dc_cal = { .calPostProc = ar5416AdcDcCalibration }; -static void ar9287ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore); +static void ar9287ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore, + HAL_BOOL power_off); static void ar9287DisablePCIE(struct ath_hal *ah); static HAL_BOOL ar9287FillCapabilityInfo(struct ath_hal *ah); static void ar9287WriteIni(struct ath_hal *ah, @@ -359,13 +360,14 @@ bad: } static void -ar9287ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore) +ar9287ConfigPCIE(struct ath_hal *ah, HAL_BOOL restore, HAL_BOOL power_off) { if (AH_PRIVATE(ah)->ah_ispcie && !restore) { ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_pcieserdes, 1, 0); OS_DELAY(1000); OS_REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); - OS_REG_WRITE(ah, AR_WA, AR9285_WA_DEFAULT); /* Yes, Kiwi uses the Kite PCIe PHY WA */ + /* Yes, Kiwi uses the Kite PCIe PHY WA */ + OS_REG_WRITE(ah, AR_WA, AR9285_WA_DEFAULT); } } |