Lines Matching refs:i2s

85 static void s3c2412_snd_txctrl(struct s3c_i2sv2_info *i2s, int on)  in s3c2412_snd_txctrl()  argument
87 void __iomem *regs = i2s->regs; in s3c2412_snd_txctrl()
115 dev_err(i2s->dev, "TXEN: Invalid MODE %x in IISMOD\n", in s3c2412_snd_txctrl()
144 dev_err(i2s->dev, "TXDIS: Invalid MODE %x in IISMOD\n", in s3c2412_snd_txctrl()
158 static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) in s3c2412_snd_rxctrl() argument
160 void __iomem *regs = i2s->regs; in s3c2412_snd_rxctrl()
188 dev_err(i2s->dev, "RXEN: Invalid MODE %x in IISMOD\n", in s3c2412_snd_rxctrl()
213 dev_err(i2s->dev, "RXDIS: Invalid MODE %x in IISMOD\n", in s3c2412_snd_rxctrl()
231 static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) in s3c2412_snd_lrsync() argument
239 iiscon = readl(i2s->regs + S3C2412_IISCON); in s3c2412_snd_lrsync()
260 struct s3c_i2sv2_info *i2s = to_info(cpu_dai); in s3c2412_i2s_set_fmt() local
265 iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_set_fmt()
270 i2s->master = 0; in s3c2412_i2s_set_fmt()
274 i2s->master = 1; in s3c2412_i2s_set_fmt()
302 writel(iismod, i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_set_fmt()
311 struct s3c_i2sv2_info *i2s = to_info(dai); in s3c_i2sv2_hw_params() local
318 dma_data = i2s->dma_playback; in s3c_i2sv2_hw_params()
320 dma_data = i2s->dma_capture; in s3c_i2sv2_hw_params()
325 iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_hw_params()
341 writel(iismod, i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_hw_params()
350 struct s3c_i2sv2_info *i2s = to_info(cpu_dai); in s3c_i2sv2_set_sysclk() local
351 u32 iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_set_sysclk()
367 if (!(i2s->feature & S3C_FEATURE_CDCLKCON)) in s3c_i2sv2_set_sysclk()
386 writel(iismod, i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_set_sysclk()
396 struct s3c_i2sv2_info *i2s = to_info(rtd->cpu_dai); in s3c2412_i2s_trigger() local
410 i2s->regs + S3C2412_IISFIC); in s3c2412_i2s_trigger()
413 writel(0x0, i2s->regs + S3C2412_IISFIC); in s3c2412_i2s_trigger()
417 if (!i2s->master) { in s3c2412_i2s_trigger()
418 ret = s3c2412_snd_lrsync(i2s); in s3c2412_i2s_trigger()
426 s3c2412_snd_rxctrl(i2s, 1); in s3c2412_i2s_trigger()
428 s3c2412_snd_txctrl(i2s, 1); in s3c2412_i2s_trigger()
447 s3c2412_snd_rxctrl(i2s, 0); in s3c2412_i2s_trigger()
449 s3c2412_snd_txctrl(i2s, 0); in s3c2412_i2s_trigger()
468 struct s3c_i2sv2_info *i2s = to_info(cpu_dai); in s3c2412_i2s_set_clkdiv() local
496 reg = readl(i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_set_clkdiv()
498 writel(reg | div, i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_set_clkdiv()
500 pr_debug("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD)); in s3c2412_i2s_set_clkdiv()
525 reg = readl(i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_set_clkdiv()
527 writel(reg | div, i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_set_clkdiv()
528 pr_debug("%s: MOD=%08x\n", __func__, readl(i2s->regs + S3C2412_IISMOD)); in s3c2412_i2s_set_clkdiv()
534 i2s->regs + S3C2412_IISPSR); in s3c2412_i2s_set_clkdiv()
536 writel(0x0, i2s->regs + S3C2412_IISPSR); in s3c2412_i2s_set_clkdiv()
538 pr_debug("%s: PSR=%08x\n", __func__, readl(i2s->regs + S3C2412_IISPSR)); in s3c2412_i2s_set_clkdiv()
551 struct s3c_i2sv2_info *i2s = to_info(dai); in s3c2412_i2s_delay() local
552 u32 reg = readl(i2s->regs + S3C2412_IISFIC); in s3c2412_i2s_delay()
565 struct s3c_i2sv2_info *i2s = to_info(cpu_dai); in s3c_i2sv2_get_clock() local
566 u32 iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_get_clock()
569 return i2s->iis_cclk; in s3c_i2sv2_get_clock()
571 return i2s->iis_pclk; in s3c_i2sv2_get_clock()
641 struct s3c_i2sv2_info *i2s, in s3c_i2sv2_probe() argument
647 i2s->dev = dev; in s3c_i2sv2_probe()
650 snd_soc_dai_set_drvdata(dai, i2s); in s3c_i2sv2_probe()
652 i2s->regs = ioremap(base, 0x100); in s3c_i2sv2_probe()
653 if (i2s->regs == NULL) { in s3c_i2sv2_probe()
658 i2s->iis_pclk = clk_get(dev, "iis"); in s3c_i2sv2_probe()
659 if (IS_ERR(i2s->iis_pclk)) { in s3c_i2sv2_probe()
661 iounmap(i2s->regs); in s3c_i2sv2_probe()
665 clk_enable(i2s->iis_pclk); in s3c_i2sv2_probe()
669 iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_probe()
671 writel(iismod, i2s->regs + S3C2412_IISMOD); in s3c_i2sv2_probe()
672 s3c2412_snd_txctrl(i2s, 0); in s3c_i2sv2_probe()
673 s3c2412_snd_rxctrl(i2s, 0); in s3c_i2sv2_probe()
682 struct s3c_i2sv2_info *i2s = to_info(dai); in s3c2412_i2s_suspend() local
686 i2s->suspend_iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_suspend()
687 i2s->suspend_iiscon = readl(i2s->regs + S3C2412_IISCON); in s3c2412_i2s_suspend()
688 i2s->suspend_iispsr = readl(i2s->regs + S3C2412_IISPSR); in s3c2412_i2s_suspend()
692 iismod = readl(i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_suspend()
709 struct s3c_i2sv2_info *i2s = to_info(dai); in s3c2412_i2s_resume() local
712 dai->active, i2s->suspend_iismod, i2s->suspend_iiscon); in s3c2412_i2s_resume()
715 writel(i2s->suspend_iiscon, i2s->regs + S3C2412_IISCON); in s3c2412_i2s_resume()
716 writel(i2s->suspend_iismod, i2s->regs + S3C2412_IISMOD); in s3c2412_i2s_resume()
717 writel(i2s->suspend_iispsr, i2s->regs + S3C2412_IISPSR); in s3c2412_i2s_resume()
720 i2s->regs + S3C2412_IISFIC); in s3c2412_i2s_resume()
723 writel(0x0, i2s->regs + S3C2412_IISFIC); in s3c2412_i2s_resume()