Lines Matching refs:omap_ssi
62 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_debug_port_show() local
63 void __iomem *base = omap_ssi->sys; in ssi_debug_port_show()
199 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_claim_lch() local
203 if (!omap_ssi->gdd_trn[lch].msg) { in ssi_claim_lch()
204 omap_ssi->gdd_trn[lch].msg = msg; in ssi_claim_lch()
205 omap_ssi->gdd_trn[lch].sg = msg->sgt.sgl; in ssi_claim_lch()
217 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_start_dma() local
218 void __iomem *gdd = omap_ssi->gdd; in ssi_start_dma()
272 spin_lock_bh(&omap_ssi->lock); in ssi_start_dma()
273 tmp = readl(omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_start_dma()
275 writel_relaxed(tmp, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_start_dma()
276 spin_unlock_bh(&omap_ssi->lock); in ssi_start_dma()
288 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_start_pio() local
301 val |= readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_start_pio()
302 writel(val, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_start_pio()
333 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_async_break() local
352 tmp = readl(omap_ssi->sys + in ssi_async_break()
355 omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_async_break()
405 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_calculate_div() local
406 u32 tx_fckrate = (u32) omap_ssi->fck_rate; in ssi_calculate_div()
413 tx_fckrate / omap_ssi->max_speed, omap_ssi->fck_rate, in ssi_calculate_div()
414 omap_ssi->max_speed); in ssi_calculate_div()
416 return tx_fckrate / omap_ssi->max_speed; in ssi_calculate_div()
444 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_setup() local
454 omap_ssi->max_speed = cl->tx_cfg.speed; in ssi_setup()
508 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_flush() local
519 msg = omap_ssi->gdd_trn[i].msg; in ssi_flush()
522 writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i)); in ssi_flush()
525 omap_ssi->gdd_trn[i].msg = NULL; in ssi_flush()
539 writel_relaxed(0, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_flush()
541 omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_flush()
542 writel_relaxed(0, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_flush()
543 writel(0xff, omap_ssi->sys + SSI_GDD_MPU_IRQ_STATUS_REG); in ssi_flush()
564 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_start_tx() local
574 writel(SSI_WAKE(0), omap_ssi->sys + SSI_SET_WAKE_REG(port->num)); in ssi_start_tx()
585 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_stop_tx() local
595 writel(SSI_WAKE(0), omap_ssi->sys + SSI_CLEAR_WAKE_REG(port->num)); in ssi_stop_tx()
629 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_cleanup_queues() local
677 tmp = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_cleanup_queues()
679 writel_relaxed(tmp, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_cleanup_queues()
680 writel_relaxed(status, omap_ssi->sys + in ssi_cleanup_queues()
686 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_cleanup_gdd() local
695 msg = omap_ssi->gdd_trn[i].msg; in ssi_cleanup_gdd()
698 writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i)); in ssi_cleanup_gdd()
706 omap_ssi->gdd_trn[i].msg = NULL; in ssi_cleanup_gdd()
708 tmp = readl_relaxed(omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_cleanup_gdd()
710 writel_relaxed(tmp, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_cleanup_gdd()
711 writel(val, omap_ssi->sys + SSI_GDD_MPU_IRQ_STATUS_REG); in ssi_cleanup_gdd()
766 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_error() local
780 spin_lock(&omap_ssi->lock); in ssi_error()
783 msg = omap_ssi->gdd_trn[i].msg; in ssi_error()
785 writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i)); in ssi_error()
787 omap_ssi->gdd_trn[i].msg = NULL; in ssi_error()
790 tmp = readl(omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_error()
792 writel_relaxed(tmp, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_error()
793 spin_unlock(&omap_ssi->lock); in ssi_error()
796 tmp = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_error()
798 writel_relaxed(tmp, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_error()
802 omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_error()
824 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_break_complete() local
832 val = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_break_complete()
834 writel_relaxed(val, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_break_complete()
837 omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_break_complete()
853 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_pio_complete() local
890 writel(val, omap_ssi->sys + in ssi_pio_complete()
899 reg = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_pio_complete()
905 writel_relaxed(reg, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_pio_complete()
906 writel_relaxed(val, omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_pio_complete()
918 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_pio_tasklet() local
919 void __iomem *sys = omap_ssi->sys; in ssi_pio_tasklet()
963 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_wake_tasklet() local
982 omap_ssi->sys + SSI_SET_WAKE_REG(port->num)); in ssi_wake_tasklet()
989 omap_ssi->sys + SSI_CLEAR_WAKE_REG(port->num)); in ssi_wake_tasklet()
1113 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_port_probe() local
1125 if (!ssi->port || !omap_ssi->port) { in ssi_port_probe()
1132 for (port_id = 0; port_id < ssi->num_ports && omap_ssi->port[port_id]; in ssi_port_probe()
1184 omap_ssi->port[port_id] = omap_port; in ssi_port_probe()
1213 err = ssi_debug_add_port(omap_port, omap_ssi->dir); in ssi_port_probe()
1236 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_port_remove() local
1254 omap_ssi->port[omap_port->port_id] = NULL; in ssi_port_remove()
1267 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_save_port_ctx() local
1269 omap_port->sys_mpu_enable = readl(omap_ssi->sys + in ssi_save_port_ctx()
1279 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_restore_port_ctx() local
1283 omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_restore_port_ctx()
1327 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in omap_ssi_port_runtime_suspend() local
1332 if (omap_ssi->get_loss) in omap_ssi_port_runtime_suspend()
1334 omap_ssi->get_loss(ssi->device.parent); in omap_ssi_port_runtime_suspend()
1345 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in omap_ssi_port_runtime_resume() local
1349 if ((omap_ssi->get_loss) && (omap_port->loss_count == in omap_ssi_port_runtime_resume()
1350 omap_ssi->get_loss(ssi->device.parent))) in omap_ssi_port_runtime_resume()