psc_i2s            63 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s;
psc_i2s           113 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = _psc_i2s;
psc_i2s           114 sound/soc/fsl/mpc5200_psc_i2s.c 	struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
psc_i2s           120 sound/soc/fsl/mpc5200_psc_i2s.c 	if (psc_i2s->playback.active && (isr & MPC52xx_PSC_IMR_TXEMP))
psc_i2s           121 sound/soc/fsl/mpc5200_psc_i2s.c 		psc_i2s->stats.underrun_count++;
psc_i2s           124 sound/soc/fsl/mpc5200_psc_i2s.c 	if (psc_i2s->capture.active && (isr & MPC52xx_PSC_IMR_ORERR))
psc_i2s           125 sound/soc/fsl/mpc5200_psc_i2s.c 		psc_i2s->stats.overrun_count++;
psc_i2s           193 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           196 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_startup(substream=%p)\n", substream);
psc_i2s           198 sound/soc/fsl/mpc5200_psc_i2s.c 	if (!psc_i2s->playback.active &&
psc_i2s           199 sound/soc/fsl/mpc5200_psc_i2s.c 	    !psc_i2s->capture.active) {
psc_i2s           201 sound/soc/fsl/mpc5200_psc_i2s.c 		rc = request_irq(psc_i2s->irq, &psc_i2s_status_irq, IRQF_SHARED,
psc_i2s           202 sound/soc/fsl/mpc5200_psc_i2s.c 				 "psc-i2s-status", psc_i2s);
psc_i2s           203 sound/soc/fsl/mpc5200_psc_i2s.c 		rc |= request_irq(psc_i2s->capture.irq,
psc_i2s           205 sound/soc/fsl/mpc5200_psc_i2s.c 				  "psc-i2s-capture", &psc_i2s->capture);
psc_i2s           206 sound/soc/fsl/mpc5200_psc_i2s.c 		rc |= request_irq(psc_i2s->playback.irq,
psc_i2s           208 sound/soc/fsl/mpc5200_psc_i2s.c 				  "psc-i2s-playback", &psc_i2s->playback);
psc_i2s           210 sound/soc/fsl/mpc5200_psc_i2s.c 			free_irq(psc_i2s->irq, psc_i2s);
psc_i2s           211 sound/soc/fsl/mpc5200_psc_i2s.c 			free_irq(psc_i2s->capture.irq,
psc_i2s           212 sound/soc/fsl/mpc5200_psc_i2s.c 				 &psc_i2s->capture);
psc_i2s           213 sound/soc/fsl/mpc5200_psc_i2s.c 			free_irq(psc_i2s->playback.irq,
psc_i2s           214 sound/soc/fsl/mpc5200_psc_i2s.c 				 &psc_i2s->playback);
psc_i2s           226 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           229 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "%s(substream=%p) p_size=%i p_bytes=%i"
psc_i2s           249 sound/soc/fsl/mpc5200_psc_i2s.c 		dev_dbg(psc_i2s->dev, "invalid format\n");
psc_i2s           252 sound/soc/fsl/mpc5200_psc_i2s.c 	out_be32(&psc_i2s->psc_regs->sicr, psc_i2s->sicr | mode);
psc_i2s           274 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           277 sound/soc/fsl/mpc5200_psc_i2s.c 	struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
psc_i2s           283 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->capture;
psc_i2s           285 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->playback;
psc_i2s           287 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_trigger(substream=%p, cmd=%i)"
psc_i2s           325 sound/soc/fsl/mpc5200_psc_i2s.c 		spin_lock_irqsave(&psc_i2s->lock, flags);
psc_i2s           339 sound/soc/fsl/mpc5200_psc_i2s.c 		spin_unlock_irqrestore(&psc_i2s->lock, flags);
psc_i2s           347 sound/soc/fsl/mpc5200_psc_i2s.c 			if (!psc_i2s->playback.active) {
psc_i2s           355 sound/soc/fsl/mpc5200_psc_i2s.c 			if (!psc_i2s->capture.active)
psc_i2s           366 sound/soc/fsl/mpc5200_psc_i2s.c 		dev_dbg(psc_i2s->dev, "invalid command\n");
psc_i2s           372 sound/soc/fsl/mpc5200_psc_i2s.c 	if (psc_i2s->playback.active)
psc_i2s           374 sound/soc/fsl/mpc5200_psc_i2s.c 	if (psc_i2s->capture.active)
psc_i2s           389 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           391 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_shutdown(substream=%p)\n", substream);
psc_i2s           397 sound/soc/fsl/mpc5200_psc_i2s.c 	if (!psc_i2s->playback.active &&
psc_i2s           398 sound/soc/fsl/mpc5200_psc_i2s.c 	    !psc_i2s->capture.active) {
psc_i2s           401 sound/soc/fsl/mpc5200_psc_i2s.c 		out_be16(&psc_i2s->psc_regs->isr_imr.imr, 0);
psc_i2s           402 sound/soc/fsl/mpc5200_psc_i2s.c 		out_8(&psc_i2s->psc_regs->command, 3 << 4); /* reset tx */
psc_i2s           403 sound/soc/fsl/mpc5200_psc_i2s.c 		out_8(&psc_i2s->psc_regs->command, 2 << 4); /* reset rx */
psc_i2s           404 sound/soc/fsl/mpc5200_psc_i2s.c 		out_8(&psc_i2s->psc_regs->command, 1 << 4); /* reset mode */
psc_i2s           405 sound/soc/fsl/mpc5200_psc_i2s.c 		out_8(&psc_i2s->psc_regs->command, 4 << 4); /* reset error */
psc_i2s           408 sound/soc/fsl/mpc5200_psc_i2s.c 		free_irq(psc_i2s->irq, psc_i2s);
psc_i2s           409 sound/soc/fsl/mpc5200_psc_i2s.c 		free_irq(psc_i2s->capture.irq, &psc_i2s->capture);
psc_i2s           410 sound/soc/fsl/mpc5200_psc_i2s.c 		free_irq(psc_i2s->playback.irq, &psc_i2s->playback);
psc_i2s           431 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = cpu_dai->private_data;
psc_i2s           432 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\n",
psc_i2s           450 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = cpu_dai->private_data;
psc_i2s           451 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_set_fmt(cpu_dai=%p, format=%i)\n",
psc_i2s           521 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           524 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_pcm_open(substream=%p)\n", substream);
psc_i2s           527 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->capture;
psc_i2s           529 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->playback;
psc_i2s           540 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           543 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_dbg(psc_i2s->dev, "psc_i2s_pcm_close(substream=%p)\n", substream);
psc_i2s           546 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->capture;
psc_i2s           548 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->playback;
psc_i2s           558 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;
psc_i2s           563 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->capture;
psc_i2s           565 sound/soc/fsl/mpc5200_psc_i2s.c 		s = &psc_i2s->playback;
psc_i2s           651 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = dev_get_drvdata(dev);
psc_i2s           655 sound/soc/fsl/mpc5200_psc_i2s.c 			in_be16(&psc_i2s->psc_regs->sr_csr.status),
psc_i2s           656 sound/soc/fsl/mpc5200_psc_i2s.c 			in_be32(&psc_i2s->psc_regs->sicr),
psc_i2s           657 sound/soc/fsl/mpc5200_psc_i2s.c 			in_be16(&psc_i2s->fifo_regs->rfnum) & 0x1ff,
psc_i2s           658 sound/soc/fsl/mpc5200_psc_i2s.c 			in_be16(&psc_i2s->fifo_regs->rfstat),
psc_i2s           659 sound/soc/fsl/mpc5200_psc_i2s.c 			in_be16(&psc_i2s->fifo_regs->tfnum) & 0x1ff,
psc_i2s           660 sound/soc/fsl/mpc5200_psc_i2s.c 			in_be16(&psc_i2s->fifo_regs->tfstat));
psc_i2s           666 sound/soc/fsl/mpc5200_psc_i2s.c 		return &psc_i2s->stats.underrun_count;
psc_i2s           668 sound/soc/fsl/mpc5200_psc_i2s.c 		return &psc_i2s->stats.overrun_count;
psc_i2s           676 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = dev_get_drvdata(dev);
psc_i2s           679 sound/soc/fsl/mpc5200_psc_i2s.c 	attrib = psc_i2s_get_stat_attr(psc_i2s, attr->attr.name);
psc_i2s           691 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = dev_get_drvdata(dev);
psc_i2s           694 sound/soc/fsl/mpc5200_psc_i2s.c 	attrib = psc_i2s_get_stat_attr(psc_i2s, attr->attr.name);
psc_i2s           715 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s;
psc_i2s           742 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s = kzalloc(sizeof *psc_i2s, GFP_KERNEL);
psc_i2s           743 sound/soc/fsl/mpc5200_psc_i2s.c 	if (!psc_i2s) {
psc_i2s           747 sound/soc/fsl/mpc5200_psc_i2s.c 	spin_lock_init(&psc_i2s->lock);
psc_i2s           748 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->irq = irq;
psc_i2s           749 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->psc_regs = regs;
psc_i2s           750 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->fifo_regs = regs + sizeof *psc_i2s->psc_regs;
psc_i2s           751 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->dev = &op->dev;
psc_i2s           752 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->playback.psc_i2s = psc_i2s;
psc_i2s           753 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->capture.psc_i2s = psc_i2s;
psc_i2s           754 sound/soc/fsl/mpc5200_psc_i2s.c 	snprintf(psc_i2s->name, sizeof psc_i2s->name, "PSC%u", psc_id+1);
psc_i2s           757 sound/soc/fsl/mpc5200_psc_i2s.c 	memcpy(&psc_i2s->dai, &psc_i2s_dai_template, sizeof psc_i2s->dai);
psc_i2s           758 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->dai.private_data = psc_i2s;
psc_i2s           759 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->dai.name = psc_i2s->name;
psc_i2s           760 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->dai.id = psc_id;
psc_i2s           765 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->capture.bcom_task =
psc_i2s           767 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->playback.bcom_task =
psc_i2s           769 sound/soc/fsl/mpc5200_psc_i2s.c 	if (!psc_i2s->capture.bcom_task ||
psc_i2s           770 sound/soc/fsl/mpc5200_psc_i2s.c 	    !psc_i2s->playback.bcom_task) {
psc_i2s           773 sound/soc/fsl/mpc5200_psc_i2s.c 		kfree(psc_i2s);
psc_i2s           778 sound/soc/fsl/mpc5200_psc_i2s.c 	out_be16(&psc_i2s->psc_regs->isr_imr.imr, 0);
psc_i2s           779 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->psc_regs->command, 3 << 4); /* reset transmitter */
psc_i2s           780 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->psc_regs->command, 2 << 4); /* reset receiver */
psc_i2s           781 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->psc_regs->command, 1 << 4); /* reset mode */
psc_i2s           782 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->psc_regs->command, 4 << 4); /* reset error */
psc_i2s           785 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S |
psc_i2s           788 sound/soc/fsl/mpc5200_psc_i2s.c 		psc_i2s->sicr |= MPC52xx_PSC_SICR_CELLSLAVE |
psc_i2s           790 sound/soc/fsl/mpc5200_psc_i2s.c 	out_be32(&psc_i2s->psc_regs->sicr,
psc_i2s           791 sound/soc/fsl/mpc5200_psc_i2s.c 		 psc_i2s->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8);
psc_i2s           802 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->psc_regs->mode, 0);
psc_i2s           803 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->psc_regs->mode, 0);
psc_i2s           806 sound/soc/fsl/mpc5200_psc_i2s.c 	out_be16(&psc_i2s->fifo_regs->rfalarm, 0x100);
psc_i2s           807 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->fifo_regs->rfcntl, 0x4);
psc_i2s           808 sound/soc/fsl/mpc5200_psc_i2s.c 	out_be16(&psc_i2s->fifo_regs->tfalarm, 0x100);
psc_i2s           809 sound/soc/fsl/mpc5200_psc_i2s.c 	out_8(&psc_i2s->fifo_regs->tfcntl, 0x7);
psc_i2s           812 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->playback.irq =
psc_i2s           813 sound/soc/fsl/mpc5200_psc_i2s.c 		bcom_get_task_irq(psc_i2s->playback.bcom_task);
psc_i2s           814 sound/soc/fsl/mpc5200_psc_i2s.c 	psc_i2s->capture.irq =
psc_i2s           815 sound/soc/fsl/mpc5200_psc_i2s.c 		bcom_get_task_irq(psc_i2s->capture.bcom_task);
psc_i2s           818 sound/soc/fsl/mpc5200_psc_i2s.c 	dev_set_drvdata(&op->dev, psc_i2s);
psc_i2s           821 sound/soc/fsl/mpc5200_psc_i2s.c 	rc = device_create_file(psc_i2s->dev, &dev_attr_status);
psc_i2s           822 sound/soc/fsl/mpc5200_psc_i2s.c 	rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
psc_i2s           823 sound/soc/fsl/mpc5200_psc_i2s.c 	rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
psc_i2s           825 sound/soc/fsl/mpc5200_psc_i2s.c 		dev_info(psc_i2s->dev, "error creating sysfs files\n");
psc_i2s           829 sound/soc/fsl/mpc5200_psc_i2s.c 				     &psc_i2s->dai);
psc_i2s           836 sound/soc/fsl/mpc5200_psc_i2s.c 	struct psc_i2s *psc_i2s = dev_get_drvdata(&op->dev);
psc_i2s           840 sound/soc/fsl/mpc5200_psc_i2s.c 	bcom_gen_bd_rx_release(psc_i2s->capture.bcom_task);
psc_i2s           841 sound/soc/fsl/mpc5200_psc_i2s.c 	bcom_gen_bd_tx_release(psc_i2s->playback.bcom_task);
psc_i2s           843 sound/soc/fsl/mpc5200_psc_i2s.c 	iounmap(psc_i2s->psc_regs);
psc_i2s           844 sound/soc/fsl/mpc5200_psc_i2s.c 	iounmap(psc_i2s->fifo_regs);
psc_i2s           845 sound/soc/fsl/mpc5200_psc_i2s.c 	kfree(psc_i2s);