Lines Matching refs:ssc

147 	ssc_sr = (unsigned long)ssc_readl(ssc_p->ssc->regs, SR)  in atmel_ssc_interrupt()
148 & (unsigned long)ssc_readl(ssc_p->ssc->regs, IMR); in atmel_ssc_interrupt()
195 struct ssc_device *ssc = ssc_p->ssc; in atmel_ssc_hw_rule_rate() local
215 && ssc->clk_from_rk_pin) in atmel_ssc_hw_rule_rate()
225 && !ssc->clk_from_rk_pin) in atmel_ssc_hw_rule_rate()
279 ssc_readl(ssc_p->ssc->regs, SR)); in atmel_ssc_startup()
283 ret = clk_enable(ssc_p->ssc->clk); in atmel_ssc_startup()
287 ssc_p->mck_rate = clk_get_rate(ssc_p->ssc->clk); in atmel_ssc_startup()
291 ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_SWRST)); in atmel_ssc_startup()
313 dma_params->ssc = ssc_p->ssc; in atmel_ssc_startup()
348 dma_params->ssc = NULL; in atmel_ssc_shutdown()
358 free_irq(ssc_p->ssc->irq, ssc_p); in atmel_ssc_shutdown()
363 ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_SWRST)); in atmel_ssc_shutdown()
371 clk_disable(ssc_p->ssc->clk); in atmel_ssc_shutdown()
464 struct ssc_device *ssc = ssc_p->ssc; in atmel_ssc_hw_params() local
626 rcmr |= SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? in atmel_ssc_hw_params()
630 tcmr |= SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? in atmel_ssc_hw_params()
660 if (fslen_ext && !ssc->pdata->has_fslen_ext) { in atmel_ssc_hw_params()
671 if (!ssc_p->ssc->pdata->use_dma) { in atmel_ssc_hw_params()
672 ssc_writel(ssc_p->ssc->regs, PDC_RPR, 0); in atmel_ssc_hw_params()
673 ssc_writel(ssc_p->ssc->regs, PDC_RCR, 0); in atmel_ssc_hw_params()
674 ssc_writel(ssc_p->ssc->regs, PDC_RNPR, 0); in atmel_ssc_hw_params()
675 ssc_writel(ssc_p->ssc->regs, PDC_RNCR, 0); in atmel_ssc_hw_params()
677 ssc_writel(ssc_p->ssc->regs, PDC_TPR, 0); in atmel_ssc_hw_params()
678 ssc_writel(ssc_p->ssc->regs, PDC_TCR, 0); in atmel_ssc_hw_params()
679 ssc_writel(ssc_p->ssc->regs, PDC_TNPR, 0); in atmel_ssc_hw_params()
680 ssc_writel(ssc_p->ssc->regs, PDC_TNCR, 0); in atmel_ssc_hw_params()
683 ret = request_irq(ssc_p->ssc->irq, atmel_ssc_interrupt, 0, in atmel_ssc_hw_params()
689 clk_disable(ssc_p->ssc->clk); in atmel_ssc_hw_params()
697 ssc_writel(ssc_p->ssc->regs, CMR, cmr_div); in atmel_ssc_hw_params()
700 ssc_writel(ssc_p->ssc->regs, RCMR, rcmr); in atmel_ssc_hw_params()
701 ssc_writel(ssc_p->ssc->regs, RFMR, rfmr); in atmel_ssc_hw_params()
704 ssc_writel(ssc_p->ssc->regs, TCMR, tcmr); in atmel_ssc_hw_params()
705 ssc_writel(ssc_p->ssc->regs, TFMR, tfmr); in atmel_ssc_hw_params()
727 ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_disable); in atmel_ssc_prepare()
728 ssc_writel(ssc_p->ssc->regs, IDR, dma_params->mask->ssc_error); in atmel_ssc_prepare()
732 ssc_readl(ssc_p->ssc->regs, SR)); in atmel_ssc_prepare()
755 ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_enable); in atmel_ssc_trigger()
758 ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_disable); in atmel_ssc_trigger()
776 ssc_p->ssc_state.ssc_sr = ssc_readl(ssc_p->ssc->regs, SR); in atmel_ssc_suspend()
777 ssc_writel(ssc_p->ssc->regs, CR, SSC_BIT(CR_TXDIS) | SSC_BIT(CR_RXDIS)); in atmel_ssc_suspend()
780 ssc_p->ssc_state.ssc_imr = ssc_readl(ssc_p->ssc->regs, IMR); in atmel_ssc_suspend()
781 ssc_writel(ssc_p->ssc->regs, IDR, ssc_p->ssc_state.ssc_imr); in atmel_ssc_suspend()
783 ssc_p->ssc_state.ssc_cmr = ssc_readl(ssc_p->ssc->regs, CMR); in atmel_ssc_suspend()
784 ssc_p->ssc_state.ssc_rcmr = ssc_readl(ssc_p->ssc->regs, RCMR); in atmel_ssc_suspend()
785 ssc_p->ssc_state.ssc_rfmr = ssc_readl(ssc_p->ssc->regs, RFMR); in atmel_ssc_suspend()
786 ssc_p->ssc_state.ssc_tcmr = ssc_readl(ssc_p->ssc->regs, TCMR); in atmel_ssc_suspend()
787 ssc_p->ssc_state.ssc_tfmr = ssc_readl(ssc_p->ssc->regs, TFMR); in atmel_ssc_suspend()
804 ssc_writel(ssc_p->ssc->regs, TFMR, ssc_p->ssc_state.ssc_tfmr); in atmel_ssc_resume()
805 ssc_writel(ssc_p->ssc->regs, TCMR, ssc_p->ssc_state.ssc_tcmr); in atmel_ssc_resume()
806 ssc_writel(ssc_p->ssc->regs, RFMR, ssc_p->ssc_state.ssc_rfmr); in atmel_ssc_resume()
807 ssc_writel(ssc_p->ssc->regs, RCMR, ssc_p->ssc_state.ssc_rcmr); in atmel_ssc_resume()
808 ssc_writel(ssc_p->ssc->regs, CMR, ssc_p->ssc_state.ssc_cmr); in atmel_ssc_resume()
811 ssc_writel(ssc_p->ssc->regs, IER, ssc_p->ssc_state.ssc_imr); in atmel_ssc_resume()
819 ssc_writel(ssc_p->ssc->regs, CR, cr); in atmel_ssc_resume()
864 struct ssc_device *ssc = dev_get_drvdata(dev); in asoc_ssc_init() local
874 if (ssc->pdata->use_dma) in asoc_ssc_init()
893 struct ssc_device *ssc; in atmel_ssc_set_audio() local
896 ssc = ssc_request(ssc_id); in atmel_ssc_set_audio()
897 if (IS_ERR(ssc)) { in atmel_ssc_set_audio()
899 PTR_ERR(ssc)); in atmel_ssc_set_audio()
900 return PTR_ERR(ssc); in atmel_ssc_set_audio()
902 ssc_info[ssc_id].ssc = ssc; in atmel_ssc_set_audio()
905 return asoc_ssc_init(&ssc->pdev->dev); in atmel_ssc_set_audio()
911 struct ssc_device *ssc = ssc_info[ssc_id].ssc; in atmel_ssc_put_audio() local
913 ssc_free(ssc); in atmel_ssc_put_audio()