Lines Matching refs:ipu_data

39 static struct ipu ipu_data;  variable
414 dev_err(ipu_data.dev, in ipu_ch_param_set_size()
439 dev_dbg(ipu_data.dev, in ipu_write_param_mem()
442 idmac_write_ipureg(&ipu_data, addr, IPU_IMA_ADDR); in ipu_write_param_mem()
443 idmac_write_ipureg(&ipu_data, *data++, IPU_IMA_DATA); in ipu_write_param_mem()
482 dev_err(ipu_data.dev, "Warning! Overflow on resize coeff.\n"); in calc_resize_coeffs()
486 dev_dbg(ipu_data.dev, "resizing from %u -> %u pixels, " in calc_resize_coeffs()
716 idmac_write_ipureg(&ipu_data, 1UL << channel, IPU_CHA_BUF0_RDY); in ipu_select_buffer()
719 idmac_write_ipureg(&ipu_data, 1UL << channel, IPU_CHA_BUF1_RDY); in ipu_select_buffer()
737 spin_lock_irqsave(&ipu_data.lock, flags); in ipu_update_channel_buffer()
740 reg = idmac_read_ipureg(&ipu_data, IPU_CHA_BUF0_RDY); in ipu_update_channel_buffer()
742 ipu_ic_disable_task(&ipu_data, channel); in ipu_update_channel_buffer()
747 idmac_write_ipureg(&ipu_data, dma_param_addr(channel) + in ipu_update_channel_buffer()
749 idmac_write_ipureg(&ipu_data, phyaddr, IPU_IMA_DATA); in ipu_update_channel_buffer()
751 reg = idmac_read_ipureg(&ipu_data, IPU_CHA_BUF1_RDY); in ipu_update_channel_buffer()
753 ipu_ic_disable_task(&ipu_data, channel); in ipu_update_channel_buffer()
758 reg = idmac_read_ipureg(&ipu_data, IPU_CHA_DB_MODE_SEL); in ipu_update_channel_buffer()
761 idmac_write_ipureg(&ipu_data, reg | (1UL << channel), in ipu_update_channel_buffer()
765 idmac_write_ipureg(&ipu_data, dma_param_addr(channel) + in ipu_update_channel_buffer()
767 idmac_write_ipureg(&ipu_data, phyaddr, IPU_IMA_DATA); in ipu_update_channel_buffer()
770 spin_unlock_irqrestore(&ipu_data.lock, flags); in ipu_update_channel_buffer()
1171 spin_lock(&ipu_data.lock); in idmac_interrupt()
1173 ready0 = idmac_read_ipureg(&ipu_data, IPU_CHA_BUF0_RDY); in idmac_interrupt()
1174 ready1 = idmac_read_ipureg(&ipu_data, IPU_CHA_BUF1_RDY); in idmac_interrupt()
1175 curbuf = idmac_read_ipureg(&ipu_data, IPU_CHA_CUR_BUF); in idmac_interrupt()
1176 err = idmac_read_ipureg(&ipu_data, IPU_INT_STAT_4); in idmac_interrupt()
1179 idmac_write_ipureg(&ipu_data, 1 << chan_id, IPU_INT_STAT_4); in idmac_interrupt()
1180 spin_unlock(&ipu_data.lock); in idmac_interrupt()
1192 spin_unlock(&ipu_data.lock); in idmac_interrupt()
1255 spin_lock(&ipu_data.lock); in idmac_interrupt()
1256 ipu_ic_disable_task(&ipu_data, chan_id); in idmac_interrupt()
1257 spin_unlock(&ipu_data.lock); in idmac_interrupt()
1676 spin_lock_init(&ipu_data.lock); in ipu_probe()
1683 ipu_data.dev = &pdev->dev; in ipu_probe()
1685 platform_set_drvdata(pdev, &ipu_data); in ipu_probe()
1691 ipu_data.irq_fn = ret; in ipu_probe()
1696 ipu_data.irq_err = ret; in ipu_probe()
1699 ipu_data.irq_fn, ipu_data.irq_err); in ipu_probe()
1702 ipu_data.reg_ipu = ioremap(mem_ipu->start, resource_size(mem_ipu)); in ipu_probe()
1703 if (!ipu_data.reg_ipu) { in ipu_probe()
1709 ipu_data.reg_ic = ioremap(mem_ic->start, resource_size(mem_ic)); in ipu_probe()
1710 if (!ipu_data.reg_ic) { in ipu_probe()
1716 ipu_data.ipu_clk = clk_get(&pdev->dev, NULL); in ipu_probe()
1717 if (IS_ERR(ipu_data.ipu_clk)) { in ipu_probe()
1718 ret = PTR_ERR(ipu_data.ipu_clk); in ipu_probe()
1723 clk_prepare_enable(ipu_data.ipu_clk); in ipu_probe()
1726 idmac_write_ipureg(&ipu_data, 0, IPU_INT_CTRL_1); in ipu_probe()
1727 idmac_write_ipureg(&ipu_data, 0, IPU_INT_CTRL_2); in ipu_probe()
1728 idmac_write_ipureg(&ipu_data, 0, IPU_INT_CTRL_3); in ipu_probe()
1729 idmac_write_ipureg(&ipu_data, 0, IPU_INT_CTRL_4); in ipu_probe()
1730 idmac_write_ipureg(&ipu_data, 0, IPU_INT_CTRL_5); in ipu_probe()
1733 (unsigned long)mem_ipu->start, ipu_data.irq_fn, ipu_data.irq_err); in ipu_probe()
1735 ret = ipu_irq_attach_irq(&ipu_data, pdev); in ipu_probe()
1740 ret = ipu_idmac_init(&ipu_data); in ipu_probe()
1744 tasklet_setup(&ipu_data.tasklet, ipu_gc_tasklet); in ipu_probe()
1746 ipu_data.dev = &pdev->dev; in ipu_probe()
1748 dev_dbg(ipu_data.dev, "IPU initialized\n"); in ipu_probe()
1754 ipu_irq_detach_irq(&ipu_data, pdev); in ipu_probe()
1755 clk_disable_unprepare(ipu_data.ipu_clk); in ipu_probe()
1756 clk_put(ipu_data.ipu_clk); in ipu_probe()
1758 iounmap(ipu_data.reg_ic); in ipu_probe()
1760 iounmap(ipu_data.reg_ipu); in ipu_probe()