Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193823
b: refs/heads/master
c: 25e2ab1
h: refs/heads/master
i:
  193821: 30e11dd
  193819: ab63788
  193815: 348ad37
  193807: ba671f8
  193791: ee457ee
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Mar 23, 2010
1 parent 81f28bb commit d6b59de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02afa2a01b74ed3e8f3a85be11919b33f4ad4f02
refs/heads/master: 25e2ab17fd77e752597050980cec4efae7f87854
34 changes: 2 additions & 32 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,22 +1006,6 @@ static void ath9k_hw_init_qos(struct ath_hw *ah)
REG_WRITE(ah, AR_TXOP_12_15, 0xFFFFFFFF);
}

static void ath9k_hw_change_target_baud(struct ath_hw *ah, u32 freq, u32 baud)
{
u32 lcr;
u32 baud_divider = freq * 1000 * 1000 / 16 / baud;

lcr = REG_READ(ah , 0x5100c);
lcr |= 0x80;

REG_WRITE(ah, 0x5100c, lcr);
REG_WRITE(ah, 0x51004, (baud_divider >> 8));
REG_WRITE(ah, 0x51000, (baud_divider & 0xff));

lcr &= ~0x80;
REG_WRITE(ah, 0x5100c, lcr);
}

static void ath9k_hw_init_pll(struct ath_hw *ah,
struct ath9k_channel *chan)
{
Expand Down Expand Up @@ -1087,22 +1071,8 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,

/* Switch the core clock for ar9271 to 117Mhz */
if (AR_SREV_9271(ah)) {
if ((pll == 0x142c) || (pll == 0x2850) ) {
udelay(500);
/* set CLKOBS to output AHB clock */
REG_WRITE(ah, 0x7020, 0xe);
/*
* 0x304: 117Mhz, ahb_ratio: 1x1
* 0x306: 40Mhz, ahb_ratio: 1x1
*/
REG_WRITE(ah, 0x50040, 0x304);
/*
* makes adjustments for the baud dividor to keep the
* targetted baud rate based on the used core clock.
*/
ath9k_hw_change_target_baud(ah, AR9271_CORE_CLOCK,
AR9271_TARGET_BAUD_RATE);
}
udelay(500);
REG_WRITE(ah, 0x50040, 0x304);
}

udelay(RTC_PLL_SETTLE_DELAY);
Expand Down

0 comments on commit d6b59de

Please sign in to comment.