Lines Matching +full:0 +full:x52
92 b43_phy_write(dev, B43_PHY_PGACTL, 0xE300); in lo_measure_feedthrough()
101 b43_phy_write(dev, B43_PHY_PGACTL, 0xF300); in lo_measure_feedthrough()
135 v = 0x30; in lo_txctl_register_table()
137 reg = 0x43; in lo_txctl_register_table()
138 padmix = 0; in lo_txctl_register_table()
140 reg = 0x52; in lo_txctl_register_table()
145 reg = 0x43; in lo_txctl_register_table()
146 v = 0x10; in lo_txctl_register_table()
149 reg = 0x52; in lo_txctl_register_table()
150 v = 0x30; in lo_txctl_register_table()
172 0x09, 0x08, 0x0A, 0x01, 0x00, in lo_measure_txctl_values()
173 0x02, 0x05, 0x04, 0x06, in lo_measure_txctl_values()
176 0x70, 0x40, in lo_measure_txctl_values()
182 pga = 0; in lo_measure_txctl_values()
186 trsw_rx = 0; in lo_measure_txctl_values()
189 radio_pctl_reg = 0; in lo_measure_txctl_values()
191 pga = clamp_val(pga, 0, 15); in lo_measure_txctl_values()
196 pga = 0; in lo_measure_txctl_values()
197 cmp_val = 0x24; in lo_measure_txctl_values()
199 (phy->radio_ver == 0x2050) && (phy->radio_rev == 8)) in lo_measure_txctl_values()
200 cmp_val = 0x3C; in lo_measure_txctl_values()
204 if (tmp < 0) in lo_measure_txctl_values()
216 b43_radio_maskset(dev, 0x43, 0xFFF0, radio_pctl_reg); in lo_measure_txctl_values()
226 int min_feedth = 0xFFFF; in lo_measure_txctl_values()
229 for (i = 0; i < ARRAY_SIZE(tx_magn_values); i++) { in lo_measure_txctl_values()
231 b43_radio_maskset(dev, 0x52, 0xFF0F, tx_magn); in lo_measure_txctl_values()
232 for (j = 0; j < ARRAY_SIZE(tx_bias_values); j++) { in lo_measure_txctl_values()
234 b43_radio_maskset(dev, 0x52, 0xFFF0, tx_bias); in lo_measure_txctl_values()
236 lo_measure_feedthrough(dev, 0, pga, in lo_measure_txctl_values()
243 if (lo->tx_bias == 0) in lo_measure_txctl_values()
246 b43_radio_write16(dev, 0x52, in lo_measure_txctl_values()
247 (b43_radio_read16(dev, 0x52) in lo_measure_txctl_values()
248 & 0xFF00) | lo->tx_bias | lo-> in lo_measure_txctl_values()
252 lo->tx_magn = 0; in lo_measure_txctl_values()
253 lo->tx_bias = 0; in lo_measure_txctl_values()
254 b43_radio_mask(dev, 0x52, 0xFFF0); /* TX bias == 0 */ in lo_measure_txctl_values()
266 u64 power_vector = 0; in lo_read_power_vector()
268 for (i = 0; i < 8; i += 2) { in lo_read_power_vector()
269 tmp = b43_shm_read16(dev, B43_SHM_SHARED, 0x310 + i); in lo_read_power_vector()
272 b43_shm_write16(dev, B43_SHM_SHARED, 0x310 + i, 0); in lo_read_power_vector()
287 if (max_rx_gain < 0) in lo_measure_gain_values()
288 max_rx_gain = 0; in lo_measure_gain_values()
301 gphy->lna_lod_gain = 0; in lo_measure_gain_values()
306 trsw_rx_gain = clamp_val(trsw_rx_gain, 0, 0x2D); in lo_measure_gain_values()
312 gphy->lna_gain = 0; in lo_measure_gain_values()
314 gphy->lna_gain = 0; in lo_measure_gain_values()
315 gphy->trsw_rx_gain = 0x20; in lo_measure_gain_values()
316 if (max_rx_gain >= 0x14) { in lo_measure_gain_values()
319 } else if (max_rx_gain >= 0x12) { in lo_measure_gain_values()
322 } else if (max_rx_gain >= 0xF) { in lo_measure_gain_values()
324 gphy->pga_gain = 0; in lo_measure_gain_values()
326 gphy->lna_lod_gain = 0; in lo_measure_gain_values()
327 gphy->pga_gain = 0; in lo_measure_gain_values()
331 tmp = b43_radio_read16(dev, 0x7A); in lo_measure_gain_values()
332 if (gphy->lna_lod_gain == 0) in lo_measure_gain_values()
333 tmp &= ~0x0008; in lo_measure_gain_values()
335 tmp |= 0x0008; in lo_measure_gain_values()
336 b43_radio_write16(dev, 0x7A, tmp); in lo_measure_gain_values()
383 sav->phy_extg_01 = b43_phy_read(dev, B43_PHY_EXTG(0x01)); in lo_measure_setup()
385 sav->phy_cck_14 = b43_phy_read(dev, B43_PHY_CCK(0x14)); in lo_measure_setup()
388 b43_phy_set(dev, B43_PHY_HPWR_TSSICTL, 0x100); in lo_measure_setup()
389 b43_phy_set(dev, B43_PHY_EXTG(0x01), 0x40); in lo_measure_setup()
390 b43_phy_set(dev, B43_PHY_DACCTL, 0x40); in lo_measure_setup()
391 b43_phy_set(dev, B43_PHY_CCK(0x14), 0x200); in lo_measure_setup()
394 phy->radio_ver == 0x2050 && phy->radio_rev < 6) { in lo_measure_setup()
395 b43_phy_write(dev, B43_PHY_CCK(0x16), 0x410); in lo_measure_setup()
396 b43_phy_write(dev, B43_PHY_CCK(0x17), 0x820); in lo_measure_setup()
405 sav->phy_cck_3E = b43_phy_read(dev, B43_PHY_CCK(0x3E)); in lo_measure_setup()
408 b43_phy_mask(dev, B43_PHY_CLASSCTL, 0xFFFC); in lo_measure_setup()
409 b43_phy_mask(dev, B43_PHY_CRS0, 0x7FFF); in lo_measure_setup()
410 b43_phy_set(dev, B43_PHY_ANALOGOVER, 0x0003); in lo_measure_setup()
411 b43_phy_mask(dev, B43_PHY_ANALOGOVERVAL, 0xFFFC); in lo_measure_setup()
415 b43_phy_write(dev, B43_PHY_RFOVER, 0x933); in lo_measure_setup()
417 b43_phy_write(dev, B43_PHY_RFOVER, 0x133); in lo_measure_setup()
420 b43_phy_write(dev, B43_PHY_RFOVER, 0); in lo_measure_setup()
422 b43_phy_write(dev, B43_PHY_CCK(0x3E), 0); in lo_measure_setup()
424 sav->reg_3F4 = b43_read16(dev, 0x3F4); in lo_measure_setup()
425 sav->reg_3E2 = b43_read16(dev, 0x3E2); in lo_measure_setup()
426 sav->radio_43 = b43_radio_read16(dev, 0x43); in lo_measure_setup()
427 sav->radio_7A = b43_radio_read16(dev, 0x7A); in lo_measure_setup()
429 sav->phy_cck_2A = b43_phy_read(dev, B43_PHY_CCK(0x2A)); in lo_measure_setup()
434 sav->radio_52 = b43_radio_read16(dev, 0x52); in lo_measure_setup()
435 sav->radio_52 &= 0x00F0; in lo_measure_setup()
438 sav->phy_cck_30 = b43_phy_read(dev, B43_PHY_CCK(0x30)); in lo_measure_setup()
439 sav->phy_cck_06 = b43_phy_read(dev, B43_PHY_CCK(0x06)); in lo_measure_setup()
440 b43_phy_write(dev, B43_PHY_CCK(0x30), 0x00FF); in lo_measure_setup()
441 b43_phy_write(dev, B43_PHY_CCK(0x06), 0x3F3F); in lo_measure_setup()
443 b43_write16(dev, 0x3E2, b43_read16(dev, 0x3E2) in lo_measure_setup()
444 | 0x8000); in lo_measure_setup()
446 b43_write16(dev, 0x3F4, b43_read16(dev, 0x3F4) in lo_measure_setup()
447 & 0xF000); in lo_measure_setup()
450 (phy->type == B43_PHYTYPE_G) ? B43_PHY_LO_MASK : B43_PHY_CCK(0x2E); in lo_measure_setup()
451 b43_phy_write(dev, tmp, 0x007F); in lo_measure_setup()
454 b43_phy_write(dev, B43_PHY_SYNCCTL, tmp & 0xFF7F); in lo_measure_setup()
456 b43_radio_write16(dev, 0x007A, tmp & 0xFFF0); in lo_measure_setup()
458 b43_phy_write(dev, B43_PHY_CCK(0x2A), 0x8A3); in lo_measure_setup()
461 phy->radio_ver == 0x2050 && phy->radio_rev >= 6)) { in lo_measure_setup()
462 b43_phy_write(dev, B43_PHY_CCK(0x2B), 0x1003); in lo_measure_setup()
464 b43_phy_write(dev, B43_PHY_CCK(0x2B), 0x0802); in lo_measure_setup()
467 b43_gphy_channel_switch(dev, 6, 0); in lo_measure_setup()
468 b43_radio_read16(dev, 0x51); /* dummy read */ in lo_measure_setup()
470 b43_phy_write(dev, B43_PHY_CCK(0x2F), 0); in lo_measure_setup()
478 b43_phy_write(dev, B43_PHY_LO_MASK, 0xC078); in lo_measure_setup()
481 b43_phy_write(dev, B43_PHY_CCK(0x2E), 0x8078); in lo_measure_setup()
483 b43_phy_write(dev, B43_PHY_LO_MASK, 0x8078); in lo_measure_setup()
495 b43_phy_write(dev, B43_PHY_PGACTL, 0xE300); in lo_measure_restore()
497 b43_phy_write(dev, B43_PHY_RFOVERVAL, tmp | 0xA0); in lo_measure_restore()
499 b43_phy_write(dev, B43_PHY_RFOVERVAL, tmp | 0xA2); in lo_measure_restore()
501 b43_phy_write(dev, B43_PHY_RFOVERVAL, tmp | 0xA3); in lo_measure_restore()
503 tmp = (gphy->pga_gain | 0xEFA0); in lo_measure_restore()
508 b43_phy_write(dev, B43_PHY_CCK(0x2E), 0xC078); in lo_measure_restore()
510 b43_phy_write(dev, B43_PHY_CCK(0x2E), 0x8078); in lo_measure_restore()
512 b43_phy_write(dev, B43_PHY_CCK(0x2F), 0x0202); in lo_measure_restore()
514 b43_phy_write(dev, B43_PHY_CCK(0x2F), 0x0101); in lo_measure_restore()
516 b43_write16(dev, 0x3F4, sav->reg_3F4); in lo_measure_restore()
518 b43_phy_write(dev, B43_PHY_CCK(0x2A), sav->phy_cck_2A); in lo_measure_restore()
521 b43_radio_write16(dev, 0x43, sav->radio_43); in lo_measure_restore()
522 b43_radio_write16(dev, 0x7A, sav->radio_7A); in lo_measure_restore()
525 b43_radio_maskset(dev, 0x52, 0xFF0F, tmp); in lo_measure_restore()
527 b43_write16(dev, 0x3E2, sav->reg_3E2); in lo_measure_restore()
529 phy->radio_ver == 0x2050 && phy->radio_rev <= 5) { in lo_measure_restore()
530 b43_phy_write(dev, B43_PHY_CCK(0x30), sav->phy_cck_30); in lo_measure_restore()
531 b43_phy_write(dev, B43_PHY_CCK(0x06), sav->phy_cck_06); in lo_measure_restore()
540 b43_phy_write(dev, B43_PHY_CCK(0x3E), sav->phy_cck_3E); in lo_measure_restore()
544 tmp = (sav->phy_lo_mask & 0xBFFF); in lo_measure_restore()
546 b43_phy_write(dev, B43_PHY_EXTG(0x01), sav->phy_extg_01); in lo_measure_restore()
548 b43_phy_write(dev, B43_PHY_CCK(0x14), sav->phy_cck_14); in lo_measure_restore()
577 int found_lower = 0; in lo_probe_possible_loctls()
582 {.i = 1,.q = 0,}, in lo_probe_possible_loctls()
584 {.i = 0,.q = -1,}, in lo_probe_possible_loctls()
586 {.i = -1,.q = 0,}, in lo_probe_possible_loctls()
588 {.i = 0,.q = 1,}, in lo_probe_possible_loctls()
591 if (d->current_state == 0) { in lo_probe_possible_loctls()
594 } else if (d->current_state % 2 == 0) { in lo_probe_possible_loctls()
654 int max_repeat = 1, repeat_cnt = 0; in lo_probe_loctls_statemachine()
656 d.nr_measured = 0; in lo_probe_loctls_statemachine()
669 if (feedth < 0x258) { in lo_probe_loctls_statemachine()
670 if (feedth >= 0x12C) in lo_probe_loctls_statemachine()
680 d.current_state = 0; in lo_probe_loctls_statemachine()
683 (d.current_state >= 0 in lo_probe_loctls_statemachine()
701 if (d.lowest_feedth > 0x1194) in lo_probe_loctls_statemachine()
703 else if (d.lowest_feedth < 0x5DC) in lo_probe_loctls_statemachine()
705 if (repeat_cnt == 0) { in lo_probe_loctls_statemachine()
706 if (d.lowest_feedth <= 0x5DC) { in lo_probe_loctls_statemachine()
727 .i = 0, in b43_calibrate_lo_setting()
728 .q = 0, in b43_calibrate_lo_setting()
744 b43_radio_maskset(dev, 0x43, 0xFFF0, rfatt->att); in b43_calibrate_lo_setting()
745 b43_radio_maskset(dev, txctl_reg, ~txctl_value, (rfatt->with_padmix ? txctl_value :0)); in b43_calibrate_lo_setting()
829 for (i = 0; i < B43_DC_LT_SIZE * 2; i++) { in b43_gphy_dc_lt_init()
859 lo->dc_lt[idx] = (lo->dc_lt[idx] & 0x00FF) in b43_gphy_dc_lt_init()
860 | ((val & 0x00FF) << 8); in b43_gphy_dc_lt_init()
863 lo->dc_lt[idx] = (lo->dc_lt[idx] & 0xFF00) in b43_gphy_dc_lt_init()
864 | (val & 0x00FF); in b43_gphy_dc_lt_init()
870 for (i = 0; i < B43_DC_LT_SIZE; i++) in b43_gphy_dc_lt_init()
871 b43_phy_write(dev, 0x3A0 + i, lo->dc_lt[i]); in b43_gphy_dc_lt_init()
908 memset(&rf, 0, sizeof(rf)); in b43_lo_g_adjust_to()
909 memset(&bb, 0, sizeof(bb)); in b43_lo_g_adjust_to()
941 b43_gphy_dc_lt_init(dev, 0); in b43_lo_g_maintenance_work()