Lines Matching refs:omap_ssi
52 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_port_regs_show() local
53 void __iomem *base = omap_ssi->sys; in ssi_port_regs_show()
188 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_claim_lch() local
192 if (!omap_ssi->gdd_trn[lch].msg) { in ssi_claim_lch()
193 omap_ssi->gdd_trn[lch].msg = msg; in ssi_claim_lch()
194 omap_ssi->gdd_trn[lch].sg = msg->sgt.sgl; in ssi_claim_lch()
206 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_start_dma() local
207 void __iomem *gdd = omap_ssi->gdd; in ssi_start_dma()
269 spin_lock_bh(&omap_ssi->lock); in ssi_start_dma()
270 tmp = readl(omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_start_dma()
272 writel_relaxed(tmp, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_start_dma()
273 spin_unlock_bh(&omap_ssi->lock); in ssi_start_dma()
285 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_start_pio() local
305 val |= readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_start_pio()
306 writel(val, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_start_pio()
337 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_async_break() local
356 tmp = readl(omap_ssi->sys + in ssi_async_break()
359 omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_async_break()
414 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_calculate_div() local
415 u32 tx_fckrate = (u32) omap_ssi->fck_rate; in ssi_calculate_div()
422 tx_fckrate / omap_ssi->max_speed, omap_ssi->fck_rate, in ssi_calculate_div()
423 omap_ssi->max_speed); in ssi_calculate_div()
425 return tx_fckrate / omap_ssi->max_speed; in ssi_calculate_div()
453 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_setup() local
463 omap_ssi->max_speed = cl->tx_cfg.speed; in ssi_setup()
518 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_flush() local
534 msg = omap_ssi->gdd_trn[i].msg; in ssi_flush()
537 writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i)); in ssi_flush()
540 omap_ssi->gdd_trn[i].msg = NULL; in ssi_flush()
554 writel_relaxed(0, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_flush()
556 omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_flush()
557 writel_relaxed(0, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_flush()
558 writel(0xff, omap_ssi->sys + SSI_GDD_MPU_IRQ_STATUS_REG); in ssi_flush()
585 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in start_tx_work() local
588 writel(SSI_WAKE(0), omap_ssi->sys + SSI_SET_WAKE_REG(port->num)); in start_tx_work()
615 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_stop_tx() local
625 writel(SSI_WAKE(0), omap_ssi->sys + SSI_CLEAR_WAKE_REG(port->num)); in ssi_stop_tx()
665 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_cleanup_queues() local
714 tmp = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_cleanup_queues()
716 writel_relaxed(tmp, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_cleanup_queues()
717 writel_relaxed(status, omap_ssi->sys + in ssi_cleanup_queues()
723 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_cleanup_gdd() local
732 msg = omap_ssi->gdd_trn[i].msg; in ssi_cleanup_gdd()
735 writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i)); in ssi_cleanup_gdd()
745 omap_ssi->gdd_trn[i].msg = NULL; in ssi_cleanup_gdd()
747 tmp = readl_relaxed(omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_cleanup_gdd()
749 writel_relaxed(tmp, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_cleanup_gdd()
750 writel(val, omap_ssi->sys + SSI_GDD_MPU_IRQ_STATUS_REG); in ssi_cleanup_gdd()
803 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_error() local
817 spin_lock(&omap_ssi->lock); in ssi_error()
820 msg = omap_ssi->gdd_trn[i].msg; in ssi_error()
822 writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i)); in ssi_error()
824 omap_ssi->gdd_trn[i].msg = NULL; in ssi_error()
827 tmp = readl(omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_error()
829 writel_relaxed(tmp, omap_ssi->sys + SSI_GDD_MPU_IRQ_ENABLE_REG); in ssi_error()
830 spin_unlock(&omap_ssi->lock); in ssi_error()
833 tmp = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_error()
835 writel_relaxed(tmp, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_error()
839 omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_error()
861 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_break_complete() local
869 val = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_break_complete()
871 writel_relaxed(val, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_break_complete()
874 omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_break_complete()
890 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_pio_complete() local
927 writel(val, omap_ssi->sys + in ssi_pio_complete()
936 reg = readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_pio_complete()
943 writel_relaxed(reg, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_pio_complete()
944 writel_relaxed(val, omap_ssi->sys + SSI_MPU_STATUS_REG(port->num, 0)); in ssi_pio_complete()
956 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_pio_thread() local
957 void __iomem *sys = omap_ssi->sys; in ssi_pio_thread()
995 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_wake_thread() local
1010 omap_ssi->sys + SSI_SET_WAKE_REG(port->num)); in ssi_wake_thread()
1017 omap_ssi->sys + SSI_CLEAR_WAKE_REG(port->num)); in ssi_wake_thread()
1125 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_port_probe() local
1132 if (!ssi->port || !omap_ssi->port) { in ssi_port_probe()
1139 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()
1214 ssi_debug_add_port(omap_port, omap_ssi->dir); in ssi_port_probe()
1232 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_port_remove() local
1249 omap_ssi->port[omap_port->port_id] = NULL; in ssi_port_remove()
1278 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_save_port_ctx() local
1280 omap_port->sys_mpu_enable = readl(omap_ssi->sys + in ssi_save_port_ctx()
1290 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in ssi_restore_port_ctx() local
1294 omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0)); in ssi_restore_port_ctx()
1330 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in omap_ssi_port_runtime_suspend() local
1335 if (omap_ssi->get_loss) in omap_ssi_port_runtime_suspend()
1337 omap_ssi->get_loss(ssi->device.parent); in omap_ssi_port_runtime_suspend()
1348 struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); in omap_ssi_port_runtime_resume() local
1352 if ((omap_ssi->get_loss) && (omap_port->loss_count == in omap_ssi_port_runtime_resume()
1353 omap_ssi->get_loss(ssi->device.parent))) in omap_ssi_port_runtime_resume()