• Home
  • Raw
  • Download

Lines Matching refs:priv

40 	struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(cpu_dai);  in kirkwood_i2s_set_fmt()  local
62 value = readl(priv->io+KIRKWOOD_I2S_PLAYCTL); in kirkwood_i2s_set_fmt()
65 writel(value, priv->io+KIRKWOOD_I2S_PLAYCTL); in kirkwood_i2s_set_fmt()
67 value = readl(priv->io+KIRKWOOD_I2S_RECCTL); in kirkwood_i2s_set_fmt()
70 writel(value, priv->io+KIRKWOOD_I2S_RECCTL); in kirkwood_i2s_set_fmt()
103 struct kirkwood_dma_data *priv, unsigned long rate) in kirkwood_set_rate() argument
111 kirkwood_set_dco(priv->io, rate); in kirkwood_set_rate()
114 } else if (!IS_ERR(priv->extclk)) { in kirkwood_set_rate()
118 clk_set_rate(priv->extclk, 256 * rate); in kirkwood_set_rate()
122 writel(clks_ctrl, priv->io + KIRKWOOD_CLOCKS_CTRL); in kirkwood_set_rate()
128 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); in kirkwood_i2s_startup() local
130 snd_soc_dai_set_dma_data(dai, substream, priv); in kirkwood_i2s_startup()
138 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); in kirkwood_i2s_hw_params() local
149 kirkwood_set_rate(dai, priv, params_rate(params)); in kirkwood_i2s_hw_params()
151 i2s_value = readl(priv->io+i2s_reg); in kirkwood_i2s_hw_params()
201 priv->ctl_play &= ~(KIRKWOOD_PLAYCTL_MONO_MASK | in kirkwood_i2s_hw_params()
205 priv->ctl_play |= ctl_play; in kirkwood_i2s_hw_params()
207 priv->ctl_rec &= ~KIRKWOOD_RECCTL_SIZE_MASK; in kirkwood_i2s_hw_params()
208 priv->ctl_rec |= ctl_rec; in kirkwood_i2s_hw_params()
211 writel(i2s_value, priv->io+i2s_reg); in kirkwood_i2s_hw_params()
219 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); in kirkwood_i2s_play_trigger() local
222 ctl = readl(priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
232 ctl = readl(priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
246 ctl = priv->ctl_play; in kirkwood_i2s_play_trigger()
249 writel(value, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
252 value = readl(priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_play_trigger()
254 writel(value, priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_play_trigger()
257 writel(ctl, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
263 writel(ctl, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
265 value = readl(priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_play_trigger()
267 writel(value, priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_play_trigger()
271 writel(ctl, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
277 writel(ctl, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
283 writel(ctl, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_play_trigger()
296 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); in kirkwood_i2s_rec_trigger() local
299 value = readl(priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
304 ctl = priv->ctl_rec; in kirkwood_i2s_rec_trigger()
306 writel(value, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
309 value = readl(priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_rec_trigger()
311 writel(value, priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_rec_trigger()
314 writel(ctl, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
319 value = readl(priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
321 writel(value, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
323 value = readl(priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_rec_trigger()
325 writel(value, priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_rec_trigger()
328 value = readl(priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
330 writel(value, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
335 value = readl(priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
337 writel(value, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
342 value = readl(priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
344 writel(value, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_rec_trigger()
367 struct kirkwood_dma_data *priv = snd_soc_dai_get_drvdata(dai); in kirkwood_i2s_probe() local
373 writel(0xffffffff, priv->io + KIRKWOOD_INT_CAUSE); in kirkwood_i2s_probe()
374 writel(0, priv->io + KIRKWOOD_INT_MASK); in kirkwood_i2s_probe()
376 reg_data = readl(priv->io + 0x1200); in kirkwood_i2s_probe()
379 writel(reg_data, priv->io + 0x1200); in kirkwood_i2s_probe()
383 reg_data = readl(priv->io + 0x1200); in kirkwood_i2s_probe()
386 writel(reg_data, priv->io + 0x1200); in kirkwood_i2s_probe()
389 value = readl(priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_probe()
391 writel(value, priv->io + KIRKWOOD_PLAYCTL); in kirkwood_i2s_probe()
393 value = readl(priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_probe()
395 writel(value, priv->io + KIRKWOOD_RECCTL); in kirkwood_i2s_probe()
462 struct kirkwood_dma_data *priv; in kirkwood_i2s_dev_probe() local
466 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in kirkwood_i2s_dev_probe()
467 if (!priv) { in kirkwood_i2s_dev_probe()
471 dev_set_drvdata(&pdev->dev, priv); in kirkwood_i2s_dev_probe()
474 priv->io = devm_ioremap_resource(&pdev->dev, mem); in kirkwood_i2s_dev_probe()
475 if (IS_ERR(priv->io)) in kirkwood_i2s_dev_probe()
476 return PTR_ERR(priv->io); in kirkwood_i2s_dev_probe()
478 priv->irq = platform_get_irq(pdev, 0); in kirkwood_i2s_dev_probe()
479 if (priv->irq <= 0) { in kirkwood_i2s_dev_probe()
489 priv->burst = data->burst; in kirkwood_i2s_dev_probe()
491 priv->clk = devm_clk_get(&pdev->dev, NULL); in kirkwood_i2s_dev_probe()
492 if (IS_ERR(priv->clk)) { in kirkwood_i2s_dev_probe()
494 return PTR_ERR(priv->clk); in kirkwood_i2s_dev_probe()
497 err = clk_prepare_enable(priv->clk); in kirkwood_i2s_dev_probe()
501 priv->extclk = clk_get(&pdev->dev, "extclk"); in kirkwood_i2s_dev_probe()
502 if (!IS_ERR(priv->extclk)) { in kirkwood_i2s_dev_probe()
503 if (priv->extclk == priv->clk) { in kirkwood_i2s_dev_probe()
504 clk_put(priv->extclk); in kirkwood_i2s_dev_probe()
505 priv->extclk = ERR_PTR(-EINVAL); in kirkwood_i2s_dev_probe()
508 clk_prepare_enable(priv->extclk); in kirkwood_i2s_dev_probe()
514 priv->ctl_play = KIRKWOOD_PLAYCTL_SIZE_24; in kirkwood_i2s_dev_probe()
515 priv->ctl_rec = KIRKWOOD_RECCTL_SIZE_24; in kirkwood_i2s_dev_probe()
519 priv->ctl_play |= KIRKWOOD_PLAYCTL_BURST_32; in kirkwood_i2s_dev_probe()
520 priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_32; in kirkwood_i2s_dev_probe()
522 priv->ctl_play |= KIRKWOOD_PLAYCTL_BURST_128; in kirkwood_i2s_dev_probe()
523 priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_128; in kirkwood_i2s_dev_probe()
532 if (!IS_ERR(priv->extclk)) { in kirkwood_i2s_dev_probe()
533 clk_disable_unprepare(priv->extclk); in kirkwood_i2s_dev_probe()
534 clk_put(priv->extclk); in kirkwood_i2s_dev_probe()
536 clk_disable_unprepare(priv->clk); in kirkwood_i2s_dev_probe()
543 struct kirkwood_dma_data *priv = dev_get_drvdata(&pdev->dev); in kirkwood_i2s_dev_remove() local
547 if (!IS_ERR(priv->extclk)) { in kirkwood_i2s_dev_remove()
548 clk_disable_unprepare(priv->extclk); in kirkwood_i2s_dev_remove()
549 clk_put(priv->extclk); in kirkwood_i2s_dev_remove()
551 clk_disable_unprepare(priv->clk); in kirkwood_i2s_dev_remove()