From: Felix Fietkau <nbd@openwrt.org>
To: Sujith Manoharan <c_manoha@qualcomm.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [RFC 6/7] ath9k_hw: Program correct PLL value for AR9565
Date: Sat, 08 Sep 2012 10:08:08 +0200 [thread overview]
Message-ID: <504AFCE8.5010306@openwrt.org> (raw)
In-Reply-To: <20554.62374.945320.866841@gargle.gargle.HOWL>
On 2012-09-08 9:28 AM, Sujith Manoharan wrote:
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath9k/hw.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index 063d724..07dd330 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -837,6 +837,9 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,
> REG_RMW_FIELD(ah, AR_CH0_BB_DPLL2,
> AR_CH0_BB_DPLL2_PLL_PWD, 0x0);
> udelay(1000);
> +
> + if (AR_SREV_9565(ah))
> + REG_WRITE(ah, AR_RTC_PLL_CONTROL, 0x4142c);
> } else if (AR_SREV_9330(ah)) {
> u32 ddr_dpll2, pll_control2, kd;
>
> @@ -917,9 +920,10 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,
> udelay(1000);
> }
>
> - pll = ath9k_hw_compute_pll_control(ah, chan);
> -
> - REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll);
> + if (!AR_SREV_9565(ah)) {
> + pll = ath9k_hw_compute_pll_control(ah, chan);
> + REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll);
> + }
That looks messed up, how about just:
pll = ath9k_hw_compute_pll_control(ah, chan);
if (AR_SREV_9565(ah))
pll |= 0x40000;
REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll);
Or alternatively move that OR mask into ath9k_hw_compute_pll_control
- Felix
next prev parent reply other threads:[~2012-09-08 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-08 7:28 [RFC 6/7] ath9k_hw: Program correct PLL value for AR9565 Sujith Manoharan
2012-09-08 8:08 ` Felix Fietkau [this message]
2012-09-08 8:17 ` Sujith Manoharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=504AFCE8.5010306@openwrt.org \
--to=nbd@openwrt.org \
--cc=c_manoha@qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox