Lines Matching refs:tdm

166 	struct tsa_tdm tdm[4]; /* TDMa, TDMb, TDMc and TDMd */  member
168 struct tsa_tdm tdm[2]; /* TDMa and TDMb */ member
605 struct tsa_tdm *tdm; in tsa_of_parse_tdm_route() local
649 tdm = &tsa->tdm[tdm_id]; in tsa_of_parse_tdm_route()
651 serial_info->rx_fs_rate = clk_get_rate(tdm->l1rsync_clk); in tsa_of_parse_tdm_route()
652 serial_info->rx_bit_rate = clk_get_rate(tdm->l1rclk_clk); in tsa_of_parse_tdm_route()
655 serial_info->tx_fs_rate = tdm->l1tsync_clk ? in tsa_of_parse_tdm_route()
656 clk_get_rate(tdm->l1tsync_clk) : in tsa_of_parse_tdm_route()
657 clk_get_rate(tdm->l1rsync_clk); in tsa_of_parse_tdm_route()
658 serial_info->tx_bit_rate = tdm->l1tclk_clk ? in tsa_of_parse_tdm_route()
659 clk_get_rate(tdm->l1tclk_clk) : in tsa_of_parse_tdm_route()
660 clk_get_rate(tdm->l1rclk_clk); in tsa_of_parse_tdm_route()
684 struct tsa_tdm *tdm; in tsa_of_parse_tdms() local
691 for (i = 0; i < ARRAY_SIZE(tsa->tdm); i++) in tsa_of_parse_tdms()
692 tsa->tdm[i].is_enable = false; in tsa_of_parse_tdms()
735 tdm = &tsa->tdm[tdm_id]; in tsa_of_parse_tdms()
736 tdm->simode_tdm = TSA_SIMODE_TDM_SDM_NORM; in tsa_of_parse_tdms()
755 tdm->simode_tdm |= TSA_SIMODE_TDM_RFSD(val); in tsa_of_parse_tdms()
774 tdm->simode_tdm |= TSA_SIMODE_TDM_TFSD(val); in tsa_of_parse_tdms()
777 tdm->simode_tdm |= TSA_SIMODE_TDM_CRT; in tsa_of_parse_tdms()
780 tdm->simode_tdm |= TSA_SIMODE_TDM_CE; in tsa_of_parse_tdms()
783 tdm->simode_tdm |= TSA_SIMODE_TDM_FE; in tsa_of_parse_tdms()
787 tdm->simode_tdm |= TSA_QE_SIMODE_TDM_SL; in tsa_of_parse_tdms()
790 tdm->simode_tdm |= TSA_SIMODE_TDM_DSC; in tsa_of_parse_tdms()
804 tdm->l1rsync_clk = clk; in tsa_of_parse_tdms()
818 tdm->l1rclk_clk = clk; in tsa_of_parse_tdms()
820 if (!(tdm->simode_tdm & TSA_SIMODE_TDM_CRT)) { in tsa_of_parse_tdms()
833 tdm->l1tsync_clk = clk; in tsa_of_parse_tdms()
847 tdm->l1tclk_clk = clk; in tsa_of_parse_tdms()
858 tdm->simode_tdm |= TSA_QE_SIMODE_TDM_SAD(4 * tdm_id); in tsa_of_parse_tdms()
873 tdm->is_enable = true; in tsa_of_parse_tdms()
878 for (i = 0; i < ARRAY_SIZE(tsa->tdm); i++) { in tsa_of_parse_tdms()
879 if (tsa->tdm[i].l1rsync_clk) { in tsa_of_parse_tdms()
880 clk_disable_unprepare(tsa->tdm[i].l1rsync_clk); in tsa_of_parse_tdms()
881 clk_put(tsa->tdm[i].l1rsync_clk); in tsa_of_parse_tdms()
883 if (tsa->tdm[i].l1rclk_clk) { in tsa_of_parse_tdms()
884 clk_disable_unprepare(tsa->tdm[i].l1rclk_clk); in tsa_of_parse_tdms()
885 clk_put(tsa->tdm[i].l1rclk_clk); in tsa_of_parse_tdms()
887 if (tsa->tdm[i].l1tsync_clk) { in tsa_of_parse_tdms()
888 clk_disable_unprepare(tsa->tdm[i].l1rsync_clk); in tsa_of_parse_tdms()
889 clk_put(tsa->tdm[i].l1rsync_clk); in tsa_of_parse_tdms()
891 if (tsa->tdm[i].l1tclk_clk) { in tsa_of_parse_tdms()
892 clk_disable_unprepare(tsa->tdm[i].l1rclk_clk); in tsa_of_parse_tdms()
893 clk_put(tsa->tdm[i].l1rclk_clk); in tsa_of_parse_tdms()
919 if (tsa->tdm[0].is_enable) in tsa_cpm1_setup()
920 val |= TSA_CPM1_SIMODE_TDMA(tsa->tdm[0].simode_tdm); in tsa_cpm1_setup()
921 if (tsa->tdm[1].is_enable) in tsa_cpm1_setup()
922 val |= TSA_CPM1_SIMODE_TDMB(tsa->tdm[1].simode_tdm); in tsa_cpm1_setup()
947 for (i = 0; i < ARRAY_SIZE(tsa->tdm); i++) { in tsa_qe_setup()
948 if (!tsa->tdm[i].is_enable) in tsa_qe_setup()
973 tsa_write16(tsa->si_regs + sixmr, tsa->tdm[i].simode_tdm); in tsa_qe_setup()
1052 for (i = 0; i < ARRAY_SIZE(tsa->tdm); i++) { in tsa_remove()
1053 if (tsa->tdm[i].l1rsync_clk) { in tsa_remove()
1054 clk_disable_unprepare(tsa->tdm[i].l1rsync_clk); in tsa_remove()
1055 clk_put(tsa->tdm[i].l1rsync_clk); in tsa_remove()
1057 if (tsa->tdm[i].l1rclk_clk) { in tsa_remove()
1058 clk_disable_unprepare(tsa->tdm[i].l1rclk_clk); in tsa_remove()
1059 clk_put(tsa->tdm[i].l1rclk_clk); in tsa_remove()
1061 if (tsa->tdm[i].l1tsync_clk) { in tsa_remove()
1062 clk_disable_unprepare(tsa->tdm[i].l1rsync_clk); in tsa_remove()
1063 clk_put(tsa->tdm[i].l1rsync_clk); in tsa_remove()
1065 if (tsa->tdm[i].l1tclk_clk) { in tsa_remove()
1066 clk_disable_unprepare(tsa->tdm[i].l1rclk_clk); in tsa_remove()
1067 clk_put(tsa->tdm[i].l1rclk_clk); in tsa_remove()