Lines Matching refs:srds_regs
599 static int calibrate_pll(serdes_corenet_t *srds_regs, int pll_num) in calibrate_pll() argument
607 clrbits_be32(&srds_regs->bank[pll_num].rstctl, in calibrate_pll()
610 clrbits_be32(&srds_regs->bank[pll_num].rstctl, in calibrate_pll()
613 setbits_be32(&srds_regs->bank[pll_num].rstctl, in calibrate_pll()
615 setbits_be32(&srds_regs->bank[pll_num].rstctl, in calibrate_pll()
622 rst_err = in_be32(&srds_regs->bank[pll_num].rstctl) & in calibrate_pll()
632 static int check_pll_locks(serdes_corenet_t *srds_regs, int pll_num) in check_pll_locks() argument
637 if (calibrate_pll(srds_regs, pll_num)) { in check_pll_locks()
640 clrbits_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
642 fcap = in_be32(&srds_regs->bank[pll_num].pllsr2) & in check_pll_locks()
645 bcap = in_be32(&srds_regs->bank[pll_num].pllsr2) & in check_pll_locks()
648 setbits_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
650 dcbias = in_be32(&srds_regs->bank[pll_num].pllsr2) & in check_pll_locks()
657 clrbits_be32(&srds_regs->bank[pll_num].rstctl, in check_pll_locks()
660 clrbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
662 setbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
664 if (calibrate_pll(srds_regs, pll_num)) { in check_pll_locks()
666 clrbits_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
668 fcap = in_be32(&srds_regs->bank[pll_num].pllsr2) in check_pll_locks()
671 bcap = in_be32(&srds_regs->bank[pll_num].pllsr2) in check_pll_locks()
674 setbits_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
677 (&srds_regs->bank[pll_num].pllsr2) & in check_pll_locks()
682 clrbits_be32(&srds_regs->bank[pll_num].rstctl, in check_pll_locks()
685 setbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
687 clrbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
689 setbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
693 clrbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
696 (&srds_regs->bank[pll_num].pllcr1)| in check_pll_locks()
698 out_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
700 clrbits_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
703 (&srds_regs->bank[pll_num].pllcr0)| in check_pll_locks()
705 out_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
707 ret = calibrate_pll(srds_regs, pll_num); in check_pll_locks()
714 clrbits_be32(&srds_regs->bank[pll_num].rstctl, in check_pll_locks()
720 setbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
722 clrbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
724 pllcr1 = (in_be32(&srds_regs->bank[pll_num].pllcr1)| in check_pll_locks()
726 out_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
728 clrbits_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
730 pllcr0 = (in_be32(&srds_regs->bank[pll_num].pllcr0)| in check_pll_locks()
732 out_be32(&srds_regs->bank[pll_num].pllcr0, in check_pll_locks()
734 clrbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
736 setbits_be32(&srds_regs->bank[pll_num].pllcr1, in check_pll_locks()
738 ret = calibrate_pll(srds_regs, pll_num); in check_pll_locks()
778 serdes_corenet_t *srds_regs = in config_serdes1_refclks() local
879 clrbits_be32(&srds_regs->bank[i].rstctl, in config_serdes1_refclks()
882 clrbits_be32(&srds_regs->bank[i].rstctl, in config_serdes1_refclks()
885 setbits_be32(&srds_regs->bank[i].rstctl, in config_serdes1_refclks()
887 setbits_be32(&srds_regs->bank[i].rstctl, in config_serdes1_refclks()
1161 serdes_corenet_t *srds_regs = in misc_init_r() local
1182 u32 pllcr0 = srds_regs->bank[i].pllcr0; in misc_init_r()