ath9k_hw: fix PLL clock initialization for newer SoC
authorFelix Fietkau <nbd@openwrt.org>
Mon, 29 Sep 2014 18:45:42 +0000 (20:45 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 30 Sep 2014 17:17:47 +0000 (13:17 -0400)
commit5fb9b1b949ce9b829e7e8f799cc85e91527213bd
tree0ffee65c07f465c1536a7bc1ee9c55240b4eb4d4
parentb874ec8d57ba61cb56c97a7b7810828da8ec8e95
ath9k_hw: fix PLL clock initialization for newer SoC

On AR934x and newer SoC devices, the layout of the AR_RTC_PLL_CONTROL
register changed. This currently breaks at least 5/10 MHz operation.
AR933x uses the old layout.

It might also have been causing other stability issues because of the
different location of the PLL_BYPASS bit which needs to be set during
PLL clock initialization.

This patch also removes more instances of hardcoded register values in
favor of properly computed ones with the PLL_BYPASS bit added.

Reported-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_phy.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/reg.h