Lines Matching refs:omsg_ring

1706 	spin_lock_irqsave(&priv->omsg_ring[mbox].lock, flags);  in tsi721_add_outb_message()
1708 tx_slot = priv->omsg_ring[mbox].tx_slot; in tsi721_add_outb_message()
1711 memcpy(priv->omsg_ring[mbox].omq_base[tx_slot], buffer, len); in tsi721_add_outb_message()
1717 desc = priv->omsg_ring[mbox].omd_base; in tsi721_add_outb_message()
1728 cpu_to_le32((u64)priv->omsg_ring[mbox].omq_phys[tx_slot] & in tsi721_add_outb_message()
1731 cpu_to_le32((u64)priv->omsg_ring[mbox].omq_phys[tx_slot] >> 32); in tsi721_add_outb_message()
1733 priv->omsg_ring[mbox].wr_count++; in tsi721_add_outb_message()
1736 if (++priv->omsg_ring[mbox].tx_slot == priv->omsg_ring[mbox].size) { in tsi721_add_outb_message()
1737 priv->omsg_ring[mbox].tx_slot = 0; in tsi721_add_outb_message()
1739 priv->omsg_ring[mbox].wr_count++; in tsi721_add_outb_message()
1745 iowrite32(priv->omsg_ring[mbox].wr_count, in tsi721_add_outb_message()
1749 spin_unlock_irqrestore(&priv->omsg_ring[mbox].lock, flags); in tsi721_add_outb_message()
1769 spin_lock(&priv->omsg_ring[ch].lock); in tsi721_omsg_handler()
1787 srd_ptr = priv->omsg_ring[ch].sts_rdptr; in tsi721_omsg_handler()
1788 sts_ptr = priv->omsg_ring[ch].sts_base; in tsi721_omsg_handler()
1798 srd_ptr %= priv->omsg_ring[ch].sts_size; in tsi721_omsg_handler()
1805 priv->omsg_ring[ch].sts_rdptr = srd_ptr; in tsi721_omsg_handler()
1813 tx_slot = (last_ptr - (u64)priv->omsg_ring[ch].omd_phys)/ in tsi721_omsg_handler()
1821 if (tx_slot == priv->omsg_ring[ch].size) { in tsi721_omsg_handler()
1824 (u64)priv->omsg_ring[ch].omd_phys)/ in tsi721_omsg_handler()
1830 if (tx_slot >= priv->omsg_ring[ch].size) in tsi721_omsg_handler()
1833 tx_slot, priv->omsg_ring[ch].size); in tsi721_omsg_handler()
1834 WARN_ON(tx_slot >= priv->omsg_ring[ch].size); in tsi721_omsg_handler()
1838 if (tx_slot == priv->omsg_ring[ch].size) in tsi721_omsg_handler()
1841 dev_id = priv->omsg_ring[ch].dev_id; in tsi721_omsg_handler()
1863 dev_id = priv->omsg_ring[ch].dev_id; in tsi721_omsg_handler()
1864 tx_slot = priv->omsg_ring[ch].tx_slot; in tsi721_omsg_handler()
1868 iowrite32(priv->omsg_ring[ch].tx_slot, in tsi721_omsg_handler()
1871 priv->omsg_ring[ch].wr_count = priv->omsg_ring[ch].tx_slot; in tsi721_omsg_handler()
1872 priv->omsg_ring[ch].sts_rdptr = 0; in tsi721_omsg_handler()
1887 spin_unlock(&priv->omsg_ring[ch].lock); in tsi721_omsg_handler()
1921 priv->omsg_ring[mbox].dev_id = dev_id; in tsi721_open_outb_mbox()
1922 priv->omsg_ring[mbox].size = entries; in tsi721_open_outb_mbox()
1923 priv->omsg_ring[mbox].sts_rdptr = 0; in tsi721_open_outb_mbox()
1924 spin_lock_init(&priv->omsg_ring[mbox].lock); in tsi721_open_outb_mbox()
1929 priv->omsg_ring[mbox].omq_base[i] = in tsi721_open_outb_mbox()
1932 &priv->omsg_ring[mbox].omq_phys[i], in tsi721_open_outb_mbox()
1934 if (priv->omsg_ring[mbox].omq_base[i] == NULL) { in tsi721_open_outb_mbox()
1943 priv->omsg_ring[mbox].omd_base = dma_alloc_coherent( in tsi721_open_outb_mbox()
1946 &priv->omsg_ring[mbox].omd_phys, GFP_KERNEL); in tsi721_open_outb_mbox()
1947 if (priv->omsg_ring[mbox].omd_base == NULL) { in tsi721_open_outb_mbox()
1954 priv->omsg_ring[mbox].tx_slot = 0; in tsi721_open_outb_mbox()
1957 priv->omsg_ring[mbox].sts_size = roundup_pow_of_two(entries + 1); in tsi721_open_outb_mbox()
1958 priv->omsg_ring[mbox].sts_base = dma_alloc_coherent(&priv->pdev->dev, in tsi721_open_outb_mbox()
1959 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_open_outb_mbox()
1960 &priv->omsg_ring[mbox].sts_phys, in tsi721_open_outb_mbox()
1962 if (priv->omsg_ring[mbox].sts_base == NULL) { in tsi721_open_outb_mbox()
1974 iowrite32(((u64)priv->omsg_ring[mbox].omd_phys >> 32), in tsi721_open_outb_mbox()
1976 iowrite32(((u64)priv->omsg_ring[mbox].omd_phys & in tsi721_open_outb_mbox()
1981 iowrite32(((u64)priv->omsg_ring[mbox].sts_phys >> 32), in tsi721_open_outb_mbox()
1983 iowrite32(((u64)priv->omsg_ring[mbox].sts_phys & in tsi721_open_outb_mbox()
1986 iowrite32(TSI721_DMAC_DSSZ_SIZE(priv->omsg_ring[mbox].sts_size), in tsi721_open_outb_mbox()
2023 bd_ptr = priv->omsg_ring[mbox].omd_base; in tsi721_open_outb_mbox()
2027 cpu_to_le32((u64)priv->omsg_ring[mbox].omd_phys & in tsi721_open_outb_mbox()
2030 cpu_to_le32((u64)priv->omsg_ring[mbox].omd_phys >> 32); in tsi721_open_outb_mbox()
2031 priv->omsg_ring[mbox].wr_count = 0; in tsi721_open_outb_mbox()
2047 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_open_outb_mbox()
2048 priv->omsg_ring[mbox].sts_base, in tsi721_open_outb_mbox()
2049 priv->omsg_ring[mbox].sts_phys); in tsi721_open_outb_mbox()
2051 priv->omsg_ring[mbox].sts_base = NULL; in tsi721_open_outb_mbox()
2057 priv->omsg_ring[mbox].omd_base, in tsi721_open_outb_mbox()
2058 priv->omsg_ring[mbox].omd_phys); in tsi721_open_outb_mbox()
2060 priv->omsg_ring[mbox].omd_base = NULL; in tsi721_open_outb_mbox()
2063 for (i = 0; i < priv->omsg_ring[mbox].size; i++) { in tsi721_open_outb_mbox()
2064 if (priv->omsg_ring[mbox].omq_base[i]) { in tsi721_open_outb_mbox()
2067 priv->omsg_ring[mbox].omq_base[i], in tsi721_open_outb_mbox()
2068 priv->omsg_ring[mbox].omq_phys[i]); in tsi721_open_outb_mbox()
2070 priv->omsg_ring[mbox].omq_base[i] = NULL; in tsi721_open_outb_mbox()
2107 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_close_outb_mbox()
2108 priv->omsg_ring[mbox].sts_base, in tsi721_close_outb_mbox()
2109 priv->omsg_ring[mbox].sts_phys); in tsi721_close_outb_mbox()
2111 priv->omsg_ring[mbox].sts_base = NULL; in tsi721_close_outb_mbox()
2115 (priv->omsg_ring[mbox].size + 1) * in tsi721_close_outb_mbox()
2117 priv->omsg_ring[mbox].omd_base, in tsi721_close_outb_mbox()
2118 priv->omsg_ring[mbox].omd_phys); in tsi721_close_outb_mbox()
2120 priv->omsg_ring[mbox].omd_base = NULL; in tsi721_close_outb_mbox()
2123 for (i = 0; i < priv->omsg_ring[mbox].size; i++) { in tsi721_close_outb_mbox()
2124 if (priv->omsg_ring[mbox].omq_base[i]) { in tsi721_close_outb_mbox()
2127 priv->omsg_ring[mbox].omq_base[i], in tsi721_close_outb_mbox()
2128 priv->omsg_ring[mbox].omq_phys[i]); in tsi721_close_outb_mbox()
2130 priv->omsg_ring[mbox].omq_base[i] = NULL; in tsi721_close_outb_mbox()