Lines Matching +full:0 +full:x586

40 #define NOISE_IF_OFF			0
45 #define PAPD2LUT 0
46 #define PAPD_CORR_NORM 0
47 #define PAPD_BLANKING_THRESHOLD 0
48 #define PAPD_STOP_AFTER_LAST_UPDATE 0
70 (0 + 8)
72 (0x7f << LCNPHY_txgainctrlovrval1_pagain_ovr_val1_SHIFT)
75 (0 + 8)
77 (0x7f << LCNPHY_stxtxgainctrlovrval1_pagain_ovr_val1_SHIFT)
85 (read_phy_reg((pi), 0x451) & \
86 ((0x1 << 15) | (0x1 << 14)))
88 #define txpwrctrl_off(pi) (0x7 != ((read_phy_reg(pi, 0x4a4) & 0xE000) >> 13))
94 #define SWCTRL_BT_TX 0x18
95 #define SWCTRL_OVR_DISABLE 0x40
98 #define AFE_CLK_INIT_MODE_PAPD 0
100 #define LCNPHY_TBL_ID_IQLOCAL 0x00
102 #define LCNPHY_TBL_ID_RFSEQ 0x08
103 #define LCNPHY_TBL_ID_GAIN_IDX 0x0d
104 #define LCNPHY_TBL_ID_SW_CTRL 0x0f
105 #define LCNPHY_TBL_ID_GAIN_TBL 0x12
106 #define LCNPHY_TBL_ID_SPUR 0x14
107 #define LCNPHY_TBL_ID_SAMPLEPLAY 0x15
108 #define LCNPHY_TBL_ID_SAMPLEPLAY1 0x16
132 #define LCNPHY_ACI_START_DELAY 0
135 (0 != (read_phy_reg((pi), 0x43b) & (0x1 << 6)))
191 {0, 0, 0, 0, 0, 0, 0, 0, 0},
221 ((2 << 8) | 0),
222 ((3 << 8) | 0),
223 ((4 << 8) | 0),
224 ((6 << 8) | 0),
225 ((8 << 8) | 0),
226 ((11 << 8) | 0),
227 ((16 << 8) | 0),
245 ((1 << 8) | 0),
246 ((2 << 8) | 0),
247 ((4 << 8) | 0),
248 ((6 << 8) | 0),
249 ((8 << 8) | 0),
250 ((11 << 8) | 0),
251 ((16 << 8) | 0),
252 ((23 << 8) | 0),
253 ((32 << 8) | 0),
254 ((45 << 8) | 0),
255 ((64 << 8) | 0),
269 {88, 0},
277 {0, -88},
285 {-88, 0},
293 {0, 88},
329 0x503,
330 0x4a4,
331 0x4d0,
332 0x4d9,
333 0x4da,
334 0x4a6,
335 0x938,
336 0x939,
337 0x4d8,
338 0x4d0,
339 0x4d7,
340 0x4a5,
341 0x40d,
342 0x4a2,
361 0x200100,
362 0x200200,
363 0x200004,
364 0x200014,
365 0x200024,
366 0x200034,
367 0x200134,
368 0x200234,
369 0x200334,
370 0x200434,
371 0x200037,
372 0x200137,
373 0x200237,
374 0x200337,
375 0x200437,
376 0x000035,
377 0x000135,
378 0x000235,
379 0x000037,
380 0x000137,
381 0x000237,
382 0x000337,
383 0x00013f,
384 0x00023f,
385 0x00033f,
386 0x00034f,
387 0x00044f,
388 0x00144f,
389 0x00244f,
390 0x00254f,
391 0x00354f,
392 0x00454f,
393 0x00464f,
394 0x01464f,
395 0x02464f,
396 0x03464f,
397 0x04464f,
406 0,
495 {1, 2412, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
496 {2, 2417, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
497 {3, 2422, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
498 {4, 2427, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
499 {5, 2432, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
500 {6, 2437, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
501 {7, 2442, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
502 {8, 2447, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
503 {9, 2452, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
504 {10, 2457, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
505 {11, 2462, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
506 {12, 2467, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
507 {13, 2472, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
508 {14, 2484, 0x0B, 0x0A, 0x00, 0x07, 0x0A, 0x88, 0x88, 0x80},
512 {0x00, 0, 0, 0, 0},
513 {0x01, 0x64, 0x64, 0, 0},
514 {0x02, 0x20, 0x20, 0, 0},
515 {0x03, 0x66, 0x66, 0, 0},
516 {0x04, 0xf8, 0xf8, 0, 0},
517 {0x05, 0, 0, 0, 0},
518 {0x06, 0x10, 0x10, 0, 0},
519 {0x07, 0, 0, 0, 0},
520 {0x08, 0, 0, 0, 0},
521 {0x09, 0, 0, 0, 0},
522 {0x0A, 0x37, 0x37, 0, 0},
523 {0x0B, 0x6, 0x6, 0, 0},
524 {0x0C, 0x55, 0x55, 0, 0},
525 {0x0D, 0x8b, 0x8b, 0, 0},
526 {0x0E, 0, 0, 0, 0},
527 {0x0F, 0x5, 0x5, 0, 0},
528 {0x10, 0, 0, 0, 0},
529 {0x11, 0xe, 0xe, 0, 0},
530 {0x12, 0, 0, 0, 0},
531 {0x13, 0xb, 0xb, 0, 0},
532 {0x14, 0x2, 0x2, 0, 0},
533 {0x15, 0x12, 0x12, 0, 0},
534 {0x16, 0x12, 0x12, 0, 0},
535 {0x17, 0xc, 0xc, 0, 0},
536 {0x18, 0xc, 0xc, 0, 0},
537 {0x19, 0xc, 0xc, 0, 0},
538 {0x1A, 0x8, 0x8, 0, 0},
539 {0x1B, 0x2, 0x2, 0, 0},
540 {0x1C, 0, 0, 0, 0},
541 {0x1D, 0x1, 0x1, 0, 0},
542 {0x1E, 0x12, 0x12, 0, 0},
543 {0x1F, 0x6e, 0x6e, 0, 0},
544 {0x20, 0x2, 0x2, 0, 0},
545 {0x21, 0x23, 0x23, 0, 0},
546 {0x22, 0x8, 0x8, 0, 0},
547 {0x23, 0, 0, 0, 0},
548 {0x24, 0, 0, 0, 0},
549 {0x25, 0xc, 0xc, 0, 0},
550 {0x26, 0x33, 0x33, 0, 0},
551 {0x27, 0x55, 0x55, 0, 0},
552 {0x28, 0, 0, 0, 0},
553 {0x29, 0x30, 0x30, 0, 0},
554 {0x2A, 0xb, 0xb, 0, 0},
555 {0x2B, 0x1b, 0x1b, 0, 0},
556 {0x2C, 0x3, 0x3, 0, 0},
557 {0x2D, 0x1b, 0x1b, 0, 0},
558 {0x2E, 0, 0, 0, 0},
559 {0x2F, 0x20, 0x20, 0, 0},
560 {0x30, 0xa, 0xa, 0, 0},
561 {0x31, 0, 0, 0, 0},
562 {0x32, 0x62, 0x62, 0, 0},
563 {0x33, 0x19, 0x19, 0, 0},
564 {0x34, 0x33, 0x33, 0, 0},
565 {0x35, 0x77, 0x77, 0, 0},
566 {0x36, 0, 0, 0, 0},
567 {0x37, 0x70, 0x70, 0, 0},
568 {0x38, 0x3, 0x3, 0, 0},
569 {0x39, 0xf, 0xf, 0, 0},
570 {0x3A, 0x6, 0x6, 0, 0},
571 {0x3B, 0xcf, 0xcf, 0, 0},
572 {0x3C, 0x1a, 0x1a, 0, 0},
573 {0x3D, 0x6, 0x6, 0, 0},
574 {0x3E, 0x42, 0x42, 0, 0},
575 {0x3F, 0, 0, 0, 0},
576 {0x40, 0xfb, 0xfb, 0, 0},
577 {0x41, 0x9a, 0x9a, 0, 0},
578 {0x42, 0x7a, 0x7a, 0, 0},
579 {0x43, 0x29, 0x29, 0, 0},
580 {0x44, 0, 0, 0, 0},
581 {0x45, 0x8, 0x8, 0, 0},
582 {0x46, 0xce, 0xce, 0, 0},
583 {0x47, 0x27, 0x27, 0, 0},
584 {0x48, 0x62, 0x62, 0, 0},
585 {0x49, 0x6, 0x6, 0, 0},
586 {0x4A, 0x58, 0x58, 0, 0},
587 {0x4B, 0xf7, 0xf7, 0, 0},
588 {0x4C, 0, 0, 0, 0},
589 {0x4D, 0xb3, 0xb3, 0, 0},
590 {0x4E, 0, 0, 0, 0},
591 {0x4F, 0x2, 0x2, 0, 0},
592 {0x50, 0, 0, 0, 0},
593 {0x51, 0x9, 0x9, 0, 0},
594 {0x52, 0x5, 0x5, 0, 0},
595 {0x53, 0x17, 0x17, 0, 0},
596 {0x54, 0x38, 0x38, 0, 0},
597 {0x55, 0, 0, 0, 0},
598 {0x56, 0, 0, 0, 0},
599 {0x57, 0xb, 0xb, 0, 0},
600 {0x58, 0, 0, 0, 0},
601 {0x59, 0, 0, 0, 0},
602 {0x5A, 0, 0, 0, 0},
603 {0x5B, 0, 0, 0, 0},
604 {0x5C, 0, 0, 0, 0},
605 {0x5D, 0, 0, 0, 0},
606 {0x5E, 0x88, 0x88, 0, 0},
607 {0x5F, 0xcc, 0xcc, 0, 0},
608 {0x60, 0x74, 0x74, 0, 0},
609 {0x61, 0x74, 0x74, 0, 0},
610 {0x62, 0x74, 0x74, 0, 0},
611 {0x63, 0x44, 0x44, 0, 0},
612 {0x64, 0x77, 0x77, 0, 0},
613 {0x65, 0x44, 0x44, 0, 0},
614 {0x66, 0x77, 0x77, 0, 0},
615 {0x67, 0x55, 0x55, 0, 0},
616 {0x68, 0x77, 0x77, 0, 0},
617 {0x69, 0x77, 0x77, 0, 0},
618 {0x6A, 0, 0, 0, 0},
619 {0x6B, 0x7f, 0x7f, 0, 0},
620 {0x6C, 0x8, 0x8, 0, 0},
621 {0x6D, 0, 0, 0, 0},
622 {0x6E, 0x88, 0x88, 0, 0},
623 {0x6F, 0x66, 0x66, 0, 0},
624 {0x70, 0x66, 0x66, 0, 0},
625 {0x71, 0x28, 0x28, 0, 0},
626 {0x72, 0x55, 0x55, 0, 0},
627 {0x73, 0x4, 0x4, 0, 0},
628 {0x74, 0, 0, 0, 0},
629 {0x75, 0, 0, 0, 0},
630 {0x76, 0, 0, 0, 0},
631 {0x77, 0x1, 0x1, 0, 0},
632 {0x78, 0xd6, 0xd6, 0, 0},
633 {0x79, 0, 0, 0, 0},
634 {0x7A, 0, 0, 0, 0},
635 {0x7B, 0, 0, 0, 0},
636 {0x7C, 0, 0, 0, 0},
637 {0x7D, 0, 0, 0, 0},
638 {0x7E, 0, 0, 0, 0},
639 {0x7F, 0, 0, 0, 0},
640 {0x80, 0, 0, 0, 0},
641 {0x81, 0, 0, 0, 0},
642 {0x82, 0, 0, 0, 0},
643 {0x83, 0xb4, 0xb4, 0, 0},
644 {0x84, 0x1, 0x1, 0, 0},
645 {0x85, 0x20, 0x20, 0, 0},
646 {0x86, 0x5, 0x5, 0, 0},
647 {0x87, 0xff, 0xff, 0, 0},
648 {0x88, 0x7, 0x7, 0, 0},
649 {0x89, 0x77, 0x77, 0, 0},
650 {0x8A, 0x77, 0x77, 0, 0},
651 {0x8B, 0x77, 0x77, 0, 0},
652 {0x8C, 0x77, 0x77, 0, 0},
653 {0x8D, 0x8, 0x8, 0, 0},
654 {0x8E, 0xa, 0xa, 0, 0},
655 {0x8F, 0x8, 0x8, 0, 0},
656 {0x90, 0x18, 0x18, 0, 0},
657 {0x91, 0x5, 0x5, 0, 0},
658 {0x92, 0x1f, 0x1f, 0, 0},
659 {0x93, 0x10, 0x10, 0, 0},
660 {0x94, 0x3, 0x3, 0, 0},
661 {0x95, 0, 0, 0, 0},
662 {0x96, 0, 0, 0, 0},
663 {0x97, 0xaa, 0xaa, 0, 0},
664 {0x98, 0, 0, 0, 0},
665 {0x99, 0x23, 0x23, 0, 0},
666 {0x9A, 0x7, 0x7, 0, 0},
667 {0x9B, 0xf, 0xf, 0, 0},
668 {0x9C, 0x10, 0x10, 0, 0},
669 {0x9D, 0x3, 0x3, 0, 0},
670 {0x9E, 0x4, 0x4, 0, 0},
671 {0x9F, 0x20, 0x20, 0, 0},
672 {0xA0, 0, 0, 0, 0},
673 {0xA1, 0, 0, 0, 0},
674 {0xA2, 0, 0, 0, 0},
675 {0xA3, 0, 0, 0, 0},
676 {0xA4, 0x1, 0x1, 0, 0},
677 {0xA5, 0x77, 0x77, 0, 0},
678 {0xA6, 0x77, 0x77, 0, 0},
679 {0xA7, 0x77, 0x77, 0, 0},
680 {0xA8, 0x77, 0x77, 0, 0},
681 {0xA9, 0x8c, 0x8c, 0, 0},
682 {0xAA, 0x88, 0x88, 0, 0},
683 {0xAB, 0x78, 0x78, 0, 0},
684 {0xAC, 0x57, 0x57, 0, 0},
685 {0xAD, 0x88, 0x88, 0, 0},
686 {0xAE, 0, 0, 0, 0},
687 {0xAF, 0x8, 0x8, 0, 0},
688 {0xB0, 0x88, 0x88, 0, 0},
689 {0xB1, 0, 0, 0, 0},
690 {0xB2, 0x1b, 0x1b, 0, 0},
691 {0xB3, 0x3, 0x3, 0, 0},
692 {0xB4, 0x24, 0x24, 0, 0},
693 {0xB5, 0x3, 0x3, 0, 0},
694 {0xB6, 0x1b, 0x1b, 0, 0},
695 {0xB7, 0x24, 0x24, 0, 0},
696 {0xB8, 0x3, 0x3, 0, 0},
697 {0xB9, 0, 0, 0, 0},
698 {0xBA, 0xaa, 0xaa, 0, 0},
699 {0xBB, 0, 0, 0, 0},
700 {0xBC, 0x4, 0x4, 0, 0},
701 {0xBD, 0, 0, 0, 0},
702 {0xBE, 0x8, 0x8, 0, 0},
703 {0xBF, 0x11, 0x11, 0, 0},
704 {0xC0, 0, 0, 0, 0},
705 {0xC1, 0, 0, 0, 0},
706 {0xC2, 0x62, 0x62, 0, 0},
707 {0xC3, 0x1e, 0x1e, 0, 0},
708 {0xC4, 0x33, 0x33, 0, 0},
709 {0xC5, 0x37, 0x37, 0, 0},
710 {0xC6, 0, 0, 0, 0},
711 {0xC7, 0x70, 0x70, 0, 0},
712 {0xC8, 0x1e, 0x1e, 0, 0},
713 {0xC9, 0x6, 0x6, 0, 0},
714 {0xCA, 0x4, 0x4, 0, 0},
715 {0xCB, 0x2f, 0x2f, 0, 0},
716 {0xCC, 0xf, 0xf, 0, 0},
717 {0xCD, 0, 0, 0, 0},
718 {0xCE, 0xff, 0xff, 0, 0},
719 {0xCF, 0x8, 0x8, 0, 0},
720 {0xD0, 0x3f, 0x3f, 0, 0},
721 {0xD1, 0x3f, 0x3f, 0, 0},
722 {0xD2, 0x3f, 0x3f, 0, 0},
723 {0xD3, 0, 0, 0, 0},
724 {0xD4, 0, 0, 0, 0},
725 {0xD5, 0, 0, 0, 0},
726 {0xD6, 0xcc, 0xcc, 0, 0},
727 {0xD7, 0, 0, 0, 0},
728 {0xD8, 0x8, 0x8, 0, 0},
729 {0xD9, 0x8, 0x8, 0, 0},
730 {0xDA, 0x8, 0x8, 0, 0},
731 {0xDB, 0x11, 0x11, 0, 0},
732 {0xDC, 0, 0, 0, 0},
733 {0xDD, 0x87, 0x87, 0, 0},
734 {0xDE, 0x88, 0x88, 0, 0},
735 {0xDF, 0x8, 0x8, 0, 0},
736 {0xE0, 0x8, 0x8, 0, 0},
737 {0xE1, 0x8, 0x8, 0, 0},
738 {0xE2, 0, 0, 0, 0},
739 {0xE3, 0, 0, 0, 0},
740 {0xE4, 0, 0, 0, 0},
741 {0xE5, 0xf5, 0xf5, 0, 0},
742 {0xE6, 0x30, 0x30, 0, 0},
743 {0xE7, 0x1, 0x1, 0, 0},
744 {0xE8, 0, 0, 0, 0},
745 {0xE9, 0xff, 0xff, 0, 0},
746 {0xEA, 0, 0, 0, 0},
747 {0xEB, 0, 0, 0, 0},
748 {0xEC, 0x22, 0x22, 0, 0},
749 {0xED, 0, 0, 0, 0},
750 {0xEE, 0, 0, 0, 0},
751 {0xEF, 0, 0, 0, 0},
752 {0xF0, 0x3, 0x3, 0, 0},
753 {0xF1, 0x1, 0x1, 0, 0},
754 {0xF2, 0, 0, 0, 0},
755 {0xF3, 0, 0, 0, 0},
756 {0xF4, 0, 0, 0, 0},
757 {0xF5, 0, 0, 0, 0},
758 {0xF6, 0, 0, 0, 0},
759 {0xF7, 0x6, 0x6, 0, 0},
760 {0xF8, 0, 0, 0, 0},
761 {0xF9, 0, 0, 0, 0},
762 {0xFA, 0x40, 0x40, 0, 0},
763 {0xFB, 0, 0, 0, 0},
764 {0xFC, 0x1, 0x1, 0, 0},
765 {0xFD, 0x80, 0x80, 0, 0},
766 {0xFE, 0x2, 0x2, 0, 0},
767 {0xFF, 0x10, 0x10, 0, 0},
768 {0x100, 0x2, 0x2, 0, 0},
769 {0x101, 0x1e, 0x1e, 0, 0},
770 {0x102, 0x1e, 0x1e, 0, 0},
771 {0x103, 0, 0, 0, 0},
772 {0x104, 0x1f, 0x1f, 0, 0},
773 {0x105, 0, 0x8, 0, 1},
774 {0x106, 0x2a, 0x2a, 0, 0},
775 {0x107, 0xf, 0xf, 0, 0},
776 {0x108, 0, 0, 0, 0},
777 {0x109, 0, 0, 0, 0},
778 {0x10A, 0, 0, 0, 0},
779 {0x10B, 0, 0, 0, 0},
780 {0x10C, 0, 0, 0, 0},
781 {0x10D, 0, 0, 0, 0},
782 {0x10E, 0, 0, 0, 0},
783 {0x10F, 0, 0, 0, 0},
784 {0x110, 0, 0, 0, 0},
785 {0x111, 0, 0, 0, 0},
786 {0x112, 0, 0, 0, 0},
787 {0x113, 0, 0, 0, 0},
788 {0x114, 0, 0, 0, 0},
789 {0x115, 0, 0, 0, 0},
790 {0x116, 0, 0, 0, 0},
791 {0x117, 0, 0, 0, 0},
792 {0x118, 0, 0, 0, 0},
793 {0x119, 0, 0, 0, 0},
794 {0x11A, 0, 0, 0, 0},
795 {0x11B, 0, 0, 0, 0},
796 {0x11C, 0x1, 0x1, 0, 0},
797 {0x11D, 0, 0, 0, 0},
798 {0x11E, 0, 0, 0, 0},
799 {0x11F, 0, 0, 0, 0},
800 {0x120, 0, 0, 0, 0},
801 {0x121, 0, 0, 0, 0},
802 {0x122, 0x80, 0x80, 0, 0},
803 {0x123, 0, 0, 0, 0},
804 {0x124, 0xf8, 0xf8, 0, 0},
805 {0x125, 0, 0, 0, 0},
806 {0x126, 0, 0, 0, 0},
807 {0x127, 0, 0, 0, 0},
808 {0x128, 0, 0, 0, 0},
809 {0x129, 0, 0, 0, 0},
810 {0x12A, 0, 0, 0, 0},
811 {0x12B, 0, 0, 0, 0},
812 {0x12C, 0, 0, 0, 0},
813 {0x12D, 0, 0, 0, 0},
814 {0x12E, 0, 0, 0, 0},
815 {0x12F, 0, 0, 0, 0},
816 {0x130, 0, 0, 0, 0},
817 {0xFFFF, 0, 0, 0, 0}
825 {0, 1, 415, 1874, 64, 128, 64, 792, 1656, 64, 128, 64, 778, 1582, 64,
856 {0, 0, 0xa2, 0x0, 0x100, 0x100, 0x0, 0x0, 0x0, 0x100, 0x0, 0x0,
857 0x278, 0xfea0, 0x80, 0x100, 0x80,},
858 {1, 0, 374, 0xFF79, 16, 32, 16, 799, 0xFE74, 50, 32, 50,
859 750, 0xFE2B, 212, 0xFFCE, 212,},
860 {2, 0, 375, 0xFF16, 37, 76, 37, 799, 0xFE74, 32, 20, 32, 748,
861 0xFEF2, 128, 0xFFE2, 128}
865 mod_phy_reg(pi, 0x4a4, \
866 (0x1ff << 0), \
867 (u16)(idx) << 0)
870 mod_phy_reg(pi, 0x4a5, \
871 (0x7 << 8), \
875 (read_phy_reg((pi), 0x4a4) & \
876 ((0x1 << 15) | \
877 (0x1 << 14) | \
878 (0x1 << 13)))
881 ((read_phy_reg(pi, 0x4a5) & \
882 (0x7 << 8)) >> \
886 (read_phy_reg(pi, 0x473) & 0x1ff)
889 ((read_phy_reg(pi, 0x4a7) & \
890 (0xff << 0)) >> \
891 0)
894 mod_phy_reg(pi, 0x4a7, \
895 (0xff << 0), \
896 (u16)(target) << 0)
899 (0 != (read_radio_reg(pi, RADIO_2064_REG05C) & 0x20))
902 (0x8000 == (read_phy_reg(pi, 0x476) & 0x8000))
905 ((u8)(-(s8)(((val) & 0xf0) >> 4) + (s8)((val) & 0x0f)))
912 wlc_phy_write_table(pi, pti, 0x455, 0x457, 0x456); in wlc_lcnphy_write_table()
917 wlc_phy_read_table(pi, pti, 0x455, 0x457, 0x456); in wlc_lcnphy_read_table()
978 k = 0; in wlc_lcnphy_calc_floor()
979 if (type == 0) { in wlc_lcnphy_calc_floor()
980 if (coeff_x < 0) in wlc_lcnphy_calc_floor()
987 if ((coeff_x + 1) < 0) in wlc_lcnphy_calc_floor()
1000 dac_gain = read_phy_reg(pi, 0x439) >> 0; in wlc_lcnphy_get_tx_gain()
1001 gains->dac_gain = (dac_gain & 0x380) >> 7; in wlc_lcnphy_get_tx_gain()
1003 rfgain0 = (read_phy_reg(pi, 0x4b5) & (0xffff << 0)) >> 0; in wlc_lcnphy_get_tx_gain()
1004 rfgain1 = (read_phy_reg(pi, 0x4fb) & (0x7fff << 0)) >> 0; in wlc_lcnphy_get_tx_gain()
1006 gains->gm_gain = rfgain0 & 0xff; in wlc_lcnphy_get_tx_gain()
1007 gains->pga_gain = (rfgain0 >> 8) & 0xff; in wlc_lcnphy_get_tx_gain()
1008 gains->pad_gain = rfgain1 & 0xff; in wlc_lcnphy_get_tx_gain()
1016 dac_ctrl = (read_phy_reg(pi, 0x439) >> 0); in wlc_lcnphy_set_dac_gain()
1017 dac_ctrl = dac_ctrl & 0xc7f; in wlc_lcnphy_set_dac_gain()
1019 mod_phy_reg(pi, 0x439, (0xfff << 0), (dac_ctrl) << 0); in wlc_lcnphy_set_dac_gain()
1025 u16 bit = bEnable ? 1 : 0; in wlc_lcnphy_set_tx_gain_override()
1027 mod_phy_reg(pi, 0x4b0, (0x1 << 7), bit << 7); in wlc_lcnphy_set_tx_gain_override()
1029 mod_phy_reg(pi, 0x4b0, (0x1 << 14), bit << 14); in wlc_lcnphy_set_tx_gain_override()
1031 mod_phy_reg(pi, 0x43b, (0x1 << 6), bit << 6); in wlc_lcnphy_set_tx_gain_override()
1037 u16 ebit = enable ? 1 : 0; in wlc_lcnphy_rx_gain_override_enable()
1039 mod_phy_reg(pi, 0x4b0, (0x1 << 8), ebit << 8); in wlc_lcnphy_rx_gain_override_enable()
1041 mod_phy_reg(pi, 0x44c, (0x1 << 0), ebit << 0); in wlc_lcnphy_rx_gain_override_enable()
1044 mod_phy_reg(pi, 0x44c, (0x1 << 4), ebit << 4); in wlc_lcnphy_rx_gain_override_enable()
1045 mod_phy_reg(pi, 0x44c, (0x1 << 6), ebit << 6); in wlc_lcnphy_rx_gain_override_enable()
1046 mod_phy_reg(pi, 0x4b0, (0x1 << 5), ebit << 5); in wlc_lcnphy_rx_gain_override_enable()
1047 mod_phy_reg(pi, 0x4b0, (0x1 << 6), ebit << 6); in wlc_lcnphy_rx_gain_override_enable()
1049 mod_phy_reg(pi, 0x4b0, (0x1 << 12), ebit << 12); in wlc_lcnphy_rx_gain_override_enable()
1050 mod_phy_reg(pi, 0x4b0, (0x1 << 13), ebit << 13); in wlc_lcnphy_rx_gain_override_enable()
1051 mod_phy_reg(pi, 0x4b0, (0x1 << 5), ebit << 5); in wlc_lcnphy_rx_gain_override_enable()
1055 mod_phy_reg(pi, 0x4b0, (0x1 << 10), ebit << 10); in wlc_lcnphy_rx_gain_override_enable()
1056 mod_phy_reg(pi, 0x4e5, (0x1 << 3), ebit << 3); in wlc_lcnphy_rx_gain_override_enable()
1070 gain16_19 = biq2 & 0xf; in wlc_lcnphy_set_rx_gain_by_distribution()
1071 gain0_15 = ((biq1 & 0xf) << 12) | in wlc_lcnphy_set_rx_gain_by_distribution()
1072 ((tia & 0xf) << 8) | in wlc_lcnphy_set_rx_gain_by_distribution()
1073 ((lna2 & 0x3) << 6) | in wlc_lcnphy_set_rx_gain_by_distribution()
1074 ((lna2 & 0x3) << 4) | in wlc_lcnphy_set_rx_gain_by_distribution()
1075 ((lna1 & 0x3) << 2) | in wlc_lcnphy_set_rx_gain_by_distribution()
1076 ((lna1 & 0x3) << 0); in wlc_lcnphy_set_rx_gain_by_distribution()
1078 mod_phy_reg(pi, 0x4b6, (0xffff << 0), gain0_15 << 0); in wlc_lcnphy_set_rx_gain_by_distribution()
1079 mod_phy_reg(pi, 0x4b7, (0xf << 0), gain16_19 << 0); in wlc_lcnphy_set_rx_gain_by_distribution()
1080 mod_phy_reg(pi, 0x4b1, (0x3 << 11), lna1 << 11); in wlc_lcnphy_set_rx_gain_by_distribution()
1083 mod_phy_reg(pi, 0x4b1, (0x1 << 9), ext_lna << 9); in wlc_lcnphy_set_rx_gain_by_distribution()
1084 mod_phy_reg(pi, 0x4b1, (0x1 << 10), ext_lna << 10); in wlc_lcnphy_set_rx_gain_by_distribution()
1086 mod_phy_reg(pi, 0x4b1, (0x1 << 10), 0 << 10); in wlc_lcnphy_set_rx_gain_by_distribution()
1088 mod_phy_reg(pi, 0x4b1, (0x1 << 15), 0 << 15); in wlc_lcnphy_set_rx_gain_by_distribution()
1090 mod_phy_reg(pi, 0x4b1, (0x1 << 9), ext_lna << 9); in wlc_lcnphy_set_rx_gain_by_distribution()
1093 mod_phy_reg(pi, 0x44d, (0x1 << 0), (!trsw) << 0); in wlc_lcnphy_set_rx_gain_by_distribution()
1100 mod_phy_reg(pi, 0x44d, in wlc_lcnphy_set_trsw_override()
1101 (0x1 << 1) | in wlc_lcnphy_set_trsw_override()
1102 (0x1 << 0), (tx ? (0x1 << 1) : 0) | (rx ? (0x1 << 0) : 0)); in wlc_lcnphy_set_trsw_override()
1104 or_phy_reg(pi, 0x44c, (0x1 << 1) | (0x1 << 0)); in wlc_lcnphy_set_trsw_override()
1110 and_phy_reg(pi, 0x44c, (u16) ~((0x1 << 1) | (0x1 << 0))); in wlc_lcnphy_clear_trsw_override()
1115 mod_phy_reg(pi, 0x645, (0x3ff << 0), (a) << 0); in wlc_lcnphy_set_rx_iq_comp()
1117 mod_phy_reg(pi, 0x646, (0x3ff << 0), (b) << 0); in wlc_lcnphy_set_rx_iq_comp()
1119 mod_phy_reg(pi, 0x647, (0x3ff << 0), (a) << 0); in wlc_lcnphy_set_rx_iq_comp()
1121 mod_phy_reg(pi, 0x648, (0x3ff << 0), (b) << 0); in wlc_lcnphy_set_rx_iq_comp()
1123 mod_phy_reg(pi, 0x649, (0x3ff << 0), (a) << 0); in wlc_lcnphy_set_rx_iq_comp()
1125 mod_phy_reg(pi, 0x64a, (0x3ff << 0), (b) << 0); in wlc_lcnphy_set_rx_iq_comp()
1134 int wait_count = 0; in wlc_lcnphy_rx_iq_est()
1137 mod_phy_reg(pi, 0x6da, (0x1 << 5), (1) << 5); in wlc_lcnphy_rx_iq_est()
1139 mod_phy_reg(pi, 0x410, (0x1 << 3), (0) << 3); in wlc_lcnphy_rx_iq_est()
1141 mod_phy_reg(pi, 0x482, (0xffff << 0), (num_samps) << 0); in wlc_lcnphy_rx_iq_est()
1143 mod_phy_reg(pi, 0x481, (0xff << 0), ((u16) wait_time) << 0); in wlc_lcnphy_rx_iq_est()
1145 mod_phy_reg(pi, 0x481, (0x1 << 8), (0) << 8); in wlc_lcnphy_rx_iq_est()
1147 mod_phy_reg(pi, 0x481, (0x1 << 9), (1) << 9); in wlc_lcnphy_rx_iq_est()
1149 while (read_phy_reg(pi, 0x481) & (0x1 << 9)) { in wlc_lcnphy_rx_iq_est()
1159 iq_est->iq_prod = ((u32) read_phy_reg(pi, 0x483) << 16) | in wlc_lcnphy_rx_iq_est()
1160 (u32) read_phy_reg(pi, 0x484); in wlc_lcnphy_rx_iq_est()
1161 iq_est->i_pwr = ((u32) read_phy_reg(pi, 0x485) << 16) | in wlc_lcnphy_rx_iq_est()
1162 (u32) read_phy_reg(pi, 0x486); in wlc_lcnphy_rx_iq_est()
1163 iq_est->q_pwr = ((u32) read_phy_reg(pi, 0x487) << 16) | in wlc_lcnphy_rx_iq_est()
1164 (u32) read_phy_reg(pi, 0x488); in wlc_lcnphy_rx_iq_est()
1167 mod_phy_reg(pi, 0x410, (0x1 << 3), (1) << 3); in wlc_lcnphy_rx_iq_est()
1169 mod_phy_reg(pi, 0x6da, (0x1 << 5), (0) << 5); in wlc_lcnphy_rx_iq_est()
1179 struct lcnphy_iq_est iq_est = { 0, 0, 0 }; in wlc_lcnphy_calc_rx_iq_comp()
1186 a0_new = ((read_phy_reg(pi, 0x645) & (0x3ff << 0)) >> 0); in wlc_lcnphy_calc_rx_iq_comp()
1187 b0_new = ((read_phy_reg(pi, 0x646) & (0x3ff << 0)) >> 0); in wlc_lcnphy_calc_rx_iq_comp()
1188 mod_phy_reg(pi, 0x6d1, (0x1 << 2), (0) << 2); in wlc_lcnphy_calc_rx_iq_comp()
1190 mod_phy_reg(pi, 0x64b, (0x1 << 6), (1) << 6); in wlc_lcnphy_calc_rx_iq_comp()
1192 wlc_lcnphy_set_rx_iq_comp(pi, 0, 0); in wlc_lcnphy_calc_rx_iq_comp()
1211 if (arsh >= 0) { in wlc_lcnphy_calc_rx_iq_comp()
1214 if (temp == 0) in wlc_lcnphy_calc_rx_iq_comp()
1219 if (temp == 0) in wlc_lcnphy_calc_rx_iq_comp()
1224 if (brsh >= 0) { in wlc_lcnphy_calc_rx_iq_comp()
1227 if (temp == 0) in wlc_lcnphy_calc_rx_iq_comp()
1232 if (temp == 0) in wlc_lcnphy_calc_rx_iq_comp()
1239 a0_new = (u16) (a & 0x3ff); in wlc_lcnphy_calc_rx_iq_comp()
1240 b0_new = (u16) (b & 0x3ff); in wlc_lcnphy_calc_rx_iq_comp()
1245 mod_phy_reg(pi, 0x64b, (0x1 << 0), (1) << 0); in wlc_lcnphy_calc_rx_iq_comp()
1247 mod_phy_reg(pi, 0x64b, (0x1 << 3), (1) << 3); in wlc_lcnphy_calc_rx_iq_comp()
1257 struct lcnphy_iq_est iq_est = { 0, 0, 0 }; in wlc_lcnphy_measure_digital_power()
1260 return 0; in wlc_lcnphy_measure_digital_power()
1271 wlc_lcnphy_set_rx_gain_by_distribution(pi, 0, 0, 0, biq1_gain, tia_gain, in wlc_lcnphy_rx_iq_cal_gain()
1272 lna2_gain, 0); in wlc_lcnphy_rx_iq_cal_gain()
1275 wlc_lcnphy_start_tx_tone(pi, 2000, (40 >> 1), 0); in wlc_lcnphy_rx_iq_cal_gain()
1277 write_radio_reg(pi, RADIO_2064_REG112, 0); in wlc_lcnphy_rx_iq_cal_gain()
1281 wlc_lcnphy_start_tx_tone(pi, 2000, 40, 0); in wlc_lcnphy_rx_iq_cal_gain()
1283 write_radio_reg(pi, RADIO_2064_REG112, 0); in wlc_lcnphy_rx_iq_cal_gain()
1309 u8 tx_gain_index_old = 0; in wlc_lcnphy_rx_iq_cal()
1345 for (i = 0; i < 11; i++) in wlc_lcnphy_rx_iq_cal()
1348 Core1TxControl_old = read_phy_reg(pi, 0x631); in wlc_lcnphy_rx_iq_cal()
1350 or_phy_reg(pi, 0x631, 0x0015); in wlc_lcnphy_rx_iq_cal()
1352 read_phy_reg(pi, 0x44c); /* RFOverride0_old */ in wlc_lcnphy_rx_iq_cal()
1353 RFOverrideVal0_old = read_phy_reg(pi, 0x44d); in wlc_lcnphy_rx_iq_cal()
1354 rfoverride2_old = read_phy_reg(pi, 0x4b0); in wlc_lcnphy_rx_iq_cal()
1355 rfoverride2val_old = read_phy_reg(pi, 0x4b1); in wlc_lcnphy_rx_iq_cal()
1356 rfoverride3_old = read_phy_reg(pi, 0x4f9); in wlc_lcnphy_rx_iq_cal()
1357 rfoverride3val_old = read_phy_reg(pi, 0x4fa); in wlc_lcnphy_rx_iq_cal()
1358 rfoverride4_old = read_phy_reg(pi, 0x938); in wlc_lcnphy_rx_iq_cal()
1359 rfoverride4val_old = read_phy_reg(pi, 0x939); in wlc_lcnphy_rx_iq_cal()
1360 afectrlovr_old = read_phy_reg(pi, 0x43b); in wlc_lcnphy_rx_iq_cal()
1361 afectrlovrval_old = read_phy_reg(pi, 0x43c); in wlc_lcnphy_rx_iq_cal()
1362 old_sslpnCalibClkEnCtrl = read_phy_reg(pi, 0x6da); in wlc_lcnphy_rx_iq_cal()
1363 old_sslpnRxFeClkEnCtrl = read_phy_reg(pi, 0x6db); in wlc_lcnphy_rx_iq_cal()
1373 mod_phy_reg(pi, 0x4f9, (0x1 << 0), 1 << 0); in wlc_lcnphy_rx_iq_cal()
1374 mod_phy_reg(pi, 0x4fa, (0x1 << 0), 0 << 0); in wlc_lcnphy_rx_iq_cal()
1376 mod_phy_reg(pi, 0x43b, (0x1 << 1), 1 << 1); in wlc_lcnphy_rx_iq_cal()
1377 mod_phy_reg(pi, 0x43c, (0x1 << 1), 0 << 1); in wlc_lcnphy_rx_iq_cal()
1379 write_radio_reg(pi, RADIO_2064_REG116, 0x06); in wlc_lcnphy_rx_iq_cal()
1380 write_radio_reg(pi, RADIO_2064_REG12C, 0x07); in wlc_lcnphy_rx_iq_cal()
1381 write_radio_reg(pi, RADIO_2064_REG06A, 0xd3); in wlc_lcnphy_rx_iq_cal()
1382 write_radio_reg(pi, RADIO_2064_REG098, 0x03); in wlc_lcnphy_rx_iq_cal()
1383 write_radio_reg(pi, RADIO_2064_REG00B, 0x7); in wlc_lcnphy_rx_iq_cal()
1385 write_radio_reg(pi, RADIO_2064_REG01D, 0x01); in wlc_lcnphy_rx_iq_cal()
1386 write_radio_reg(pi, RADIO_2064_REG114, 0x01); in wlc_lcnphy_rx_iq_cal()
1387 write_radio_reg(pi, RADIO_2064_REG02E, 0x10); in wlc_lcnphy_rx_iq_cal()
1388 write_radio_reg(pi, RADIO_2064_REG12A, 0x08); in wlc_lcnphy_rx_iq_cal()
1390 mod_phy_reg(pi, 0x938, (0x1 << 0), 1 << 0); in wlc_lcnphy_rx_iq_cal()
1391 mod_phy_reg(pi, 0x939, (0x1 << 0), 0 << 0); in wlc_lcnphy_rx_iq_cal()
1392 mod_phy_reg(pi, 0x938, (0x1 << 1), 1 << 1); in wlc_lcnphy_rx_iq_cal()
1393 mod_phy_reg(pi, 0x939, (0x1 << 1), 1 << 1); in wlc_lcnphy_rx_iq_cal()
1394 mod_phy_reg(pi, 0x938, (0x1 << 2), 1 << 2); in wlc_lcnphy_rx_iq_cal()
1395 mod_phy_reg(pi, 0x939, (0x1 << 2), 1 << 2); in wlc_lcnphy_rx_iq_cal()
1396 mod_phy_reg(pi, 0x938, (0x1 << 3), 1 << 3); in wlc_lcnphy_rx_iq_cal()
1397 mod_phy_reg(pi, 0x939, (0x1 << 3), 1 << 3); in wlc_lcnphy_rx_iq_cal()
1398 mod_phy_reg(pi, 0x938, (0x1 << 5), 1 << 5); in wlc_lcnphy_rx_iq_cal()
1399 mod_phy_reg(pi, 0x939, (0x1 << 5), 0 << 5); in wlc_lcnphy_rx_iq_cal()
1401 mod_phy_reg(pi, 0x43b, (0x1 << 0), 1 << 0); in wlc_lcnphy_rx_iq_cal()
1402 mod_phy_reg(pi, 0x43c, (0x1 << 0), 0 << 0); in wlc_lcnphy_rx_iq_cal()
1404 write_phy_reg(pi, 0x6da, 0xffff); in wlc_lcnphy_rx_iq_cal()
1405 or_phy_reg(pi, 0x6db, 0x3); in wlc_lcnphy_rx_iq_cal()
1408 for (lna2_gain = 3; lna2_gain >= 0; lna2_gain--) { in wlc_lcnphy_rx_iq_cal()
1409 for (tia_gain = 4; tia_gain >= 0; tia_gain--) { in wlc_lcnphy_rx_iq_cal()
1410 for (biq1_gain = 6; biq1_gain >= 0; biq1_gain--) { in wlc_lcnphy_rx_iq_cal()
1430 write_phy_reg(pi, 0x631, Core1TxControl_old); in wlc_lcnphy_rx_iq_cal()
1432 write_phy_reg(pi, 0x44c, RFOverrideVal0_old); in wlc_lcnphy_rx_iq_cal()
1433 write_phy_reg(pi, 0x44d, RFOverrideVal0_old); in wlc_lcnphy_rx_iq_cal()
1434 write_phy_reg(pi, 0x4b0, rfoverride2_old); in wlc_lcnphy_rx_iq_cal()
1435 write_phy_reg(pi, 0x4b1, rfoverride2val_old); in wlc_lcnphy_rx_iq_cal()
1436 write_phy_reg(pi, 0x4f9, rfoverride3_old); in wlc_lcnphy_rx_iq_cal()
1437 write_phy_reg(pi, 0x4fa, rfoverride3val_old); in wlc_lcnphy_rx_iq_cal()
1438 write_phy_reg(pi, 0x938, rfoverride4_old); in wlc_lcnphy_rx_iq_cal()
1439 write_phy_reg(pi, 0x939, rfoverride4val_old); in wlc_lcnphy_rx_iq_cal()
1440 write_phy_reg(pi, 0x43b, afectrlovr_old); in wlc_lcnphy_rx_iq_cal()
1441 write_phy_reg(pi, 0x43c, afectrlovrval_old); in wlc_lcnphy_rx_iq_cal()
1442 write_phy_reg(pi, 0x6da, old_sslpnCalibClkEnCtrl); in wlc_lcnphy_rx_iq_cal()
1443 write_phy_reg(pi, 0x6db, old_sslpnRxFeClkEnCtrl); in wlc_lcnphy_rx_iq_cal()
1447 mod_phy_reg(pi, 0x44c, (0x1 << 2), 0 << 2); in wlc_lcnphy_rx_iq_cal()
1449 for (i = 0; i < 11; i++) in wlc_lcnphy_rx_iq_cal()
1484 afectrlovr = read_phy_reg(pi, 0x43b); in wlc_lcnphy_crsuprs()
1485 afectrlovrval = read_phy_reg(pi, 0x43c); in wlc_lcnphy_crsuprs()
1486 if (channel != 0) { in wlc_lcnphy_crsuprs()
1487 mod_phy_reg(pi, 0x43b, (0x1 << 1), (1) << 1); in wlc_lcnphy_crsuprs()
1489 mod_phy_reg(pi, 0x43c, (0x1 << 1), (0) << 1); in wlc_lcnphy_crsuprs()
1491 mod_phy_reg(pi, 0x43b, (0x1 << 4), (1) << 4); in wlc_lcnphy_crsuprs()
1493 mod_phy_reg(pi, 0x43c, (0x1 << 6), (0) << 6); in wlc_lcnphy_crsuprs()
1495 write_phy_reg(pi, 0x44b, 0xffff); in wlc_lcnphy_crsuprs()
1498 mod_phy_reg(pi, 0x634, (0xff << 8), (0) << 8); in wlc_lcnphy_crsuprs()
1500 or_phy_reg(pi, 0x6da, 0x0080); in wlc_lcnphy_crsuprs()
1502 or_phy_reg(pi, 0x00a, 0x228); in wlc_lcnphy_crsuprs()
1504 and_phy_reg(pi, 0x00a, ~(0x228)); in wlc_lcnphy_crsuprs()
1506 and_phy_reg(pi, 0x6da, 0xFF7F); in wlc_lcnphy_crsuprs()
1507 write_phy_reg(pi, 0x43b, afectrlovr); in wlc_lcnphy_crsuprs()
1508 write_phy_reg(pi, 0x43c, afectrlovrval); in wlc_lcnphy_crsuprs()
1516 save_AfeCtrlOvrVal = read_phy_reg(pi, 0x43c); in wlc_lcnphy_toggle_afe_pwdn()
1517 save_AfeCtrlOvr = read_phy_reg(pi, 0x43b); in wlc_lcnphy_toggle_afe_pwdn()
1519 write_phy_reg(pi, 0x43c, save_AfeCtrlOvrVal | 0x1); in wlc_lcnphy_toggle_afe_pwdn()
1520 write_phy_reg(pi, 0x43b, save_AfeCtrlOvr | 0x1); in wlc_lcnphy_toggle_afe_pwdn()
1522 write_phy_reg(pi, 0x43c, save_AfeCtrlOvrVal & 0xfffe); in wlc_lcnphy_toggle_afe_pwdn()
1523 write_phy_reg(pi, 0x43b, save_AfeCtrlOvr & 0xfffe); in wlc_lcnphy_toggle_afe_pwdn()
1525 write_phy_reg(pi, 0x43c, save_AfeCtrlOvrVal); in wlc_lcnphy_toggle_afe_pwdn()
1526 write_phy_reg(pi, 0x43b, save_AfeCtrlOvr); in wlc_lcnphy_toggle_afe_pwdn()
1533 write_phy_reg(pi, 0x942, 0x7); in wlc_lcnphy_txrx_spur_avoidance_mode()
1534 write_phy_reg(pi, 0x93b, ((1 << 13) + 23)); in wlc_lcnphy_txrx_spur_avoidance_mode()
1535 write_phy_reg(pi, 0x93c, ((1 << 13) + 1989)); in wlc_lcnphy_txrx_spur_avoidance_mode()
1537 write_phy_reg(pi, 0x44a, 0x084); in wlc_lcnphy_txrx_spur_avoidance_mode()
1538 write_phy_reg(pi, 0x44a, 0x080); in wlc_lcnphy_txrx_spur_avoidance_mode()
1539 write_phy_reg(pi, 0x6d3, 0x2222); in wlc_lcnphy_txrx_spur_avoidance_mode()
1540 write_phy_reg(pi, 0x6d3, 0x2220); in wlc_lcnphy_txrx_spur_avoidance_mode()
1542 write_phy_reg(pi, 0x942, 0x0); in wlc_lcnphy_txrx_spur_avoidance_mode()
1543 write_phy_reg(pi, 0x93b, ((0 << 13) + 23)); in wlc_lcnphy_txrx_spur_avoidance_mode()
1544 write_phy_reg(pi, 0x93c, ((0 << 13) + 1989)); in wlc_lcnphy_txrx_spur_avoidance_mode()
1556 mod_phy_reg(pi, 0x448, (0x3 << 8), (2) << 8); in wlc_lcnphy_set_chanspec_tweaks()
1558 mod_phy_reg(pi, 0x448, (0x3 << 8), (1) << 8); in wlc_lcnphy_set_chanspec_tweaks()
1567 bcma_chipco_pll_write(&pi->d11core->bus->drv_cc, 0x2, in wlc_lcnphy_set_chanspec_tweaks()
1568 0x03000c04); in wlc_lcnphy_set_chanspec_tweaks()
1569 bcma_chipco_pll_maskset(&pi->d11core->bus->drv_cc, 0x3, in wlc_lcnphy_set_chanspec_tweaks()
1570 ~0x00ffffff, 0x0); in wlc_lcnphy_set_chanspec_tweaks()
1571 bcma_chipco_pll_write(&pi->d11core->bus->drv_cc, 0x4, in wlc_lcnphy_set_chanspec_tweaks()
1572 0x200005c0); in wlc_lcnphy_set_chanspec_tweaks()
1576 write_phy_reg(pi, 0x942, 0); in wlc_lcnphy_set_chanspec_tweaks()
1579 mod_phy_reg(pi, 0x424, (0xff << 8), (0x1b) << 8); in wlc_lcnphy_set_chanspec_tweaks()
1581 write_phy_reg(pi, 0x425, 0x5907); in wlc_lcnphy_set_chanspec_tweaks()
1583 bcma_chipco_pll_write(&pi->d11core->bus->drv_cc, 0x2, in wlc_lcnphy_set_chanspec_tweaks()
1584 0x03140c04); in wlc_lcnphy_set_chanspec_tweaks()
1585 bcma_chipco_pll_maskset(&pi->d11core->bus->drv_cc, 0x3, in wlc_lcnphy_set_chanspec_tweaks()
1586 ~0x00ffffff, 0x333333); in wlc_lcnphy_set_chanspec_tweaks()
1587 bcma_chipco_pll_write(&pi->d11core->bus->drv_cc, 0x4, in wlc_lcnphy_set_chanspec_tweaks()
1588 0x202c2820); in wlc_lcnphy_set_chanspec_tweaks()
1592 write_phy_reg(pi, 0x942, 0); in wlc_lcnphy_set_chanspec_tweaks()
1596 mod_phy_reg(pi, 0x424, (0xff << 8), (0x1f) << 8); in wlc_lcnphy_set_chanspec_tweaks()
1598 write_phy_reg(pi, 0x425, 0x590a); in wlc_lcnphy_set_chanspec_tweaks()
1601 or_phy_reg(pi, 0x44a, 0x44); in wlc_lcnphy_set_chanspec_tweaks()
1602 write_phy_reg(pi, 0x44a, 0x80); in wlc_lcnphy_set_chanspec_tweaks()
1610 u8 rfpll_doubler = 0; in wlc_lcnphy_radio_2064_channel_tune_4313()
1620 ci = &chan_info_2064_lcnphy[0]; in wlc_lcnphy_radio_2064_channel_tune_4313()
1623 mod_radio_reg(pi, RADIO_2064_REG09D, 0x4, 0x1 << 2); in wlc_lcnphy_radio_2064_channel_tune_4313()
1625 write_radio_reg(pi, RADIO_2064_REG09E, 0xf); in wlc_lcnphy_radio_2064_channel_tune_4313()
1635 for (i = 0; i < ARRAY_SIZE(chan_info_2064_lcnphy); i++) in wlc_lcnphy_radio_2064_channel_tune_4313()
1647 mod_radio_reg(pi, RADIO_2064_REG030, 0x3, ci->logen_rccr_tx); in wlc_lcnphy_radio_2064_channel_tune_4313()
1649 mod_radio_reg(pi, RADIO_2064_REG091, 0x3, ci->txrf_mix_tune_ctrl); in wlc_lcnphy_radio_2064_channel_tune_4313()
1651 mod_radio_reg(pi, RADIO_2064_REG038, 0xf, ci->pa_input_tune_g); in wlc_lcnphy_radio_2064_channel_tune_4313()
1653 mod_radio_reg(pi, RADIO_2064_REG030, 0x3 << 2, in wlc_lcnphy_radio_2064_channel_tune_4313()
1656 mod_radio_reg(pi, RADIO_2064_REG05E, 0xf, ci->pa_rxrf_lna1_freq_tune); in wlc_lcnphy_radio_2064_channel_tune_4313()
1658 mod_radio_reg(pi, RADIO_2064_REG05E, (0xf) << 4, in wlc_lcnphy_radio_2064_channel_tune_4313()
1666 or_radio_reg(pi, RADIO_2064_REG044, 0x07); in wlc_lcnphy_radio_2064_channel_tune_4313()
1668 or_radio_reg(pi, RADIO_2064_REG12B, (0x07) << 1); in wlc_lcnphy_radio_2064_channel_tune_4313()
1669 e44 = 0; in wlc_lcnphy_radio_2064_channel_tune_4313()
1670 e45 = 0; in wlc_lcnphy_radio_2064_channel_tune_4313()
1677 if (e44 == 0) in wlc_lcnphy_radio_2064_channel_tune_4313()
1679 else if (e45 == 0) in wlc_lcnphy_radio_2064_channel_tune_4313()
1688 write_radio_reg(pi, RADIO_2064_REG04F, 0x02); in wlc_lcnphy_radio_2064_channel_tune_4313()
1691 write_radio_reg(pi, RADIO_2064_REG052, (0x07 & (d15 >> 2))); in wlc_lcnphy_radio_2064_channel_tune_4313()
1692 write_radio_reg(pi, RADIO_2064_REG053, (d15 & 0x3) << 5); in wlc_lcnphy_radio_2064_channel_tune_4313()
1699 mod_radio_reg(pi, RADIO_2064_REG053, (0x0f << 0), in wlc_lcnphy_radio_2064_channel_tune_4313()
1702 or_radio_reg(pi, RADIO_2064_REG053, 0x10); in wlc_lcnphy_radio_2064_channel_tune_4313()
1703 write_radio_reg(pi, RADIO_2064_REG054, (u8) (setCount & 0xff)); in wlc_lcnphy_radio_2064_channel_tune_4313()
1714 mod_radio_reg(pi, RADIO_2064_REG045, (0x1f << 0), in wlc_lcnphy_radio_2064_channel_tune_4313()
1716 mod_radio_reg(pi, RADIO_2064_REG046, (0x1f << 4), in wlc_lcnphy_radio_2064_channel_tune_4313()
1718 mod_radio_reg(pi, RADIO_2064_REG046, (0x0f << 0), in wlc_lcnphy_radio_2064_channel_tune_4313()
1720 write_radio_reg(pi, RADIO_2064_REG047, (u8) (div_frac >> 8) & 0xff); in wlc_lcnphy_radio_2064_channel_tune_4313()
1721 write_radio_reg(pi, RADIO_2064_REG048, (u8) div_frac & 0xff); in wlc_lcnphy_radio_2064_channel_tune_4313()
1723 write_radio_reg(pi, RADIO_2064_REG040, 0xfb); in wlc_lcnphy_radio_2064_channel_tune_4313()
1725 write_radio_reg(pi, RADIO_2064_REG041, 0x9A); in wlc_lcnphy_radio_2064_channel_tune_4313()
1726 write_radio_reg(pi, RADIO_2064_REG042, 0xA3); in wlc_lcnphy_radio_2064_channel_tune_4313()
1727 write_radio_reg(pi, RADIO_2064_REG043, 0x0C); in wlc_lcnphy_radio_2064_channel_tune_4313()
1739 mod_radio_reg(pi, RADIO_2064_REG03C, 0x3f, cp_current); in wlc_lcnphy_radio_2064_channel_tune_4313()
1742 write_radio_reg(pi, RADIO_2064_REG03C, 0x8); in wlc_lcnphy_radio_2064_channel_tune_4313()
1744 write_radio_reg(pi, RADIO_2064_REG03C, 0x7); in wlc_lcnphy_radio_2064_channel_tune_4313()
1745 write_radio_reg(pi, RADIO_2064_REG03D, 0x3); in wlc_lcnphy_radio_2064_channel_tune_4313()
1747 mod_radio_reg(pi, RADIO_2064_REG044, 0x0c, 0x0c); in wlc_lcnphy_radio_2064_channel_tune_4313()
1761 0xd, 0xe, 0xd, 0xd, 0xd, 0xc, 0xa, in wlc_lcnphy_radio_2064_channel_tune_4313()
1762 0xb, 0xb, 0x3, 0x3, 0x2, 0x0, 0x0 in wlc_lcnphy_radio_2064_channel_tune_4313()
1765 write_radio_reg(pi, RADIO_2064_REG02A, 0xf); in wlc_lcnphy_radio_2064_channel_tune_4313()
1766 write_radio_reg(pi, RADIO_2064_REG091, 0x3); in wlc_lcnphy_radio_2064_channel_tune_4313()
1767 write_radio_reg(pi, RADIO_2064_REG038, 0x3); in wlc_lcnphy_radio_2064_channel_tune_4313()
1780 0x910, in wlc_lcnphy_load_tx_iir_filter()
1781 0x91e, in wlc_lcnphy_load_tx_iir_filter()
1782 0x91f, in wlc_lcnphy_load_tx_iir_filter()
1783 0x924, in wlc_lcnphy_load_tx_iir_filter()
1784 0x925, in wlc_lcnphy_load_tx_iir_filter()
1785 0x926, in wlc_lcnphy_load_tx_iir_filter()
1786 0x920, in wlc_lcnphy_load_tx_iir_filter()
1787 0x921, in wlc_lcnphy_load_tx_iir_filter()
1788 0x927, in wlc_lcnphy_load_tx_iir_filter()
1789 0x928, in wlc_lcnphy_load_tx_iir_filter()
1790 0x929, in wlc_lcnphy_load_tx_iir_filter()
1791 0x922, in wlc_lcnphy_load_tx_iir_filter()
1792 0x923, in wlc_lcnphy_load_tx_iir_filter()
1793 0x930, in wlc_lcnphy_load_tx_iir_filter()
1794 0x931, in wlc_lcnphy_load_tx_iir_filter()
1795 0x932 in wlc_lcnphy_load_tx_iir_filter()
1799 0x90f, in wlc_lcnphy_load_tx_iir_filter()
1800 0x900, in wlc_lcnphy_load_tx_iir_filter()
1801 0x901, in wlc_lcnphy_load_tx_iir_filter()
1802 0x906, in wlc_lcnphy_load_tx_iir_filter()
1803 0x907, in wlc_lcnphy_load_tx_iir_filter()
1804 0x908, in wlc_lcnphy_load_tx_iir_filter()
1805 0x902, in wlc_lcnphy_load_tx_iir_filter()
1806 0x903, in wlc_lcnphy_load_tx_iir_filter()
1807 0x909, in wlc_lcnphy_load_tx_iir_filter()
1808 0x90a, in wlc_lcnphy_load_tx_iir_filter()
1809 0x90b, in wlc_lcnphy_load_tx_iir_filter()
1810 0x904, in wlc_lcnphy_load_tx_iir_filter()
1811 0x905, in wlc_lcnphy_load_tx_iir_filter()
1812 0x90c, in wlc_lcnphy_load_tx_iir_filter()
1813 0x90d, in wlc_lcnphy_load_tx_iir_filter()
1814 0x90e in wlc_lcnphy_load_tx_iir_filter()
1818 for (j = 0; j < LCNPHY_NUM_TX_DIG_FILTERS_CCK; j++) { in wlc_lcnphy_load_tx_iir_filter()
1819 if (filt_type == LCNPHY_txdigfiltcoeffs_cck[j][0]) { in wlc_lcnphy_load_tx_iir_filter()
1826 for (j = 0; j < LCNPHY_NUM_DIG_FILT_COEFFS; j++) in wlc_lcnphy_load_tx_iir_filter()
1832 for (j = 0; j < LCNPHY_NUM_TX_DIG_FILTERS_OFDM; j++) { in wlc_lcnphy_load_tx_iir_filter()
1833 if (filt_type == LCNPHY_txdigfiltcoeffs_ofdm[j][0]) { in wlc_lcnphy_load_tx_iir_filter()
1840 for (j = 0; j < LCNPHY_NUM_DIG_FILT_COEFFS; j++) in wlc_lcnphy_load_tx_iir_filter()
1847 return (filt_index != -1) ? 0 : -1; in wlc_lcnphy_load_tx_iir_filter()
1854 pa_gain = (read_phy_reg(pi, 0x4fb) & in wlc_lcnphy_get_pa_gain()
1867 pi, 0x4b5, in wlc_lcnphy_set_tx_gain()
1868 (0xffff << 0), in wlc_lcnphy_set_tx_gain()
1871 0); in wlc_lcnphy_set_tx_gain()
1872 mod_phy_reg(pi, 0x4fb, in wlc_lcnphy_set_tx_gain()
1873 (0x7fff << 0), in wlc_lcnphy_set_tx_gain()
1874 ((target_gains->pad_gain) | (pa_gain << 8)) << 0); in wlc_lcnphy_set_tx_gain()
1877 pi, 0x4fc, in wlc_lcnphy_set_tx_gain()
1878 (0xffff << 0), in wlc_lcnphy_set_tx_gain()
1881 0); in wlc_lcnphy_set_tx_gain()
1882 mod_phy_reg(pi, 0x4fd, in wlc_lcnphy_set_tx_gain()
1883 (0x7fff << 0), in wlc_lcnphy_set_tx_gain()
1884 ((target_gains->pad_gain) | (pa_gain << 8)) << 0); in wlc_lcnphy_set_tx_gain()
1903 return (u8) ((m0m1 & 0xff00) >> 8); in wlc_lcnphy_get_bbmult()
1924 memset(data_buf, 0, sizeof(data_buf)); in wlc_lcnphy_clear_tx_power_offsets()
1951 mod_phy_reg(pi, 0x4d7, (0x1 << 0), (0x1) << 0); in wlc_lcnphy_set_tssi_mux()
1953 mod_phy_reg(pi, 0x4d7, (0x1 << 6), (1) << 6); in wlc_lcnphy_set_tssi_mux()
1956 mod_phy_reg(pi, 0x4d9, (0x1 << 2), (0) << 2); in wlc_lcnphy_set_tssi_mux()
1958 mod_phy_reg(pi, 0x4d9, (0x1 << 3), (1) << 3); in wlc_lcnphy_set_tssi_mux()
1961 mod_radio_reg(pi, RADIO_2064_REG086, 0x4, 0x4); in wlc_lcnphy_set_tssi_mux()
1963 mod_radio_reg(pi, RADIO_2064_REG03A, 1, 0x1); in wlc_lcnphy_set_tssi_mux()
1964 mod_radio_reg(pi, RADIO_2064_REG11A, 0x8, 0x8); in wlc_lcnphy_set_tssi_mux()
1965 mod_radio_reg(pi, RADIO_2064_REG028, 0x1, 0x0); in wlc_lcnphy_set_tssi_mux()
1966 mod_radio_reg(pi, RADIO_2064_REG11A, 0x4, 1<<2); in wlc_lcnphy_set_tssi_mux()
1967 mod_radio_reg(pi, RADIO_2064_REG036, 0x10, 0x0); in wlc_lcnphy_set_tssi_mux()
1968 mod_radio_reg(pi, RADIO_2064_REG11A, 0x10, 1<<4); in wlc_lcnphy_set_tssi_mux()
1969 mod_radio_reg(pi, RADIO_2064_REG036, 0x3, 0x0); in wlc_lcnphy_set_tssi_mux()
1970 mod_radio_reg(pi, RADIO_2064_REG035, 0xff, 0x77); in wlc_lcnphy_set_tssi_mux()
1971 mod_radio_reg(pi, RADIO_2064_REG028, 0x1e, 0xe<<1); in wlc_lcnphy_set_tssi_mux()
1972 mod_radio_reg(pi, RADIO_2064_REG112, 0x80, 1<<7); in wlc_lcnphy_set_tssi_mux()
1973 mod_radio_reg(pi, RADIO_2064_REG005, 0x7, 1<<1); in wlc_lcnphy_set_tssi_mux()
1974 mod_radio_reg(pi, RADIO_2064_REG029, 0xf0, 0<<4); in wlc_lcnphy_set_tssi_mux()
1977 mod_phy_reg(pi, 0x4d9, (0x1 << 2), (0x1) << 2); in wlc_lcnphy_set_tssi_mux()
1979 mod_phy_reg(pi, 0x4d9, (0x1 << 3), (0) << 3); in wlc_lcnphy_set_tssi_mux()
1982 mod_radio_reg(pi, RADIO_2064_REG086, 0x4, 0x4); in wlc_lcnphy_set_tssi_mux()
1984 mod_radio_reg(pi, RADIO_2064_REG03A, 1, 0); in wlc_lcnphy_set_tssi_mux()
1985 mod_radio_reg(pi, RADIO_2064_REG11A, 0x8, 0x8); in wlc_lcnphy_set_tssi_mux()
1988 mod_phy_reg(pi, 0x637, (0x3 << 14), (0) << 14); in wlc_lcnphy_set_tssi_mux()
1992 mod_radio_reg(pi, RADIO_2064_REG005, 0x7, 0x2); in wlc_lcnphy_set_tssi_mux()
1993 mod_radio_reg(pi, RADIO_2064_REG112, 0x80, 0x1 << 7); in wlc_lcnphy_set_tssi_mux()
1994 mod_radio_reg(pi, RADIO_2064_REG028, 0x1f, 0x3); in wlc_lcnphy_set_tssi_mux()
2001 N1 = ((read_phy_reg(pi, 0x4a5) & (0xff << 0)) in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2002 >> 0); in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2003 N2 = 1 << ((read_phy_reg(pi, 0x4a5) & (0x7 << 12)) in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2005 N3 = ((read_phy_reg(pi, 0x40d) & (0xff << 0)) in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2006 >> 0); in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2007 N4 = 1 << ((read_phy_reg(pi, 0x40d) & (0x7 << 8)) in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2009 N5 = ((read_phy_reg(pi, 0x4a2) & (0xff << 0)) in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2010 >> 0); in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2011 N6 = 1 << ((read_phy_reg(pi, 0x4a2) & (0x7 << 8)) in wlc_lcnphy_rfseq_tbl_adc_pwrup()
2029 mod_phy_reg(pi, 0x4d8, (0x1 << 0), (0) << 0); in wlc_lcnphy_pwrctrl_rssiparams()
2031 mod_phy_reg(pi, 0x4d8, (0x1 << 1), (0) << 1); in wlc_lcnphy_pwrctrl_rssiparams()
2033 mod_phy_reg(pi, 0x4d7, (0x1 << 3), (0) << 3); in wlc_lcnphy_pwrctrl_rssiparams()
2035 mod_phy_reg(pi, 0x4db, in wlc_lcnphy_pwrctrl_rssiparams()
2036 (0x3ff << 0) | in wlc_lcnphy_pwrctrl_rssiparams()
2037 (0x7 << 12), in wlc_lcnphy_pwrctrl_rssiparams()
2038 (auxpga_vmid << 0) | (pi_lcn->lcnphy_rssi_gs << 12)); in wlc_lcnphy_pwrctrl_rssiparams()
2040 mod_phy_reg(pi, 0x4dc, in wlc_lcnphy_pwrctrl_rssiparams()
2041 (0x3ff << 0) | in wlc_lcnphy_pwrctrl_rssiparams()
2042 (0x7 << 12), in wlc_lcnphy_pwrctrl_rssiparams()
2043 (auxpga_vmid << 0) | (pi_lcn->lcnphy_rssi_gs << 12)); in wlc_lcnphy_pwrctrl_rssiparams()
2045 mod_phy_reg(pi, 0x40a, in wlc_lcnphy_pwrctrl_rssiparams()
2046 (0x3ff << 0) | in wlc_lcnphy_pwrctrl_rssiparams()
2047 (0x7 << 12), in wlc_lcnphy_pwrctrl_rssiparams()
2048 (auxpga_vmid << 0) | (pi_lcn->lcnphy_rssi_gs << 12)); in wlc_lcnphy_pwrctrl_rssiparams()
2050 mod_phy_reg(pi, 0x40b, in wlc_lcnphy_pwrctrl_rssiparams()
2051 (0x3ff << 0) | in wlc_lcnphy_pwrctrl_rssiparams()
2052 (0x7 << 12), in wlc_lcnphy_pwrctrl_rssiparams()
2053 (auxpga_vmid_temp << 0) | (auxpga_gain_temp << 12)); in wlc_lcnphy_pwrctrl_rssiparams()
2055 mod_phy_reg(pi, 0x40c, in wlc_lcnphy_pwrctrl_rssiparams()
2056 (0x3ff << 0) | in wlc_lcnphy_pwrctrl_rssiparams()
2057 (0x7 << 12), in wlc_lcnphy_pwrctrl_rssiparams()
2058 (auxpga_vmid_temp << 0) | (auxpga_gain_temp << 12)); in wlc_lcnphy_pwrctrl_rssiparams()
2061 mod_radio_reg(pi, RADIO_2064_REG07C, (1 << 0), (1 << 0)); in wlc_lcnphy_pwrctrl_rssiparams()
2072 tssi_sel = 0x1; in wlc_lcnphy_tssi_setup()
2075 tssi_sel = 0xe; in wlc_lcnphy_tssi_setup()
2082 tab.tbl_offset = 0; in wlc_lcnphy_tssi_setup()
2083 for (ind = 0; ind < 128; ind++) { in wlc_lcnphy_tssi_setup()
2088 for (ind = 0; ind < 128; ind++) { in wlc_lcnphy_tssi_setup()
2092 mod_phy_reg(pi, 0x503, (0x1 << 0), (0) << 0); in wlc_lcnphy_tssi_setup()
2094 mod_phy_reg(pi, 0x503, (0x1 << 2), (0) << 2); in wlc_lcnphy_tssi_setup()
2096 mod_phy_reg(pi, 0x503, (0x1 << 4), (1) << 4); in wlc_lcnphy_tssi_setup()
2099 mod_phy_reg(pi, 0x4a4, (0x1 << 14), (0) << 14); in wlc_lcnphy_tssi_setup()
2101 mod_phy_reg(pi, 0x4a4, (0x1 << 15), (1) << 15); in wlc_lcnphy_tssi_setup()
2103 mod_phy_reg(pi, 0x4d0, (0x1 << 5), (0) << 5); in wlc_lcnphy_tssi_setup()
2105 mod_phy_reg(pi, 0x4a4, (0x1ff << 0), (0) << 0); in wlc_lcnphy_tssi_setup()
2107 mod_phy_reg(pi, 0x4a5, (0xff << 0), (255) << 0); in wlc_lcnphy_tssi_setup()
2109 mod_phy_reg(pi, 0x4a5, (0x7 << 12), (5) << 12); in wlc_lcnphy_tssi_setup()
2111 mod_phy_reg(pi, 0x4a5, (0x7 << 8), (0) << 8); in wlc_lcnphy_tssi_setup()
2113 mod_phy_reg(pi, 0x40d, (0xff << 0), (64) << 0); in wlc_lcnphy_tssi_setup()
2115 mod_phy_reg(pi, 0x40d, (0x7 << 8), (4) << 8); in wlc_lcnphy_tssi_setup()
2117 mod_phy_reg(pi, 0x4a2, (0xff << 0), (64) << 0); in wlc_lcnphy_tssi_setup()
2119 mod_phy_reg(pi, 0x4a2, (0x7 << 8), (4) << 8); in wlc_lcnphy_tssi_setup()
2121 mod_phy_reg(pi, 0x4d0, (0x1ff << 6), (0) << 6); in wlc_lcnphy_tssi_setup()
2123 mod_phy_reg(pi, 0x4a8, (0xff << 0), (0x1) << 0); in wlc_lcnphy_tssi_setup()
2127 mod_phy_reg(pi, 0x4a6, (0x1 << 15), (1) << 15); in wlc_lcnphy_tssi_setup()
2129 mod_phy_reg(pi, 0x4a6, (0x1ff << 0), (0xff) << 0); in wlc_lcnphy_tssi_setup()
2131 mod_phy_reg(pi, 0x49a, (0x1ff << 0), (0xff) << 0); in wlc_lcnphy_tssi_setup()
2134 mod_radio_reg(pi, RADIO_2064_REG028, 0xf, tssi_sel); in wlc_lcnphy_tssi_setup()
2135 mod_radio_reg(pi, RADIO_2064_REG086, 0x4, 0x4); in wlc_lcnphy_tssi_setup()
2137 mod_radio_reg(pi, RADIO_2064_REG028, 0x1e, tssi_sel << 1); in wlc_lcnphy_tssi_setup()
2138 mod_radio_reg(pi, RADIO_2064_REG03A, 0x1, 1); in wlc_lcnphy_tssi_setup()
2139 mod_radio_reg(pi, RADIO_2064_REG11A, 0x8, 1 << 3); in wlc_lcnphy_tssi_setup()
2142 write_radio_reg(pi, RADIO_2064_REG025, 0xc); in wlc_lcnphy_tssi_setup()
2145 mod_radio_reg(pi, RADIO_2064_REG03A, 0x1, 1); in wlc_lcnphy_tssi_setup()
2148 mod_radio_reg(pi, RADIO_2064_REG03A, 0x2, 1 << 1); in wlc_lcnphy_tssi_setup()
2150 mod_radio_reg(pi, RADIO_2064_REG03A, 0x2, 0 << 1); in wlc_lcnphy_tssi_setup()
2154 mod_radio_reg(pi, RADIO_2064_REG03A, 0x2, 1 << 1); in wlc_lcnphy_tssi_setup()
2156 mod_radio_reg(pi, RADIO_2064_REG03A, 0x4, 1 << 2); in wlc_lcnphy_tssi_setup()
2158 mod_radio_reg(pi, RADIO_2064_REG11A, 0x1, 1 << 0); in wlc_lcnphy_tssi_setup()
2160 mod_radio_reg(pi, RADIO_2064_REG005, 0x8, 1 << 3); in wlc_lcnphy_tssi_setup()
2163 mod_phy_reg(pi, 0x4d7, in wlc_lcnphy_tssi_setup()
2164 (0x1 << 3) | (0x7 << 12), 0 << 3 | 2 << 12); in wlc_lcnphy_tssi_setup()
2174 mod_phy_reg(pi, 0x938, (0x1 << 2), (1) << 2); in wlc_lcnphy_tssi_setup()
2176 mod_phy_reg(pi, 0x939, (0x1 << 2), (1) << 2); in wlc_lcnphy_tssi_setup()
2178 mod_phy_reg(pi, 0x4a4, (0x1 << 12), (1) << 12); in wlc_lcnphy_tssi_setup()
2180 mod_phy_reg(pi, 0x4d7, (0x1 << 2), (1) << 2); in wlc_lcnphy_tssi_setup()
2182 mod_phy_reg(pi, 0x4d7, (0xf << 8), (0) << 8); in wlc_lcnphy_tssi_setup()
2184 mod_radio_reg(pi, RADIO_2064_REG035, 0xff, 0x0); in wlc_lcnphy_tssi_setup()
2185 mod_radio_reg(pi, RADIO_2064_REG036, 0x3, 0x0); in wlc_lcnphy_tssi_setup()
2186 mod_radio_reg(pi, RADIO_2064_REG11A, 0x8, 0x8); in wlc_lcnphy_tssi_setup()
2240 for (i = 0, j = 0; i < ARRAY_SIZE(rate_table); i++, j++) { in wlc_lcnphy_txpower_recalc_target()
2273 mod_phy_reg(pi, 0x4a4, (0x1 << 14), (0x1) << 14); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2275 mod_phy_reg(pi, 0x4a4, (0x1 << 14), (0x0) << 14); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2277 or_phy_reg(pi, 0x6da, 0x0040); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2279 reg_offset_cck = 0; in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2280 for (i = 0; i < 4; i++) in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2288 ofdm_offset = 0; in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2296 mod_phy_reg(pi, 0x4a4, (0x1 << 15), (0x1) << 15); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2298 mod_phy_reg(pi, 0x4a4, (0x1 << 14), (0x1) << 14); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2300 mod_phy_reg(pi, 0x4a4, (0x1 << 13), (0x1) << 13); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2302 mod_phy_reg(pi, 0x4b0, (0x1 << 7), (0) << 7); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2304 mod_phy_reg(pi, 0x43b, (0x1 << 6), (0) << 6); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2306 mod_phy_reg(pi, 0x4a9, (0x1 << 15), (1) << 15); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2309 mod_phy_reg(pi, 0x4a9, (0x1ff << 0), (index2) << 0); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2311 mod_phy_reg(pi, 0x6a3, (0x1 << 4), (0) << 4); in wlc_lcnphy_set_tx_pwr_soft_ctrl()
2328 if (pi_lcn->lcnphy_tempsense_slope == 0) in wlc_lcnphy_tempcompensated_txpwrctrl()
2331 temp = (u16) wlc_lcnphy_tempsense(pi, 0); in wlc_lcnphy_tempcompensated_txpwrctrl()
2334 if (pi->tx_power_min != 0) in wlc_lcnphy_tempcompensated_txpwrctrl()
2337 delta_brd = 0; in wlc_lcnphy_tempcompensated_txpwrctrl()
2341 if (temp_diff < 0) { in wlc_lcnphy_tempcompensated_txpwrctrl()
2349 * 10), 0); in wlc_lcnphy_tempcompensated_txpwrctrl()
2354 && LCNREV_IS(pi->pubpi.phy_rev, 0)) in wlc_lcnphy_tempcompensated_txpwrctrl()
2355 delta_temp = 0; in wlc_lcnphy_tempcompensated_txpwrctrl()
2369 if (new_index < 0 || new_index > 126) in wlc_lcnphy_tempcompensated_txpwrctrl()
2397 mod_phy_reg(pi, 0x6da, (0x1 << 6), in wlc_lcnphy_set_tx_pwr_ctrl()
2398 ((LCNPHY_TX_PWR_CTRL_HW == mode) ? 1 : 0) << 6); in wlc_lcnphy_set_tx_pwr_ctrl()
2400 mod_phy_reg(pi, 0x6a3, (0x1 << 4), in wlc_lcnphy_set_tx_pwr_ctrl()
2401 ((LCNPHY_TX_PWR_CTRL_HW == mode) ? 0 : 1) << 4); in wlc_lcnphy_set_tx_pwr_ctrl()
2418 mod_radio_reg(pi, RADIO_2064_REG11F, 0x4, 0); in wlc_lcnphy_set_tx_pwr_ctrl()
2428 mod_phy_reg(pi, 0x4a4, in wlc_lcnphy_set_tx_pwr_ctrl()
2429 ((0x1 << 15) | (0x1 << 14) | (0x1 << 13)), mode); in wlc_lcnphy_set_tx_pwr_ctrl()
2435 0x4a9) & in wlc_lcnphy_set_tx_pwr_ctrl()
2436 0xFF) / 2); in wlc_lcnphy_set_tx_pwr_ctrl()
2446 for (i = 0; i < 20; i++) in wlc_lcnphy_tx_iqlo_loopback()
2450 mod_phy_reg(pi, 0x44c, (0x1 << 12), 1 << 12); in wlc_lcnphy_tx_iqlo_loopback()
2451 mod_phy_reg(pi, 0x44d, (0x1 << 14), 1 << 14); in wlc_lcnphy_tx_iqlo_loopback()
2453 mod_phy_reg(pi, 0x44c, (0x1 << 11), 1 << 11); in wlc_lcnphy_tx_iqlo_loopback()
2454 mod_phy_reg(pi, 0x44d, (0x1 << 13), 0 << 13); in wlc_lcnphy_tx_iqlo_loopback()
2456 mod_phy_reg(pi, 0x43b, (0x1 << 1), 1 << 1); in wlc_lcnphy_tx_iqlo_loopback()
2457 mod_phy_reg(pi, 0x43c, (0x1 << 1), 0 << 1); in wlc_lcnphy_tx_iqlo_loopback()
2459 mod_phy_reg(pi, 0x43b, (0x1 << 0), 1 << 0); in wlc_lcnphy_tx_iqlo_loopback()
2460 mod_phy_reg(pi, 0x43c, (0x1 << 0), 0 << 0); in wlc_lcnphy_tx_iqlo_loopback()
2463 and_radio_reg(pi, RADIO_2064_REG03A, 0xFD); in wlc_lcnphy_tx_iqlo_loopback()
2465 and_radio_reg(pi, RADIO_2064_REG03A, 0xF9); in wlc_lcnphy_tx_iqlo_loopback()
2466 or_radio_reg(pi, RADIO_2064_REG11A, 0x1); in wlc_lcnphy_tx_iqlo_loopback()
2468 or_radio_reg(pi, RADIO_2064_REG036, 0x01); in wlc_lcnphy_tx_iqlo_loopback()
2469 or_radio_reg(pi, RADIO_2064_REG11A, 0x18); in wlc_lcnphy_tx_iqlo_loopback()
2474 mod_radio_reg(pi, RADIO_2064_REG03A, 1, 0); in wlc_lcnphy_tx_iqlo_loopback()
2481 or_radio_reg(pi, RADIO_2064_REG03A, 0x3); in wlc_lcnphy_tx_iqlo_loopback()
2486 write_radio_reg(pi, RADIO_2064_REG025, 0xF); in wlc_lcnphy_tx_iqlo_loopback()
2489 mod_radio_reg(pi, RADIO_2064_REG028, 0xF, 0x4); in wlc_lcnphy_tx_iqlo_loopback()
2491 mod_radio_reg(pi, RADIO_2064_REG028, 0xF, 0x6); in wlc_lcnphy_tx_iqlo_loopback()
2494 mod_radio_reg(pi, RADIO_2064_REG028, 0x1e, 0x4 << 1); in wlc_lcnphy_tx_iqlo_loopback()
2496 mod_radio_reg(pi, RADIO_2064_REG028, 0x1e, 0x6 << 1); in wlc_lcnphy_tx_iqlo_loopback()
2501 write_radio_reg(pi, RADIO_2064_REG005, 0x8); in wlc_lcnphy_tx_iqlo_loopback()
2502 or_radio_reg(pi, RADIO_2064_REG112, 0x80); in wlc_lcnphy_tx_iqlo_loopback()
2505 or_radio_reg(pi, RADIO_2064_REG0FF, 0x10); in wlc_lcnphy_tx_iqlo_loopback()
2506 or_radio_reg(pi, RADIO_2064_REG11F, 0x44); in wlc_lcnphy_tx_iqlo_loopback()
2509 or_radio_reg(pi, RADIO_2064_REG00B, 0x7); in wlc_lcnphy_tx_iqlo_loopback()
2510 or_radio_reg(pi, RADIO_2064_REG113, 0x10); in wlc_lcnphy_tx_iqlo_loopback()
2513 write_radio_reg(pi, RADIO_2064_REG007, 0x1); in wlc_lcnphy_tx_iqlo_loopback()
2516 vmid = 0x2A6; in wlc_lcnphy_tx_iqlo_loopback()
2517 mod_radio_reg(pi, RADIO_2064_REG0FC, 0x3 << 0, (vmid >> 8) & 0x3); in wlc_lcnphy_tx_iqlo_loopback()
2518 write_radio_reg(pi, RADIO_2064_REG0FD, (vmid & 0xff)); in wlc_lcnphy_tx_iqlo_loopback()
2519 or_radio_reg(pi, RADIO_2064_REG11F, 0x44); in wlc_lcnphy_tx_iqlo_loopback()
2522 or_radio_reg(pi, RADIO_2064_REG0FF, 0x10); in wlc_lcnphy_tx_iqlo_loopback()
2524 write_radio_reg(pi, RADIO_2064_REG012, 0x02); in wlc_lcnphy_tx_iqlo_loopback()
2525 or_radio_reg(pi, RADIO_2064_REG112, 0x06); in wlc_lcnphy_tx_iqlo_loopback()
2526 write_radio_reg(pi, RADIO_2064_REG036, 0x11); in wlc_lcnphy_tx_iqlo_loopback()
2527 write_radio_reg(pi, RADIO_2064_REG059, 0xcc); in wlc_lcnphy_tx_iqlo_loopback()
2528 write_radio_reg(pi, RADIO_2064_REG05C, 0x2e); in wlc_lcnphy_tx_iqlo_loopback()
2529 write_radio_reg(pi, RADIO_2064_REG078, 0xd7); in wlc_lcnphy_tx_iqlo_loopback()
2530 write_radio_reg(pi, RADIO_2064_REG092, 0x15); in wlc_lcnphy_tx_iqlo_loopback()
2535 uint delay_count = 0; in wlc_lcnphy_iqcal_wait()
2545 return (0 == wlc_lcnphy_iqcal_active(pi)); in wlc_lcnphy_iqcal_wait()
2553 and_phy_reg(pi, 0x44c, 0x0 >> 11); in wlc_lcnphy_tx_iqlo_loopback_cleanup()
2555 and_phy_reg(pi, 0x43b, 0xC); in wlc_lcnphy_tx_iqlo_loopback_cleanup()
2557 for (i = 0; i < 20; i++) in wlc_lcnphy_tx_iqlo_loopback_cleanup()
2573 u16 syst_coeffs[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, in wlc_lcnphy_tx_iqlo_cal()
2574 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}; in wlc_lcnphy_tx_iqlo_cal()
2577 0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234 in wlc_lcnphy_tx_iqlo_cal()
2581 0x8434, 0x8334, 0x8084, 0x8267, 0x8056, 0x8234 in wlc_lcnphy_tx_iqlo_cal()
2585 0x7a97, 0x7a97, 0x7a97, 0x7a87, 0x7a87, 0x7b97 in wlc_lcnphy_tx_iqlo_cal()
2589 0x7a97, 0x7a97, 0x7a97, 0x7a87, 0x7a87, 0x7b97 in wlc_lcnphy_tx_iqlo_cal()
2598 uint i, n_cal_cmds = 0, n_cal_start = 0; in wlc_lcnphy_tx_iqlo_cal()
2606 save_sslpnRxFeClkEnCtrl = read_phy_reg(pi, 0x6db); in wlc_lcnphy_tx_iqlo_cal()
2607 save_sslpnCalibClkEnCtrl = read_phy_reg(pi, 0x6da); in wlc_lcnphy_tx_iqlo_cal()
2609 or_phy_reg(pi, 0x6da, 0x40); in wlc_lcnphy_tx_iqlo_cal()
2610 or_phy_reg(pi, 0x6db, 0x3); in wlc_lcnphy_tx_iqlo_cal()
2633 write_phy_reg(pi, 0x6da, 0xffff); in wlc_lcnphy_tx_iqlo_cal()
2634 mod_phy_reg(pi, 0x503, (0x1 << 3), (1) << 3); in wlc_lcnphy_tx_iqlo_cal()
2638 mod_phy_reg(pi, 0x4a4, (0x1 << 12), (1) << 12); in wlc_lcnphy_tx_iqlo_cal()
2642 save_txpwrctrlrfctrl2 = read_phy_reg(pi, 0x4db); in wlc_lcnphy_tx_iqlo_cal()
2644 mod_phy_reg(pi, 0x4db, (0x3ff << 0), (0x2a6) << 0); in wlc_lcnphy_tx_iqlo_cal()
2646 mod_phy_reg(pi, 0x4db, (0x7 << 12), (2) << 12); in wlc_lcnphy_tx_iqlo_cal()
2665 band_idx = (CHSPEC_IS5G(pi->radio_chanspec) ? 1 : 0); in wlc_lcnphy_tx_iqlo_cal()
2668 memset(ncorr_override, 0, sizeof(ncorr_override)); in wlc_lcnphy_tx_iqlo_cal()
2669 for (j = 0; j < iqcal_gainparams_numgains_lcnphy[band_idx]; j++) { in wlc_lcnphy_tx_iqlo_cal()
2670 if (hash == tbl_iqcal_gainparams_lcnphy[band_idx][j][0]) { in wlc_lcnphy_tx_iqlo_cal()
2686 write_phy_reg(pi, 0x453, 0xaa9); in wlc_lcnphy_tx_iqlo_cal()
2687 write_phy_reg(pi, 0x93d, 0xc0); in wlc_lcnphy_tx_iqlo_cal()
2692 16, 0); in wlc_lcnphy_tx_iqlo_cal()
2709 write_phy_reg(pi, 0x6da, 0xffff); in wlc_lcnphy_tx_iqlo_cal()
2712 u16 zero_diq = 0; in wlc_lcnphy_tx_iqlo_cal()
2716 cal_type = (cal_cmds[i] & 0x0f00) >> 8; in wlc_lcnphy_tx_iqlo_cal()
2722 0xff); in wlc_lcnphy_tx_iqlo_cal()
2724 write_phy_reg(pi, 0x452, command_num); in wlc_lcnphy_tx_iqlo_cal()
2734 write_phy_reg(pi, 0x451, cal_cmds[i]); in wlc_lcnphy_tx_iqlo_cal()
2767 txiqlocal_bestcoeffs[0], 4, 16, 80); in wlc_lcnphy_tx_iqlo_cal()
2780 write_phy_reg(pi, 0x4db, save_txpwrctrlrfctrl2); in wlc_lcnphy_tx_iqlo_cal()
2782 write_phy_reg(pi, 0x453, 0); in wlc_lcnphy_tx_iqlo_cal()
2788 write_phy_reg(pi, 0x6da, save_sslpnCalibClkEnCtrl); in wlc_lcnphy_tx_iqlo_cal()
2789 write_phy_reg(pi, 0x6db, save_sslpnRxFeClkEnCtrl); in wlc_lcnphy_tx_iqlo_cal()
2804 u16 SAVE_jtag_auxpga = read_radio_reg(pi, RADIO_2064_REG0FF) & 0x10; in wlc_lcnphy_idle_tssi_est()
2808 read_phy_reg(pi, 0x4ab); /* idleTssi */ in wlc_lcnphy_idle_tssi_est()
2809 suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & in wlc_lcnphy_idle_tssi_est()
2820 write_radio_reg(pi, RADIO_2064_REG112, 0x6); in wlc_lcnphy_idle_tssi_est()
2821 mod_radio_reg(pi, RADIO_2064_REG007, 0x1, 1); in wlc_lcnphy_idle_tssi_est()
2822 mod_radio_reg(pi, RADIO_2064_REG0FF, 0x10, 1 << 4); in wlc_lcnphy_idle_tssi_est()
2823 mod_radio_reg(pi, RADIO_2064_REG11F, 0x4, 1 << 2); in wlc_lcnphy_idle_tssi_est()
2826 mod_phy_reg(pi, 0x4d7, (0x1 << 0), (1 << 0)); in wlc_lcnphy_idle_tssi_est()
2827 mod_phy_reg(pi, 0x4d7, (0x1 << 6), (1 << 6)); in wlc_lcnphy_idle_tssi_est()
2829 wlc_lcnphy_set_bbmult(pi, 0x0); in wlc_lcnphy_idle_tssi_est()
2832 read_phy_reg(pi, 0x4ab); /* idleTssi */ in wlc_lcnphy_idle_tssi_est()
2834 idleTssi0_2C = ((read_phy_reg(pi, 0x63e) & (0x1ff << 0)) in wlc_lcnphy_idle_tssi_est()
2835 >> 0); in wlc_lcnphy_idle_tssi_est()
2847 mod_phy_reg(pi, 0x4a6, (0x1ff << 0), (idleTssi0_regvalue_2C) << 0); in wlc_lcnphy_idle_tssi_est()
2849 mod_phy_reg(pi, 0x44c, (0x1 << 12), (0) << 12); in wlc_lcnphy_idle_tssi_est()
2857 mod_radio_reg(pi, RADIO_2064_REG007, 0x1, SAVE_jtag_bb_afe_switch); in wlc_lcnphy_idle_tssi_est()
2858 mod_radio_reg(pi, RADIO_2064_REG0FF, 0x10, SAVE_jtag_auxpga); in wlc_lcnphy_idle_tssi_est()
2859 mod_radio_reg(pi, RADIO_2064_REG11F, 0x4, SAVE_iqadc_aux_en); in wlc_lcnphy_idle_tssi_est()
2860 mod_radio_reg(pi, RADIO_2064_REG112, 0x80, 1 << 7); in wlc_lcnphy_idle_tssi_est()
2888 for (i = 0; i < 14; i++) in wlc_lcnphy_vbat_temp_sense_setup()
2890 suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & in wlc_lcnphy_vbat_temp_sense_setup()
2894 save_txpwrCtrlEn = read_radio_reg(pi, 0x4a4); in wlc_lcnphy_vbat_temp_sense_setup()
2899 mod_radio_reg(pi, RADIO_2064_REG007, 0x1, 0x1); in wlc_lcnphy_vbat_temp_sense_setup()
2900 mod_radio_reg(pi, RADIO_2064_REG0FF, 0x10, 0x1 << 4); in wlc_lcnphy_vbat_temp_sense_setup()
2901 mod_radio_reg(pi, RADIO_2064_REG11F, 0x4, 0x1 << 2); in wlc_lcnphy_vbat_temp_sense_setup()
2902 mod_phy_reg(pi, 0x503, (0x1 << 0), (0) << 0); in wlc_lcnphy_vbat_temp_sense_setup()
2904 mod_phy_reg(pi, 0x503, (0x1 << 2), (0) << 2); in wlc_lcnphy_vbat_temp_sense_setup()
2906 mod_phy_reg(pi, 0x4a4, (0x1 << 14), (0) << 14); in wlc_lcnphy_vbat_temp_sense_setup()
2908 mod_phy_reg(pi, 0x4a4, (0x1 << 15), (0) << 15); in wlc_lcnphy_vbat_temp_sense_setup()
2910 mod_phy_reg(pi, 0x4d0, (0x1 << 5), (0) << 5); in wlc_lcnphy_vbat_temp_sense_setup()
2912 mod_phy_reg(pi, 0x4a5, (0xff << 0), (255) << 0); in wlc_lcnphy_vbat_temp_sense_setup()
2914 mod_phy_reg(pi, 0x4a5, (0x7 << 12), (5) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2916 mod_phy_reg(pi, 0x4a5, (0x7 << 8), (0) << 8); in wlc_lcnphy_vbat_temp_sense_setup()
2918 mod_phy_reg(pi, 0x40d, (0xff << 0), (64) << 0); in wlc_lcnphy_vbat_temp_sense_setup()
2920 mod_phy_reg(pi, 0x40d, (0x7 << 8), (6) << 8); in wlc_lcnphy_vbat_temp_sense_setup()
2922 mod_phy_reg(pi, 0x4a2, (0xff << 0), (64) << 0); in wlc_lcnphy_vbat_temp_sense_setup()
2924 mod_phy_reg(pi, 0x4a2, (0x7 << 8), (6) << 8); in wlc_lcnphy_vbat_temp_sense_setup()
2926 mod_phy_reg(pi, 0x4d9, (0x7 << 4), (2) << 4); in wlc_lcnphy_vbat_temp_sense_setup()
2928 mod_phy_reg(pi, 0x4d9, (0x7 << 8), (3) << 8); in wlc_lcnphy_vbat_temp_sense_setup()
2930 mod_phy_reg(pi, 0x4d9, (0x7 << 12), (1) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2932 mod_phy_reg(pi, 0x4da, (0x1 << 12), (0) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2934 mod_phy_reg(pi, 0x4da, (0x1 << 13), (1) << 13); in wlc_lcnphy_vbat_temp_sense_setup()
2936 mod_phy_reg(pi, 0x4a6, (0x1 << 15), (1) << 15); in wlc_lcnphy_vbat_temp_sense_setup()
2938 write_radio_reg(pi, RADIO_2064_REG025, 0xC); in wlc_lcnphy_vbat_temp_sense_setup()
2940 mod_radio_reg(pi, RADIO_2064_REG005, 0x8, 0x1 << 3); in wlc_lcnphy_vbat_temp_sense_setup()
2942 mod_phy_reg(pi, 0x938, (0x1 << 2), (1) << 2); in wlc_lcnphy_vbat_temp_sense_setup()
2944 mod_phy_reg(pi, 0x939, (0x1 << 2), (1) << 2); in wlc_lcnphy_vbat_temp_sense_setup()
2946 mod_phy_reg(pi, 0x4a4, (0x1 << 12), (1) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2956 mod_phy_reg(pi, 0x4d7, (0x1 << 3), (1) << 3); in wlc_lcnphy_vbat_temp_sense_setup()
2958 mod_phy_reg(pi, 0x4d7, (0x7 << 12), (1) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2961 auxpga_vmidfine = 0x4; in wlc_lcnphy_vbat_temp_sense_setup()
2963 mod_radio_reg(pi, RADIO_2064_REG082, 0x20, 1 << 5); in wlc_lcnphy_vbat_temp_sense_setup()
2965 mod_phy_reg(pi, 0x4d7, (0x1 << 3), (1) << 3); in wlc_lcnphy_vbat_temp_sense_setup()
2967 mod_phy_reg(pi, 0x4d7, (0x7 << 12), (3) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2970 auxpga_vmidfine = 0xa; in wlc_lcnphy_vbat_temp_sense_setup()
2975 mod_phy_reg(pi, 0x4d8, (0x1 << 0), (1) << 0); in wlc_lcnphy_vbat_temp_sense_setup()
2977 mod_phy_reg(pi, 0x4d8, (0x3ff << 2), (auxpga_vmid) << 2); in wlc_lcnphy_vbat_temp_sense_setup()
2979 mod_phy_reg(pi, 0x4d8, (0x1 << 1), (1) << 1); in wlc_lcnphy_vbat_temp_sense_setup()
2981 mod_phy_reg(pi, 0x4d8, (0x7 << 12), (auxpga_gain) << 12); in wlc_lcnphy_vbat_temp_sense_setup()
2983 mod_phy_reg(pi, 0x4d0, (0x1 << 5), (1) << 5); in wlc_lcnphy_vbat_temp_sense_setup()
2985 write_radio_reg(pi, RADIO_2064_REG112, 0x6); in wlc_lcnphy_vbat_temp_sense_setup()
2997 for (i = 0; i < 14; i++) in wlc_lcnphy_vbat_temp_sense_setup()
3001 write_radio_reg(pi, 0x4a4, save_txpwrCtrlEn); in wlc_lcnphy_vbat_temp_sense_setup()
3017 suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & in wlc_lcnphy_tx_pwr_ctrl_init()
3027 tx_gains.dac_gain = 0; in wlc_lcnphy_tx_pwr_ctrl_init()
3034 tx_gains.dac_gain = 0; in wlc_lcnphy_tx_pwr_ctrl_init()
3047 b0 = pi->txpa_2g[0]; in wlc_lcnphy_tx_pwr_ctrl_init()
3056 tab.tbl_offset = 0; in wlc_lcnphy_tx_pwr_ctrl_init()
3057 for (tssi = 0; tssi < 128; tssi++) { in wlc_lcnphy_tx_pwr_ctrl_init()
3064 mod_phy_reg(pi, 0x4d0, (0x1 << 0), (0) << 0); in wlc_lcnphy_tx_pwr_ctrl_init()
3065 mod_phy_reg(pi, 0x4d3, (0xff << 0), (0) << 0); in wlc_lcnphy_tx_pwr_ctrl_init()
3066 mod_phy_reg(pi, 0x4d3, (0xff << 8), (0) << 8); in wlc_lcnphy_tx_pwr_ctrl_init()
3067 mod_phy_reg(pi, 0x4d0, (0x1 << 4), (0) << 4); in wlc_lcnphy_tx_pwr_ctrl_init()
3068 mod_phy_reg(pi, 0x4d0, (0x1 << 2), (0) << 2); in wlc_lcnphy_tx_pwr_ctrl_init()
3070 mod_phy_reg(pi, 0x410, (0x1 << 7), (0) << 7); in wlc_lcnphy_tx_pwr_ctrl_init()
3072 write_phy_reg(pi, 0x4a8, 10); in wlc_lcnphy_tx_pwr_ctrl_init()
3084 mod_phy_reg(pi, 0x4fb, in wlc_lcnphy_set_pa_gain()
3087 mod_phy_reg(pi, 0x4fd, in wlc_lcnphy_set_pa_gain()
3107 iqcc[0] = a; in wlc_lcnphy_set_tx_iqcc()
3157 gains.gm_gain = (u16) (txgain & 0xff); in wlc_lcnphy_set_tx_pwr_by_index()
3158 gains.pga_gain = (u16) (txgain >> 8) & 0xff; in wlc_lcnphy_set_tx_pwr_by_index()
3159 gains.pad_gain = (u16) (txgain >> 16) & 0xff; in wlc_lcnphy_set_tx_pwr_by_index()
3160 gains.dac_gain = (u16) (bbmultiqcomp >> 28) & 0x07; in wlc_lcnphy_set_tx_pwr_by_index()
3162 wlc_lcnphy_set_pa_gain(pi, (u16) (txgain >> 24) & 0x7f); in wlc_lcnphy_set_tx_pwr_by_index()
3164 bb_mult = (u8) ((bbmultiqcomp >> 20) & 0xff); in wlc_lcnphy_set_tx_pwr_by_index()
3171 a = (u16) ((bbmultiqcomp >> 10) & 0x3ff); in wlc_lcnphy_set_tx_pwr_by_index()
3172 b = (u16) (bbmultiqcomp & 0x3ff); in wlc_lcnphy_set_tx_pwr_by_index()
3184 mod_phy_reg(pi, 0x6a6, (0x1fff << 0), (rfpower * 8) << 0); in wlc_lcnphy_set_tx_pwr_by_index()
3198 tab.tbl_offset = 0; in wlc_lcnphy_clear_papd_comptable()
3200 memset(temp_offset, 0, sizeof(temp_offset)); in wlc_lcnphy_clear_papd_comptable()
3202 temp_offset[j] = 0x80000; in wlc_lcnphy_clear_papd_comptable()
3212 and_phy_reg(pi, 0x43b, ~(u16) ((0x1 << 1) | (0x1 << 4))); in wlc_lcnphy_tx_pu()
3214 mod_phy_reg(pi, 0x43c, (0x1 << 1), 1 << 1); in wlc_lcnphy_tx_pu()
3216 and_phy_reg(pi, 0x44c, in wlc_lcnphy_tx_pu()
3217 ~(u16) ((0x1 << 3) | in wlc_lcnphy_tx_pu()
3218 (0x1 << 5) | in wlc_lcnphy_tx_pu()
3219 (0x1 << 12) | in wlc_lcnphy_tx_pu()
3220 (0x1 << 0) | (0x1 << 1) | (0x1 << 2))); in wlc_lcnphy_tx_pu()
3222 and_phy_reg(pi, 0x44d, in wlc_lcnphy_tx_pu()
3223 ~(u16) ((0x1 << 3) | (0x1 << 5) | (0x1 << 14))); in wlc_lcnphy_tx_pu()
3224 mod_phy_reg(pi, 0x44d, (0x1 << 2), 1 << 2); in wlc_lcnphy_tx_pu()
3226 mod_phy_reg(pi, 0x44d, (0x1 << 1) | (0x1 << 0), (0x1 << 0)); in wlc_lcnphy_tx_pu()
3228 and_phy_reg(pi, 0x4f9, in wlc_lcnphy_tx_pu()
3229 ~(u16) ((0x1 << 0) | (0x1 << 1) | (0x1 << 2))); in wlc_lcnphy_tx_pu()
3231 and_phy_reg(pi, 0x4fa, in wlc_lcnphy_tx_pu()
3232 ~(u16) ((0x1 << 0) | (0x1 << 1) | (0x1 << 2))); in wlc_lcnphy_tx_pu()
3235 mod_phy_reg(pi, 0x43b, (0x1 << 1), 1 << 1); in wlc_lcnphy_tx_pu()
3236 mod_phy_reg(pi, 0x43c, (0x1 << 1), 0 << 1); in wlc_lcnphy_tx_pu()
3238 mod_phy_reg(pi, 0x43b, (0x1 << 4), 1 << 4); in wlc_lcnphy_tx_pu()
3239 mod_phy_reg(pi, 0x43c, (0x1 << 6), 0 << 6); in wlc_lcnphy_tx_pu()
3241 mod_phy_reg(pi, 0x44c, (0x1 << 12), 1 << 12); in wlc_lcnphy_tx_pu()
3242 mod_phy_reg(pi, 0x44d, (0x1 << 14), 1 << 14); in wlc_lcnphy_tx_pu()
3246 mod_phy_reg(pi, 0x44d, (0x1 << 2), 0 << 2); in wlc_lcnphy_tx_pu()
3247 mod_phy_reg(pi, 0x44c, (0x1 << 2), 1 << 2); in wlc_lcnphy_tx_pu()
3251 mod_phy_reg(pi, 0x44c, (0x1 << 3), 1 << 3); in wlc_lcnphy_tx_pu()
3252 mod_phy_reg(pi, 0x44d, (0x1 << 3), 1 << 3); in wlc_lcnphy_tx_pu()
3254 mod_phy_reg(pi, 0x44c, (0x1 << 5), 1 << 5); in wlc_lcnphy_tx_pu()
3255 mod_phy_reg(pi, 0x44d, (0x1 << 5), 0 << 5); in wlc_lcnphy_tx_pu()
3257 mod_phy_reg(pi, 0x4f9, (0x1 << 1), 1 << 1); in wlc_lcnphy_tx_pu()
3258 mod_phy_reg(pi, 0x4fa, (0x1 << 1), 1 << 1); in wlc_lcnphy_tx_pu()
3260 mod_phy_reg(pi, 0x4f9, (0x1 << 2), 1 << 2); in wlc_lcnphy_tx_pu()
3261 mod_phy_reg(pi, 0x4fa, (0x1 << 2), 1 << 2); in wlc_lcnphy_tx_pu()
3263 mod_phy_reg(pi, 0x4f9, (0x1 << 0), 1 << 0); in wlc_lcnphy_tx_pu()
3264 mod_phy_reg(pi, 0x4fa, (0x1 << 0), 1 << 0); in wlc_lcnphy_tx_pu()
3267 mod_phy_reg(pi, 0x44c, (0x1 << 3), 1 << 3); in wlc_lcnphy_tx_pu()
3268 mod_phy_reg(pi, 0x44d, (0x1 << 3), 0 << 3); in wlc_lcnphy_tx_pu()
3270 mod_phy_reg(pi, 0x44c, (0x1 << 5), 1 << 5); in wlc_lcnphy_tx_pu()
3271 mod_phy_reg(pi, 0x44d, (0x1 << 5), 1 << 5); in wlc_lcnphy_tx_pu()
3273 mod_phy_reg(pi, 0x4f9, (0x1 << 1), 1 << 1); in wlc_lcnphy_tx_pu()
3274 mod_phy_reg(pi, 0x4fa, (0x1 << 1), 0 << 1); in wlc_lcnphy_tx_pu()
3276 mod_phy_reg(pi, 0x4f9, (0x1 << 2), 1 << 2); in wlc_lcnphy_tx_pu()
3277 mod_phy_reg(pi, 0x4fa, (0x1 << 2), 0 << 2); in wlc_lcnphy_tx_pu()
3279 mod_phy_reg(pi, 0x4f9, (0x1 << 0), 1 << 0); in wlc_lcnphy_tx_pu()
3280 mod_phy_reg(pi, 0x4fa, (0x1 << 0), 0 << 0); in wlc_lcnphy_tx_pu()
3291 or_phy_reg(pi, 0x6da, 0x8080); in wlc_lcnphy_run_samples()
3293 mod_phy_reg(pi, 0x642, (0x7f << 0), (num_samps - 1) << 0); in wlc_lcnphy_run_samples()
3294 if (num_loops != 0xffff) in wlc_lcnphy_run_samples()
3296 mod_phy_reg(pi, 0x640, (0xffff << 0), num_loops << 0); in wlc_lcnphy_run_samples()
3298 mod_phy_reg(pi, 0x641, (0xffff << 0), wait << 0); in wlc_lcnphy_run_samples()
3302 and_phy_reg(pi, 0x453, (u16) ~(0x1 << 15)); in wlc_lcnphy_run_samples()
3303 or_phy_reg(pi, 0x453, (0x1 << 15)); in wlc_lcnphy_run_samples()
3305 write_phy_reg(pi, 0x63f, 1); in wlc_lcnphy_run_samples()
3309 or_radio_reg(pi, RADIO_2064_REG112, 0x6); in wlc_lcnphy_run_samples()
3318 mod_phy_reg(pi, 0x4b0, (0x1 << 5), (mode) << 5); in wlc_lcnphy_deaf_mode()
3319 mod_phy_reg(pi, 0x4b1, (0x1 << 9), 0 << 9); in wlc_lcnphy_deaf_mode()
3321 if (phybw40 == 0) { in wlc_lcnphy_deaf_mode()
3322 mod_phy_reg((pi), 0x410, in wlc_lcnphy_deaf_mode()
3323 (0x1 << 6) | in wlc_lcnphy_deaf_mode()
3324 (0x1 << 5), in wlc_lcnphy_deaf_mode()
3326 pi->radio_chanspec)) ? (!mode) : 0) << in wlc_lcnphy_deaf_mode()
3328 mod_phy_reg(pi, 0x410, (0x1 << 7), (mode) << 7); in wlc_lcnphy_deaf_mode()
3339 s32 theta = 0, rot = 0; in wlc_lcnphy_start_tx_tone()
3352 write_phy_reg(pi, 0x942, 0x2); in wlc_lcnphy_start_tx_tone()
3353 write_phy_reg(pi, 0x93b, 0x0); in wlc_lcnphy_start_tx_tone()
3354 write_phy_reg(pi, 0x93c, 0x0); in wlc_lcnphy_start_tx_tone()
3369 theta = 0; in wlc_lcnphy_start_tx_tone()
3371 for (t = 0; t < num_samps; t++) { in wlc_lcnphy_start_tx_tone()
3377 i_samp = (u16)(CORDIC_FLOAT(tone_samp.i * max_val) & 0x3ff); in wlc_lcnphy_start_tx_tone()
3378 q_samp = (u16)(CORDIC_FLOAT(tone_samp.q * max_val) & 0x3ff); in wlc_lcnphy_start_tx_tone()
3382 mod_phy_reg(pi, 0x6d6, (0x3 << 0), 0 << 0); in wlc_lcnphy_start_tx_tone()
3384 mod_phy_reg(pi, 0x6da, (0x1 << 3), 1 << 3); in wlc_lcnphy_start_tx_tone()
3389 tab.tbl_offset = 0; in wlc_lcnphy_start_tx_tone()
3393 wlc_lcnphy_run_samples(pi, num_samps, 0xffff, 0, iqcalmode); in wlc_lcnphy_start_tx_tone()
3401 pi->phy_tx_tone_freq = 0; in wlc_lcnphy_stop_tx_tone()
3403 write_phy_reg(pi, 0x942, 0x7); in wlc_lcnphy_stop_tx_tone()
3404 write_phy_reg(pi, 0x93b, 0x2017); in wlc_lcnphy_stop_tx_tone()
3405 write_phy_reg(pi, 0x93c, 0x27c5); in wlc_lcnphy_stop_tx_tone()
3409 playback_status = read_phy_reg(pi, 0x644); in wlc_lcnphy_stop_tx_tone()
3410 if (playback_status & (0x1 << 0)) { in wlc_lcnphy_stop_tx_tone()
3411 wlc_lcnphy_tx_pu(pi, 0); in wlc_lcnphy_stop_tx_tone()
3412 mod_phy_reg(pi, 0x63f, (0x1 << 1), 1 << 1); in wlc_lcnphy_stop_tx_tone()
3413 } else if (playback_status & (0x1 << 1)) in wlc_lcnphy_stop_tx_tone()
3414 mod_phy_reg(pi, 0x453, (0x1 << 15), 0 << 15); in wlc_lcnphy_stop_tx_tone()
3416 mod_phy_reg(pi, 0x6d6, (0x3 << 0), 1 << 0); in wlc_lcnphy_stop_tx_tone()
3418 mod_phy_reg(pi, 0x6da, (0x1 << 3), 0 << 3); in wlc_lcnphy_stop_tx_tone()
3420 mod_phy_reg(pi, 0x6da, (0x1 << 7), 0 << 7); in wlc_lcnphy_stop_tx_tone()
3422 and_radio_reg(pi, RADIO_2064_REG112, 0xFFF9); in wlc_lcnphy_stop_tx_tone()
3434 case 0: in wlc_lcnphy_set_cc()
3438 di0dq0 = (coeff_x & 0xff) << 8 | (coeff_y & 0xff); in wlc_lcnphy_set_cc()
3442 k = wlc_lcnphy_calc_floor(coeff_x, 0); in wlc_lcnphy_set_cc()
3448 k = wlc_lcnphy_calc_floor(coeff_y, 0); in wlc_lcnphy_set_cc()
3456 k = wlc_lcnphy_calc_floor(coeff_x, 0); in wlc_lcnphy_set_cc()
3462 k = wlc_lcnphy_calc_floor(coeff_y, 0); in wlc_lcnphy_set_cc()
3478 cc.re = 0; in wlc_lcnphy_get_cc()
3479 cc.im = 0; in wlc_lcnphy_get_cc()
3481 case 0: in wlc_lcnphy_get_cc()
3488 di0 = (((didq & 0xff00) << 16) >> 24); in wlc_lcnphy_get_cc()
3489 dq0 = (((didq & 0x00ff) << 24) >> 24); in wlc_lcnphy_get_cc()
3517 timer = 0; in wlc_lcnphy_samp_cap()
3518 old_sslpnCalibClkEnCtrl = read_phy_reg(pi, 0x6da); in wlc_lcnphy_samp_cap()
3521 ptr[130] = 0; in wlc_lcnphy_samp_cap()
3525 bcma_write16(pi->d11core, D11REGOFFS(smpl_clct_strptr), 0x7E00); in wlc_lcnphy_samp_cap()
3526 bcma_write16(pi->d11core, D11REGOFFS(smpl_clct_stpptr), 0x8000); in wlc_lcnphy_samp_cap()
3530 curval2 | 0x30); in wlc_lcnphy_samp_cap()
3532 write_phy_reg(pi, 0x555, 0x0); in wlc_lcnphy_samp_cap()
3533 write_phy_reg(pi, 0x5a6, 0x5); in wlc_lcnphy_samp_cap()
3535 write_phy_reg(pi, 0x5a2, (u16) (mode | mode << 6)); in wlc_lcnphy_samp_cap()
3536 write_phy_reg(pi, 0x5cf, 3); in wlc_lcnphy_samp_cap()
3537 write_phy_reg(pi, 0x5a5, 0x3); in wlc_lcnphy_samp_cap()
3538 write_phy_reg(pi, 0x583, 0x0); in wlc_lcnphy_samp_cap()
3539 write_phy_reg(pi, 0x584, 0x0); in wlc_lcnphy_samp_cap()
3540 write_phy_reg(pi, 0x585, 0x0fff); in wlc_lcnphy_samp_cap()
3541 write_phy_reg(pi, 0x586, 0x0000); in wlc_lcnphy_samp_cap()
3543 write_phy_reg(pi, 0x580, 0x4501); in wlc_lcnphy_samp_cap()
3545 sslpnCalibClkEnCtrl = read_phy_reg(pi, 0x6da); in wlc_lcnphy_samp_cap()
3546 write_phy_reg(pi, 0x6da, (u32) (sslpnCalibClkEnCtrl | 0x2008)); in wlc_lcnphy_samp_cap()
3555 bcma_write16(pi->d11core, D11REGOFFS(psm_phy_hdr_param), 0x2); in wlc_lcnphy_samp_cap()
3556 strptr = 0x7E00; in wlc_lcnphy_samp_cap()
3558 while (strptr < 0x8000) { in wlc_lcnphy_samp_cap()
3560 imag = ((val >> 16) & 0x3ff); in wlc_lcnphy_samp_cap()
3561 real = ((val) & 0x3ff); in wlc_lcnphy_samp_cap()
3569 ptr[(strptr - 0x7E00) / 4] = real; in wlc_lcnphy_samp_cap()
3571 ptr[(strptr - 0x7E00) / 4] = imag; in wlc_lcnphy_samp_cap()
3575 strptr = 0x8000; in wlc_lcnphy_samp_cap()
3583 write_phy_reg(pi, 0x6da, old_sslpnCalibClkEnCtrl); in wlc_lcnphy_samp_cap()
3606 phy_c21 = 0; in wlc_lcnphy_a1()
3607 phy_c10 = phy_c13 = phy_c14 = phy_c8 = 0; in wlc_lcnphy_a1()
3617 phy_c26 = read_phy_reg(pi, 0x6da); in wlc_lcnphy_a1()
3618 phy_c27 = read_phy_reg(pi, 0x6db); in wlc_lcnphy_a1()
3620 write_phy_reg(pi, 0x93d, 0xC0); in wlc_lcnphy_a1()
3622 wlc_lcnphy_start_tx_tone(pi, 3750, 88, 0); in wlc_lcnphy_a1()
3623 write_phy_reg(pi, 0x6da, 0xffff); in wlc_lcnphy_a1()
3624 or_phy_reg(pi, 0x6db, 0x3); in wlc_lcnphy_a1()
3628 phy_c28 = read_phy_reg(pi, 0x938); in wlc_lcnphy_a1()
3629 phy_c29 = read_phy_reg(pi, 0x4d7); in wlc_lcnphy_a1()
3630 phy_c30 = read_phy_reg(pi, 0x4d8); in wlc_lcnphy_a1()
3631 or_phy_reg(pi, 0x938, 0x1 << 2); in wlc_lcnphy_a1()
3632 or_phy_reg(pi, 0x4d7, 0x1 << 2); in wlc_lcnphy_a1()
3633 or_phy_reg(pi, 0x4d7, 0x1 << 3); in wlc_lcnphy_a1()
3634 mod_phy_reg(pi, 0x4d7, (0x7 << 12), 0x2 << 12); in wlc_lcnphy_a1()
3635 or_phy_reg(pi, 0x4d8, 1 << 0); in wlc_lcnphy_a1()
3636 or_phy_reg(pi, 0x4d8, 1 << 1); in wlc_lcnphy_a1()
3637 mod_phy_reg(pi, 0x4d8, (0x3ff << 2), 0x23A << 2); in wlc_lcnphy_a1()
3638 mod_phy_reg(pi, 0x4d8, (0x7 << 12), 0x7 << 12); in wlc_lcnphy_a1()
3639 phy_c1 = &lcnphy_spb_tone_3750[0]; in wlc_lcnphy_a1()
3642 if (num_levels == 0) { in wlc_lcnphy_a1()
3643 if (cal_type != 0) in wlc_lcnphy_a1()
3648 if (step_size_lg2 == 0) { in wlc_lcnphy_a1()
3649 if (cal_type != 0) in wlc_lcnphy_a1()
3667 for (phy_c8 = 0; phy_c7 != 0 && phy_c8 < num_levels; phy_c8++) { in wlc_lcnphy_a1()
3671 case 0: in wlc_lcnphy_a1()
3685 phy_c9 = read_phy_reg(pi, 0x93d); in wlc_lcnphy_a1()
3692 (phy_c5 & 0x7) | ((phy_c5 & 0x7) << 4)); in wlc_lcnphy_a1()
3695 ptr[130] = 0; in wlc_lcnphy_a1()
3696 wlc_lcnphy_samp_cap(pi, 1, phy_c9, &ptr[0], 2); in wlc_lcnphy_a1()
3705 if (phy_c5 <= 0 || phy_c5 >= 7) in wlc_lcnphy_a1()
3711 if (phy_c5 < 0) in wlc_lcnphy_a1()
3712 phy_c5 = 0; in wlc_lcnphy_a1()
3732 wlc_lcnphy_samp_cap(pi, 0, 0, ptr, 2); in wlc_lcnphy_a1()
3734 phy_c18 = 0; in wlc_lcnphy_a1()
3735 phy_c19 = 0; in wlc_lcnphy_a1()
3736 for (j = 0; j < 128; j++) { in wlc_lcnphy_a1()
3737 if (cal_type != 0) in wlc_lcnphy_a1()
3773 write_phy_reg(pi, 0x6da, phy_c26); in wlc_lcnphy_a1()
3774 write_phy_reg(pi, 0x6db, phy_c27); in wlc_lcnphy_a1()
3775 write_phy_reg(pi, 0x938, phy_c28); in wlc_lcnphy_a1()
3776 write_phy_reg(pi, 0x4d7, phy_c29); in wlc_lcnphy_a1()
3777 write_phy_reg(pi, 0x4d8, phy_c30); in wlc_lcnphy_a1()
3791 tab.tbl_id = 0; in wlc_lcnphy_get_tx_iqcc()
3796 *a = iqcc[0]; in wlc_lcnphy_get_tx_iqcc()
3802 wlc_lcnphy_set_cc(pi, 0, 0, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3803 wlc_lcnphy_set_cc(pi, 2, 0, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3804 wlc_lcnphy_set_cc(pi, 3, 0, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3805 wlc_lcnphy_set_cc(pi, 4, 0, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3807 wlc_lcnphy_a1(pi, 4, 0, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3808 wlc_lcnphy_a1(pi, 3, 0, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3810 wlc_lcnphy_a1(pi, 0, 5, 8); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3812 wlc_lcnphy_a1(pi, 0, 4, 3); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3814 wlc_lcnphy_get_cc(pi, 0); in wlc_lcnphy_tx_iqlo_soft_cal_full()
3825 tab.tbl_id = 0; in wlc_lcnphy_get_tx_locc()
3840 u16 a, b, didq, save_pa_gain = 0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3841 uint idx, SAVE_txpwrindex = 0xFF; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3859 target_gains.pga_gain = 0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3861 target_gains.dac_gain = 0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3882 target_gains.pad_gain = 0xf0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3883 target_gains.dac_gain = 0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3888 target_gains.dac_gain = 0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3894 target_gains.pga_gain = 0; in wlc_lcnphy_txpwrtbl_iqlo_cal()
3915 for (idx = 0; idx < 128; idx++) { in wlc_lcnphy_txpwrtbl_iqlo_cal()
3919 val = (val & 0xfff00000) | in wlc_lcnphy_txpwrtbl_iqlo_cal()
3920 ((u32) (a & 0x3FF) << 10) | (b & 0x3ff); in wlc_lcnphy_txpwrtbl_iqlo_cal()
3949 s16 avg = 0; in wlc_lcnphy_tempsense_new()
3953 suspend = (0 == (bcma_read32(pi->d11core, in wlc_lcnphy_tempsense_new()
3960 tempsenseval1 = read_phy_reg(pi, 0x476) & 0x1FF; in wlc_lcnphy_tempsense_new()
3961 tempsenseval2 = read_phy_reg(pi, 0x477) & 0x1FF; in wlc_lcnphy_tempsense_new()
3977 mod_phy_reg(pi, 0x448, (0x1 << 14), (1) << 14); in wlc_lcnphy_tempsense_new()
3980 mod_phy_reg(pi, 0x448, (0x1 << 14), (0) << 14); in wlc_lcnphy_tempsense_new()
3991 s32 avg = 0; in wlc_lcnphy_tempsense()
3997 suspend = (0 == (bcma_read32(pi->d11core, in wlc_lcnphy_tempsense()
4004 tempsenseval1 = read_phy_reg(pi, 0x476) & 0x1FF; in wlc_lcnphy_tempsense()
4005 tempsenseval2 = read_phy_reg(pi, 0x477) & 0x1FF; in wlc_lcnphy_tempsense()
4024 if (avg < 0) in wlc_lcnphy_tempsense()
4035 mod_phy_reg(pi, 0x448, (0x1 << 14), (1) << 14); in wlc_lcnphy_tempsense()
4038 mod_phy_reg(pi, 0x448, (0x1 << 14), (0) << 14); in wlc_lcnphy_tempsense()
4059 s32 avg = 0; in wlc_lcnphy_vbatsense()
4063 suspend = (0 == (bcma_read32(pi->d11core, in wlc_lcnphy_vbatsense()
4071 vbatsenseval = read_phy_reg(pi, 0x475) & 0x1FF; in wlc_lcnphy_vbatsense()
4093 mod_phy_reg(pi, 0x6d1, (0x1 << 7), (1) << 7); in wlc_lcnphy_afe_clk_init()
4095 if (((mode == AFE_CLK_INIT_MODE_PAPD) && (phybw40 == 0)) || in wlc_lcnphy_afe_clk_init()
4097 write_phy_reg(pi, 0x6d0, 0x7); in wlc_lcnphy_afe_clk_init()
4112 suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & in wlc_lcnphy_glacial_timer_based_cal()
4146 suspend = (0 == (bcma_read32(pi->d11core, D11REGOFFS(maccontrol)) & in wlc_lcnphy_periodic_cal()
4158 wlc_lcnphy_rx_iq_cal(pi, NULL, 0, true, false, 1, 40); in wlc_lcnphy_periodic_cal()
4160 wlc_lcnphy_rx_iq_cal(pi, NULL, 0, true, false, 1, 127); in wlc_lcnphy_periodic_cal()
4166 b0 = pi->txpa_2g[0]; in wlc_lcnphy_periodic_cal()
4175 tab.tbl_offset = 0; in wlc_lcnphy_periodic_cal()
4176 for (tssi = 0; tssi < 128; tssi++) { in wlc_lcnphy_periodic_cal()
4208 temp_new = wlc_lcnphy_tempsense(pi, 0); in wlc_lcnphy_calib_modes()
4217 pi_lcn->lcnphy_cal_counter = 0; in wlc_lcnphy_calib_modes()
4234 status = (read_phy_reg(pi, 0x4ab)); in wlc_lcnphy_get_tssi()
4236 (status & (0x1 << 15))) { in wlc_lcnphy_get_tssi()
4237 *ofdm_pwr = (s8) (((read_phy_reg(pi, 0x4ab) & (0x1ff << 0)) in wlc_lcnphy_get_tssi()
4238 >> 0) >> 1); in wlc_lcnphy_get_tssi()
4243 cck_offset = 0; in wlc_lcnphy_get_tssi()
4247 *cck_pwr = 0; in wlc_lcnphy_get_tssi()
4248 *ofdm_pwr = 0; in wlc_lcnphy_get_tssi()
4269 mod_phy_reg(pi, 0x4a9, (0x1ff << 0), (index2) << 0); in wlc_lcnphy_tx_power_adjustment()
4272 (s8)((read_phy_reg(pi, 0x4a9) & 0xFF) / 2); in wlc_lcnphy_tx_power_adjustment()
4287 pa_gain = 0x10; in wlc_lcnphy_load_tx_gain_table()
4289 pa_gain = 0x60; in wlc_lcnphy_load_tx_gain_table()
4297 for (j = 0; j < 128; j++) { in wlc_lcnphy_load_tx_gain_table()
4325 for (index = 0; index < 128; index++) { in wlc_lcnphy_load_rfpower()
4335 qm_log10((s32) (bbmult), 0, &temp1, &qQ1); in wlc_lcnphy_load_rfpower()
4336 qm_log10((s32) (1 << 6), 0, &temp2, &qQ2); in wlc_lcnphy_load_rfpower()
4364 or_phy_reg(pi, 0x805, 0x1); in wlc_lcnphy_bu_tweaks()
4366 mod_phy_reg(pi, 0x42f, (0x7 << 0), (0x3) << 0); in wlc_lcnphy_bu_tweaks()
4368 mod_phy_reg(pi, 0x030, (0x7 << 0), (0x3) << 0); in wlc_lcnphy_bu_tweaks()
4370 write_phy_reg(pi, 0x414, 0x1e10); in wlc_lcnphy_bu_tweaks()
4371 write_phy_reg(pi, 0x415, 0x0640); in wlc_lcnphy_bu_tweaks()
4373 mod_phy_reg(pi, 0x4df, (0xff << 8), -9 << 8); in wlc_lcnphy_bu_tweaks()
4375 or_phy_reg(pi, 0x44a, 0x44); in wlc_lcnphy_bu_tweaks()
4376 write_phy_reg(pi, 0x44a, 0x80); in wlc_lcnphy_bu_tweaks()
4377 mod_phy_reg(pi, 0x434, (0xff << 0), (0xFD) << 0); in wlc_lcnphy_bu_tweaks()
4379 mod_phy_reg(pi, 0x420, (0xff << 0), (16) << 0); in wlc_lcnphy_bu_tweaks()
4381 if (!(pi->sh->boardrev < 0x1204)) in wlc_lcnphy_bu_tweaks()
4382 mod_radio_reg(pi, RADIO_2064_REG09B, 0xF0, 0xF0); in wlc_lcnphy_bu_tweaks()
4384 write_phy_reg(pi, 0x7d6, 0x0902); in wlc_lcnphy_bu_tweaks()
4385 mod_phy_reg(pi, 0x429, (0xf << 0), (0x9) << 0); in wlc_lcnphy_bu_tweaks()
4387 mod_phy_reg(pi, 0x429, (0x3f << 4), (0xe) << 4); in wlc_lcnphy_bu_tweaks()
4390 mod_phy_reg(pi, 0x423, (0xff << 0), (0x46) << 0); in wlc_lcnphy_bu_tweaks()
4392 mod_phy_reg(pi, 0x411, (0xff << 0), (1) << 0); in wlc_lcnphy_bu_tweaks()
4394 mod_phy_reg(pi, 0x434, (0xff << 0), (0xFF) << 0); in wlc_lcnphy_bu_tweaks()
4396 mod_phy_reg(pi, 0x656, (0xf << 0), (2) << 0); in wlc_lcnphy_bu_tweaks()
4398 mod_phy_reg(pi, 0x44d, (0x1 << 2), (1) << 2); in wlc_lcnphy_bu_tweaks()
4400 mod_radio_reg(pi, RADIO_2064_REG0F7, 0x4, 0x4); in wlc_lcnphy_bu_tweaks()
4401 mod_radio_reg(pi, RADIO_2064_REG0F1, 0x3, 0); in wlc_lcnphy_bu_tweaks()
4402 mod_radio_reg(pi, RADIO_2064_REG0F2, 0xF8, 0x90); in wlc_lcnphy_bu_tweaks()
4403 mod_radio_reg(pi, RADIO_2064_REG0F3, 0x3, 0x2); in wlc_lcnphy_bu_tweaks()
4404 mod_radio_reg(pi, RADIO_2064_REG0F3, 0xf0, 0xa0); in wlc_lcnphy_bu_tweaks()
4406 mod_radio_reg(pi, RADIO_2064_REG11F, 0x2, 0x2); in wlc_lcnphy_bu_tweaks()
4409 mod_phy_reg(pi, 0x4d0, (0x1ff << 6), (10) << 6); in wlc_lcnphy_bu_tweaks()
4418 and_radio_reg(pi, RADIO_2064_REG05B, 0xfD); in wlc_lcnphy_rcal()
4420 or_radio_reg(pi, RADIO_2064_REG004, 0x40); in wlc_lcnphy_rcal()
4421 or_radio_reg(pi, RADIO_2064_REG120, 0x10); in wlc_lcnphy_rcal()
4423 or_radio_reg(pi, RADIO_2064_REG078, 0x80); in wlc_lcnphy_rcal()
4424 or_radio_reg(pi, RADIO_2064_REG129, 0x02); in wlc_lcnphy_rcal()
4426 or_radio_reg(pi, RADIO_2064_REG057, 0x01); in wlc_lcnphy_rcal()
4428 or_radio_reg(pi, RADIO_2064_REG05B, 0x02); in wlc_lcnphy_rcal()
4434 rcal_value = rcal_value & 0x1f; in wlc_lcnphy_rcal()
4437 and_radio_reg(pi, RADIO_2064_REG05B, 0xfD); in wlc_lcnphy_rcal()
4439 and_radio_reg(pi, RADIO_2064_REG057, 0xFE); in wlc_lcnphy_rcal()
4453 write_phy_reg(pi, 0x933, flt_val); in wlc_lcnphy_rc_cal()
4454 write_phy_reg(pi, 0x934, flt_val); in wlc_lcnphy_rc_cal()
4455 write_phy_reg(pi, 0x935, flt_val); in wlc_lcnphy_rc_cal()
4456 write_phy_reg(pi, 0x936, flt_val); in wlc_lcnphy_rc_cal()
4457 write_phy_reg(pi, 0x937, (flt_val & 0x1FF)); in wlc_lcnphy_rc_cal()
4469 for (i = 0; lcnphyregs[i].address != 0xffff; i++) in wlc_radio_2064_init()
4472 ((lcnphyregs[i].address & 0x3fff) | in wlc_radio_2064_init()
4477 ((lcnphyregs[i].address & 0x3fff) | in wlc_radio_2064_init()
4481 write_radio_reg(pi, RADIO_2064_REG032, 0x62); in wlc_radio_2064_init()
4482 write_radio_reg(pi, RADIO_2064_REG033, 0x19); in wlc_radio_2064_init()
4484 write_radio_reg(pi, RADIO_2064_REG090, 0x10); in wlc_radio_2064_init()
4486 write_radio_reg(pi, RADIO_2064_REG010, 0x00); in wlc_radio_2064_init()
4490 write_radio_reg(pi, RADIO_2064_REG060, 0x7f); in wlc_radio_2064_init()
4491 write_radio_reg(pi, RADIO_2064_REG061, 0x72); in wlc_radio_2064_init()
4492 write_radio_reg(pi, RADIO_2064_REG062, 0x7f); in wlc_radio_2064_init()
4495 write_radio_reg(pi, RADIO_2064_REG01D, 0x02); in wlc_radio_2064_init()
4496 write_radio_reg(pi, RADIO_2064_REG01E, 0x06); in wlc_radio_2064_init()
4498 mod_phy_reg(pi, 0x4ea, (0x7 << 0), 0 << 0); in wlc_radio_2064_init()
4500 mod_phy_reg(pi, 0x4ea, (0x7 << 3), 1 << 3); in wlc_radio_2064_init()
4502 mod_phy_reg(pi, 0x4ea, (0x7 << 6), 2 << 6); in wlc_radio_2064_init()
4504 mod_phy_reg(pi, 0x4ea, (0x7 << 9), 3 << 9); in wlc_radio_2064_init()
4506 mod_phy_reg(pi, 0x4ea, (0x7 << 12), 4 << 12); in wlc_radio_2064_init()
4508 write_phy_reg(pi, 0x4ea, 0x4688); in wlc_radio_2064_init()
4511 mod_phy_reg(pi, 0x4eb, (0x7 << 0), 2 << 0); in wlc_radio_2064_init()
4513 mod_phy_reg(pi, 0x4eb, (0x7 << 0), 3 << 0); in wlc_radio_2064_init()
4515 mod_phy_reg(pi, 0x4eb, (0x7 << 6), 0 << 6); in wlc_radio_2064_init()
4517 mod_phy_reg(pi, 0x46a, (0xffff << 0), 25 << 0); in wlc_radio_2064_init()
4519 wlc_lcnphy_set_tx_locc(pi, 0); in wlc_radio_2064_init()
4526 write_radio_reg(pi, RADIO_2064_REG032, 0x6f); in wlc_radio_2064_init()
4527 write_radio_reg(pi, RADIO_2064_REG033, 0x19); in wlc_radio_2064_init()
4528 write_radio_reg(pi, RADIO_2064_REG039, 0xe); in wlc_radio_2064_init()
4545 for (idx = 0; idx < dot11lcnphytbl_info_sz_rev0; idx++) in wlc_lcnphy_tbl_init()
4565 tab.tbl_offset = 0; in wlc_lcnphy_tbl_init()
4601 for (idx = 0; idx < l; idx++) in wlc_lcnphy_tbl_init()
4607 if (pi->sh->boardrev < 0x1250) in wlc_lcnphy_tbl_init()
4631 write_radio_reg(pi, RADIO_2064_REG11C, 0x0); in wlc_lcnphy_rev0_baseband_init()
4633 write_phy_reg(pi, 0x43b, 0x0); in wlc_lcnphy_rev0_baseband_init()
4634 write_phy_reg(pi, 0x43c, 0x0); in wlc_lcnphy_rev0_baseband_init()
4635 write_phy_reg(pi, 0x44c, 0x0); in wlc_lcnphy_rev0_baseband_init()
4636 write_phy_reg(pi, 0x4e6, 0x0); in wlc_lcnphy_rev0_baseband_init()
4637 write_phy_reg(pi, 0x4f9, 0x0); in wlc_lcnphy_rev0_baseband_init()
4638 write_phy_reg(pi, 0x4b0, 0x0); in wlc_lcnphy_rev0_baseband_init()
4639 write_phy_reg(pi, 0x938, 0x0); in wlc_lcnphy_rev0_baseband_init()
4640 write_phy_reg(pi, 0x4b0, 0x0); in wlc_lcnphy_rev0_baseband_init()
4641 write_phy_reg(pi, 0x44e, 0); in wlc_lcnphy_rev0_baseband_init()
4643 or_phy_reg(pi, 0x567, 0x03); in wlc_lcnphy_rev0_baseband_init()
4645 or_phy_reg(pi, 0x44a, 0x44); in wlc_lcnphy_rev0_baseband_init()
4646 write_phy_reg(pi, 0x44a, 0x80); in wlc_lcnphy_rev0_baseband_init()
4651 if (0) { in wlc_lcnphy_rev0_baseband_init()
4652 afectrl1 = 0; in wlc_lcnphy_rev0_baseband_init()
4656 write_phy_reg(pi, 0x43e, afectrl1); in wlc_lcnphy_rev0_baseband_init()
4659 mod_phy_reg(pi, 0x634, (0xff << 0), 0xC << 0); in wlc_lcnphy_rev0_baseband_init()
4661 mod_phy_reg(pi, 0x634, (0xff << 0), 0xA << 0); in wlc_lcnphy_rev0_baseband_init()
4663 write_phy_reg(pi, 0x910, 0x1); in wlc_lcnphy_rev0_baseband_init()
4666 mod_phy_reg(pi, 0x448, (0x3 << 8), 1 << 8); in wlc_lcnphy_rev0_baseband_init()
4667 mod_phy_reg(pi, 0x608, (0xff << 0), 0x17 << 0); in wlc_lcnphy_rev0_baseband_init()
4668 mod_phy_reg(pi, 0x604, (0x7ff << 0), 0x3EA << 0); in wlc_lcnphy_rev0_baseband_init()
4675 mod_phy_reg(pi, 0x416, (0xff << 0), 80 << 0); in wlc_lcnphy_rev2_baseband_init()
4676 mod_phy_reg(pi, 0x416, (0xff << 8), 80 << 8); in wlc_lcnphy_rev2_baseband_init()
4687 temp = (s16) read_phy_reg(pi, 0x4df); in wlc_lcnphy_agc_temp_init()
4688 pi_lcn->lcnphy_ofdmgainidxtableoffset = (temp & (0xff << 0)) >> 0; in wlc_lcnphy_agc_temp_init()
4693 pi_lcn->lcnphy_dsssgainidxtableoffset = (temp & (0xff << 8)) >> 8; in wlc_lcnphy_agc_temp_init()
4705 if (tableBuffer[0] > 63) in wlc_lcnphy_agc_temp_init()
4706 tableBuffer[0] -= 128; in wlc_lcnphy_agc_temp_init()
4707 pi_lcn->lcnphy_tr_R_gain_val = tableBuffer[0]; in wlc_lcnphy_agc_temp_init()
4713 temp = (s16) (read_phy_reg(pi, 0x434) & (0xff << 0)); in wlc_lcnphy_agc_temp_init()
4719 (read_phy_reg(pi, 0x424) & (0xff << 8)) >> 8; in wlc_lcnphy_agc_temp_init()
4721 (read_phy_reg(pi, 0x425) & (0xff << 0)) >> 0; in wlc_lcnphy_agc_temp_init()
4730 pi_lcn->lcnphy_gain_idx_14_lowword = tableBuffer[0]; in wlc_lcnphy_agc_temp_init()
4749 pi_lcn->lcnphy_cal_counter = 0; in wlc_phy_init_lcnphy()
4752 or_phy_reg(pi, 0x44a, 0x80); in wlc_phy_init_lcnphy()
4753 and_phy_reg(pi, 0x44a, 0x7f); in wlc_phy_init_lcnphy()
4757 write_phy_reg(pi, 0x60a, 160); in wlc_phy_init_lcnphy()
4759 write_phy_reg(pi, 0x46a, 25); in wlc_phy_init_lcnphy()
4770 bcma_chipco_regctl_maskset(&pi->d11core->bus->drv_cc, 0, ~0xf, 0x9); in wlc_phy_init_lcnphy()
4772 bcma_chipco_chipctl_maskset(&pi->d11core->bus->drv_cc, 0, 0x0, in wlc_phy_init_lcnphy()
4773 0x03CDDDDD); in wlc_phy_init_lcnphy()
4783 mod_phy_reg(pi, 0x448, (0x1 << 14), (1) << 14); in wlc_phy_init_lcnphy()
4786 mod_phy_reg(pi, 0x448, (0x1 << 14), (0) << 14); in wlc_phy_init_lcnphy()
4795 s8 txpwr = 0; in wlc_phy_txpwr_srom_read_lcnphy()
4801 u16 cckpo = 0; in wlc_phy_txpwr_srom_read_lcnphy()
4808 pi->txpa_2g[0] = sprom->pa0b0; in wlc_phy_txpwr_srom_read_lcnphy()
4824 txpwr = sprom->core_pwr_info[0].maxpwr_2g; in wlc_phy_txpwr_srom_read_lcnphy()
4827 for (i = 0; i < PWRTBL_NUM_COEFF; i++) { in wlc_phy_txpwr_srom_read_lcnphy()
4839 max_pwr_chan - ((cckpo & 0xf) * 2); in wlc_phy_txpwr_srom_read_lcnphy()
4846 ((offset_ofdm & 0xf) * 2); in wlc_phy_txpwr_srom_read_lcnphy()
4855 ((offset_ofdm & 0xf) * 2); in wlc_phy_txpwr_srom_read_lcnphy()
4859 offset_mcs |= sprom->mcs2gpo[0]; in wlc_phy_txpwr_srom_read_lcnphy()
4864 txpwr - ((offset_mcs & 0xf) * 2); in wlc_phy_txpwr_srom_read_lcnphy()
4891 calnrst = (u8) read_radio_reg(pi, RADIO_2064_REG056) & 0xf8; in wlc_2064_vco_cal()
4894 write_radio_reg(pi, RADIO_2064_REG056, calnrst | 0x03); in wlc_2064_vco_cal()
4896 write_radio_reg(pi, RADIO_2064_REG056, calnrst | 0x07); in wlc_2064_vco_cal()
4898 mod_radio_reg(pi, RADIO_2064_REG057, 1 << 3, 0); in wlc_2064_vco_cal()
4931 or_phy_reg(pi, 0x44a, 0x44); in wlc_phy_chanspec_set_lcnphy()
4932 write_phy_reg(pi, 0x44a, 0x80); in wlc_phy_chanspec_set_lcnphy()
4939 write_phy_reg(pi, 0x657, lcnphy_sfo_cfg[channel - 1].ptcentreTs20); in wlc_phy_chanspec_set_lcnphy()
4940 write_phy_reg(pi, 0x658, lcnphy_sfo_cfg[channel - 1].ptcentreFactor); in wlc_phy_chanspec_set_lcnphy()
4943 mod_phy_reg(pi, 0x448, (0x3 << 8), (2) << 8); in wlc_phy_chanspec_set_lcnphy()
4947 mod_phy_reg(pi, 0x448, (0x3 << 8), (1) << 8); in wlc_phy_chanspec_set_lcnphy()
4953 wlc_lcnphy_load_tx_iir_filter(pi, true, 0); in wlc_phy_chanspec_set_lcnphy()
4957 mod_phy_reg(pi, 0x4eb, (0x7 << 3), (1) << 3); in wlc_phy_chanspec_set_lcnphy()
4977 if (0 == (pi->sh->boardflags & BFL_NOPA)) { in wlc_phy_attach_lcnphy()
4983 pi_lcn->lcnphy_papd_rxGnCtrl_init = 0; in wlc_phy_attach_lcnphy()
5019 trsw = (gain & ((u32) 1 << 28)) ? 0 : 1; in wlc_lcnphy_set_rx_gain()
5020 ext_lna = (u16) (gain >> 29) & 0x01; in wlc_lcnphy_set_rx_gain()
5021 lna1 = (u16) (gain >> 0) & 0x0f; in wlc_lcnphy_set_rx_gain()
5022 lna2 = (u16) (gain >> 4) & 0x0f; in wlc_lcnphy_set_rx_gain()
5023 tia = (u16) (gain >> 8) & 0xf; in wlc_lcnphy_set_rx_gain()
5024 biq0 = (u16) (gain >> 12) & 0xf; in wlc_lcnphy_set_rx_gain()
5025 biq1 = (u16) (gain >> 16) & 0xf; in wlc_lcnphy_set_rx_gain()
5027 gain0_15 = (u16) ((lna1 & 0x3) | ((lna1 & 0x3) << 2) | in wlc_lcnphy_set_rx_gain()
5028 ((lna2 & 0x3) << 4) | ((lna2 & 0x3) << 6) | in wlc_lcnphy_set_rx_gain()
5029 ((tia & 0xf) << 8) | ((biq0 & 0xf) << 12)); in wlc_lcnphy_set_rx_gain()
5032 mod_phy_reg(pi, 0x44d, (0x1 << 0), trsw << 0); in wlc_lcnphy_set_rx_gain()
5033 mod_phy_reg(pi, 0x4b1, (0x1 << 9), ext_lna << 9); in wlc_lcnphy_set_rx_gain()
5034 mod_phy_reg(pi, 0x4b1, (0x1 << 10), ext_lna << 10); in wlc_lcnphy_set_rx_gain()
5035 mod_phy_reg(pi, 0x4b6, (0xffff << 0), gain0_15 << 0); in wlc_lcnphy_set_rx_gain()
5036 mod_phy_reg(pi, 0x4b7, (0xf << 0), gain16_19 << 0); in wlc_lcnphy_set_rx_gain()
5039 mod_phy_reg(pi, 0x4b1, (0x3 << 11), lna1 << 11); in wlc_lcnphy_set_rx_gain()
5040 mod_phy_reg(pi, 0x4e6, (0x3 << 3), lna1 << 3); in wlc_lcnphy_set_rx_gain()
5047 u32 received_power = 0; in wlc_lcnphy_get_receive_power()
5048 s32 max_index = 0; in wlc_lcnphy_get_receive_power()
5049 u32 gain_code = 0; in wlc_lcnphy_get_receive_power()
5053 if (*gain_index >= 0) in wlc_lcnphy_get_receive_power()
5057 *gain_index = 0; in wlc_lcnphy_get_receive_power()
5084 s32 gain = 0; in wlc_lcnphy_rx_signal_power()
5098 nominal_power_db = read_phy_reg(pi, 0x425) >> 8; in wlc_lcnphy_rx_signal_power()
5118 input_power_offset_db = read_phy_reg(pi, 0x434) & 0xFF; in wlc_lcnphy_rx_signal_power()
5148 wlc_lcnphy_rx_gain_override_enable(pi, 0); in wlc_lcnphy_rx_signal_power()