aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Stefanik <netrolller.3d@gmail.com>2010-08-16 16:39:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-24 16:28:11 -0400
commitd2730b2a6a019d14455556019d744ab051e6554b (patch)
treee1321ef2496cd0061071df0e1e9adfb1fa317534
parente723ef305c36785c08af9463b3a3ec369dfcedcb (diff)
b43: N-PHY: Implement MAC PHY clock set
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/phy_n.c13
-rw-r--r--include/linux/ssb/ssb_regs.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index f1b57070ada9..d212726d509b 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -3074,6 +3074,17 @@ static int b43_nphy_cal_rx_iq(struct b43_wldev *dev,
3074 return b43_nphy_rev2_cal_rx_iq(dev, target, type, debug); 3074 return b43_nphy_rev2_cal_rx_iq(dev, target, type, debug);
3075} 3075}
3076 3076
3077/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/MacPhyClkSet */
3078static void b43_nphy_mac_phy_clock_set(struct b43_wldev *dev, bool on)
3079{
3080 u32 tmslow = ssb_read32(dev->dev, SSB_TMSLOW);
3081 if (on)
3082 tmslow |= SSB_TMSLOW_PHYCLK;
3083 else
3084 tmslow &= ~SSB_TMSLOW_PHYCLK;
3085 ssb_write32(dev->dev, SSB_TMSLOW, tmslow);
3086}
3087
3077/* 3088/*
3078 * Init N-PHY 3089 * Init N-PHY
3079 * http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N 3090 * http://bcm-v4.sipsolutions.net/802.11/PHY/Init/N
@@ -3174,7 +3185,7 @@ int b43_phy_initn(struct b43_wldev *dev)
3174 b43_phy_write(dev, B43_NPHY_BBCFG, tmp & ~B43_NPHY_BBCFG_RSTCCA); 3185 b43_phy_write(dev, B43_NPHY_BBCFG, tmp & ~B43_NPHY_BBCFG_RSTCCA);
3175 b43_nphy_bmac_clock_fgc(dev, 0); 3186 b43_nphy_bmac_clock_fgc(dev, 0);
3176 3187
3177 /* TODO N PHY MAC PHY Clock Set with argument 1 */ 3188 b43_nphy_mac_phy_clock_set(dev, true);
3178 3189
3179 b43_nphy_pa_override(dev, false); 3190 b43_nphy_pa_override(dev, false);
3180 b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RX2TX); 3191 b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RX2TX);
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index a6d5225b9275..11daf9c140e7 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -97,6 +97,7 @@
97#define SSB_TMSLOW_RESET 0x00000001 /* Reset */ 97#define SSB_TMSLOW_RESET 0x00000001 /* Reset */
98#define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */ 98#define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */
99#define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ 99#define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */
100#define SSB_TMSLOW_PHYCLK 0x00000010 /* MAC PHY Clock Control Enable */
100#define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ 101#define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */
101#define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ 102#define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */
102#define SSB_TMSLOW_PE 0x40000000 /* Power Management Enable */ 103#define SSB_TMSLOW_PE 0x40000000 /* Power Management Enable */