Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5efa3a6b authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville
Browse files

ath9k_hw: enable PCIe low power mode for AR9003



Cc: Paul Shaw <paul.shaw@atheros.com>
Cc: Don Breslin <don.breslin@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9e385c56
Loading
Loading
Loading
Loading
+20 −0
Original line number Original line Diff line number Diff line
@@ -573,6 +573,26 @@ static int __ath9k_hw_init(struct ath_hw *ah)


	ath9k_hw_init_mode_regs(ah);
	ath9k_hw_init_mode_regs(ah);


	/*
	 * Configire PCIE after Ini init. SERDES values now come from ini file
	 * This enables PCIe low power mode.
	 */
	if (AR_SREV_9300_20_OR_LATER(ah)) {
		u32 regval;
		unsigned int i;

		/* Set Bits 16 and 17 in the AR_WA register. */
		regval = REG_READ(ah, AR_WA);
		regval |= 0x00030000;
		REG_WRITE(ah, AR_WA, regval);

		for (i = 0; i < ah->iniPcieSerdesLowPower.ia_rows; i++) {
			REG_WRITE(ah,
				  INI_RA(&ah->iniPcieSerdesLowPower, i, 0),
				  INI_RA(&ah->iniPcieSerdesLowPower, i, 1));
		}
	}

	if (ah->is_pciexpress)
	if (ah->is_pciexpress)
		ath9k_hw_configpcipowersave(ah, 0, 0);
		ath9k_hw_configpcipowersave(ah, 0, 0);
	else
	else