aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2006-09-11 22:50:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2006-09-25 16:52:16 -0400
commita271ca5bbb1df988806bead8910b603819f4190f (patch)
tree4c809e9427cf5bafb1e84a0d647a40c22dabce58 /drivers
parent919ee6ddcd3fcff09dee90c11af17a802196ad1f (diff)
[PATCH] bcm43xx-softmac: update PHY initialization
This patch updates the PHY initialization code for bcm43xx-softmac to conform with recent changes in the clean-room specs at http://bcm-specs.sipsolutions.net. Mostly, these changes implement the sequence needed for chips with GPHY revision 8; however, the patch also corrects a typo in one address, and some parts that were missing from the spec when the initial coding was done. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_phy.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
index eafd0f662686..52ce2a9334fb 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
@@ -361,7 +361,7 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm)
361 if (phy->rev <= 2) 361 if (phy->rev <= 2)
362 for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++) 362 for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++)
363 bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg1[i]); 363 bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg1[i]);
364 else if ((phy->rev == 7) && (bcm43xx_phy_read(bcm, 0x0449) & 0x0200)) 364 else if ((phy->rev >= 7) && (bcm43xx_phy_read(bcm, 0x0449) & 0x0200))
365 for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++) 365 for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++)
366 bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg3[i]); 366 bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg3[i]);
367 else 367 else
@@ -371,7 +371,7 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm)
371 if (phy->rev == 2) 371 if (phy->rev == 2)
372 for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++) 372 for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++)
373 bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr1[i]); 373 bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr1[i]);
374 else if ((phy->rev > 2) && (phy->rev <= 7)) 374 else if ((phy->rev > 2) && (phy->rev <= 8))
375 for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++) 375 for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++)
376 bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr2[i]); 376 bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr2[i]);
377 377
@@ -1197,7 +1197,7 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm)
1197 1197
1198 if (phy->rev == 1) 1198 if (phy->rev == 1)
1199 bcm43xx_phy_initb5(bcm); 1199 bcm43xx_phy_initb5(bcm);
1200 else if (phy->rev >= 2 && phy->rev <= 7) 1200 else
1201 bcm43xx_phy_initb6(bcm); 1201 bcm43xx_phy_initb6(bcm);
1202 if (phy->rev >= 2 || phy->connected) 1202 if (phy->rev >= 2 || phy->connected)
1203 bcm43xx_phy_inita(bcm); 1203 bcm43xx_phy_inita(bcm);
@@ -1241,23 +1241,22 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm)
1241 bcm43xx_phy_lo_g_measure(bcm); 1241 bcm43xx_phy_lo_g_measure(bcm);
1242 } else { 1242 } else {
1243 if (radio->version == 0x2050 && radio->revision == 8) { 1243 if (radio->version == 0x2050 && radio->revision == 8) {
1244 //FIXME 1244 bcm43xx_radio_write16(bcm, 0x0052,
1245 (radio->txctl1 << 4) | radio->txctl2);
1245 } else { 1246 } else {
1246 bcm43xx_radio_write16(bcm, 0x0052, 1247 bcm43xx_radio_write16(bcm, 0x0052,
1247 (bcm43xx_radio_read16(bcm, 0x0052) 1248 (bcm43xx_radio_read16(bcm, 0x0052)
1248 & 0xFFF0) | radio->txctl1); 1249 & 0xFFF0) | radio->txctl1);
1249 } 1250 }
1250 if (phy->rev >= 6) { 1251 if (phy->rev >= 6) {
1251 /*
1252 bcm43xx_phy_write(bcm, 0x0036, 1252 bcm43xx_phy_write(bcm, 0x0036,
1253 (bcm43xx_phy_read(bcm, 0x0036) 1253 (bcm43xx_phy_read(bcm, 0x0036)
1254 & 0xF000) | (FIXME << 12)); 1254 & 0xF000) | (radio->txctl2 << 12));
1255 */
1256 } 1255 }
1257 if (bcm->sprom.boardflags & BCM43xx_BFL_PACTRL) 1256 if (bcm->sprom.boardflags & BCM43xx_BFL_PACTRL)
1258 bcm43xx_phy_write(bcm, 0x002E, 0x8075); 1257 bcm43xx_phy_write(bcm, 0x002E, 0x8075);
1259 else 1258 else
1260 bcm43xx_phy_write(bcm, 0x003E, 0x807F); 1259 bcm43xx_phy_write(bcm, 0x002E, 0x807F);
1261 if (phy->rev < 2) 1260 if (phy->rev < 2)
1262 bcm43xx_phy_write(bcm, 0x002F, 0x0101); 1261 bcm43xx_phy_write(bcm, 0x002F, 0x0101);
1263 else 1262 else