aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorStanislaw Gruszka <stf_xl@wp.pl>2013-04-17 08:08:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-22 15:20:17 -0400
commit87d91db9d05c3f29eea96200061702b889b84812 (patch)
treee9cf82c51d1be9e641c34a3116e57693203e3c31 /drivers/net/wireless
parent2971e66f204df3d24b83f77e1419a1c2c48f89d6 (diff)
rt2800: move RFCSR6_R2 & LDO_CFG0 setup to 3572 specific rfcsr init
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 102e50c383ad..6907cd313477 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4709,6 +4709,9 @@ static void rt2800_init_rfcsr_3390(struct rt2x00_dev *rt2x00dev)
4709 4709
4710static void rt2800_init_rfcsr_3572(struct rt2x00_dev *rt2x00dev) 4710static void rt2800_init_rfcsr_3572(struct rt2x00_dev *rt2x00dev)
4711{ 4711{
4712 u8 rfcsr;
4713 u32 reg;
4714
4712 rt2800_rf_init_calibration(rt2x00dev, 30); 4715 rt2800_rf_init_calibration(rt2x00dev, 30);
4713 4716
4714 rt2800_rfcsr_write(rt2x00dev, 0, 0x70); 4717 rt2800_rfcsr_write(rt2x00dev, 0, 0x70);
@@ -4742,6 +4745,20 @@ static void rt2800_init_rfcsr_3572(struct rt2x00_dev *rt2x00dev)
4742 rt2800_rfcsr_write(rt2x00dev, 29, 0x9b); 4745 rt2800_rfcsr_write(rt2x00dev, 29, 0x9b);
4743 rt2800_rfcsr_write(rt2x00dev, 30, 0x09); 4746 rt2800_rfcsr_write(rt2x00dev, 30, 0x09);
4744 rt2800_rfcsr_write(rt2x00dev, 31, 0x10); 4747 rt2800_rfcsr_write(rt2x00dev, 31, 0x10);
4748
4749 rt2800_rfcsr_read(rt2x00dev, 6, &rfcsr);
4750 rt2x00_set_field8(&rfcsr, RFCSR6_R2, 1);
4751 rt2800_rfcsr_write(rt2x00dev, 6, rfcsr);
4752
4753 rt2800_register_read(rt2x00dev, LDO_CFG0, &reg);
4754 rt2x00_set_field32(&reg, LDO_CFG0_LDO_CORE_VLEVEL, 3);
4755 rt2x00_set_field32(&reg, LDO_CFG0_BGSEL, 1);
4756 rt2800_register_write(rt2x00dev, LDO_CFG0, reg);
4757 msleep(1);
4758 rt2800_register_read(rt2x00dev, LDO_CFG0, &reg);
4759 rt2x00_set_field32(&reg, LDO_CFG0_LDO_CORE_VLEVEL, 0);
4760 rt2x00_set_field32(&reg, LDO_CFG0_BGSEL, 1);
4761 rt2800_register_write(rt2x00dev, LDO_CFG0, reg);
4745} 4762}
4746 4763
4747static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev) 4764static void rt2800_init_rfcsr_5390(struct rt2x00_dev *rt2x00dev)
@@ -4994,23 +5011,6 @@ static int rt2800_init_rfcsr(struct rt2x00_dev *rt2x00dev)
4994 return 0; 5011 return 0;
4995 } 5012 }
4996 5013
4997
4998 if (rt2x00_rt(rt2x00dev, RT3572)) {
4999 rt2800_rfcsr_read(rt2x00dev, 6, &rfcsr);
5000 rt2x00_set_field8(&rfcsr, RFCSR6_R2, 1);
5001 rt2800_rfcsr_write(rt2x00dev, 6, rfcsr);
5002
5003 rt2800_register_read(rt2x00dev, LDO_CFG0, &reg);
5004 rt2x00_set_field32(&reg, LDO_CFG0_LDO_CORE_VLEVEL, 3);
5005 rt2x00_set_field32(&reg, LDO_CFG0_BGSEL, 1);
5006 rt2800_register_write(rt2x00dev, LDO_CFG0, reg);
5007 msleep(1);
5008 rt2800_register_read(rt2x00dev, LDO_CFG0, &reg);
5009 rt2x00_set_field32(&reg, LDO_CFG0_LDO_CORE_VLEVEL, 0);
5010 rt2x00_set_field32(&reg, LDO_CFG0_BGSEL, 1);
5011 rt2800_register_write(rt2x00dev, LDO_CFG0, reg);
5012 }
5013
5014 /* 5014 /*
5015 * Set RX Filter calibration for 20MHz and 40MHz 5015 * Set RX Filter calibration for 20MHz and 40MHz
5016 */ 5016 */