Lines Matching refs:master_saif
95 struct mxs_saif *master_saif; in mxs_saif_set_clk() local
100 master_saif = mxs_saif_get_master(saif); in mxs_saif_set_clk()
101 if (!master_saif) in mxs_saif_set_clk()
104 dev_dbg(saif->dev, "master saif%d\n", master_saif->id); in mxs_saif_set_clk()
107 if (master_saif->ongoing && rate != master_saif->cur_rate) { in mxs_saif_set_clk()
110 master_saif->id, master_saif->cur_rate); in mxs_saif_set_clk()
114 scr = __raw_readl(master_saif->base + SAIF_CTRL); in mxs_saif_set_clk()
128 ret = clk_prepare_enable(master_saif->clk); in mxs_saif_set_clk()
132 if (master_saif->mclk_in_use) { in mxs_saif_set_clk()
140 ret = clk_set_rate(master_saif->clk, 512 * rate); in mxs_saif_set_clk()
147 ret = clk_set_rate(master_saif->clk, 384 * rate); in mxs_saif_set_clk()
151 clk_disable_unprepare(master_saif->clk); in mxs_saif_set_clk()
155 ret = clk_set_rate(master_saif->clk, 512 * rate); in mxs_saif_set_clk()
159 clk_disable_unprepare(master_saif->clk); in mxs_saif_set_clk()
164 master_saif->cur_rate = rate; in mxs_saif_set_clk()
166 if (!master_saif->mclk_in_use) { in mxs_saif_set_clk()
167 __raw_writel(scr, master_saif->base + SAIF_CTRL); in mxs_saif_set_clk()
209 __raw_writel(scr, master_saif->base + SAIF_CTRL); in mxs_saif_set_clk()
256 struct mxs_saif *master_saif; in mxs_saif_get_mclk() local
269 master_saif = mxs_saif_get_master(saif); in mxs_saif_get_mclk()
270 if (saif != master_saif) { in mxs_saif_get_mclk()
431 struct mxs_saif *master_saif; in mxs_saif_hw_params() local
435 master_saif = mxs_saif_get_master(saif); in mxs_saif_hw_params()
436 if (!master_saif) in mxs_saif_hw_params()
462 if (saif != master_saif) { in mxs_saif_hw_params()
476 ret = clk_prepare(master_saif->clk); in mxs_saif_hw_params()
530 struct mxs_saif *master_saif; in mxs_saif_trigger() local
534 master_saif = mxs_saif_get_master(saif); in mxs_saif_trigger()
535 if (!master_saif) in mxs_saif_trigger()
547 ret = clk_enable(master_saif->clk); in mxs_saif_trigger()
557 if (saif != master_saif) { in mxs_saif_trigger()
561 clk_disable(master_saif->clk); in mxs_saif_trigger()
569 if (!master_saif->mclk_in_use) in mxs_saif_trigger()
571 master_saif->base + SAIF_CTRL + MXS_SET_ADDR); in mxs_saif_trigger()
595 master_saif->ongoing = 1; in mxs_saif_trigger()
602 dev_dbg(master_saif->dev, "CTRL 0x%x STAT 0x%x\n", in mxs_saif_trigger()
603 __raw_readl(master_saif->base + SAIF_CTRL), in mxs_saif_trigger()
604 __raw_readl(master_saif->base + SAIF_STAT)); in mxs_saif_trigger()
615 delay = USEC_PER_SEC / master_saif->cur_rate; in mxs_saif_trigger()
617 if (!master_saif->mclk_in_use) { in mxs_saif_trigger()
619 master_saif->base + SAIF_CTRL + MXS_CLR_ADDR); in mxs_saif_trigger()
622 clk_disable(master_saif->clk); in mxs_saif_trigger()
624 if (saif != master_saif) { in mxs_saif_trigger()
631 master_saif->ongoing = 0; in mxs_saif_trigger()