Lines Matching refs:imsg_ring

1609 	spin_lock(&priv->imsg_ring[mbox].lock);  in tsi721_imsg_handler()
1632 priv->imsg_ring[mbox].dev_id, mbox, -1); in tsi721_imsg_handler()
1643 spin_unlock(&priv->imsg_ring[mbox].lock); in tsi721_imsg_handler()
1670 priv->imsg_ring[mbox].dev_id = dev_id; in tsi721_open_inb_mbox()
1671 priv->imsg_ring[mbox].size = entries; in tsi721_open_inb_mbox()
1672 priv->imsg_ring[mbox].rx_slot = 0; in tsi721_open_inb_mbox()
1673 priv->imsg_ring[mbox].desc_rdptr = 0; in tsi721_open_inb_mbox()
1674 priv->imsg_ring[mbox].fq_wrptr = 0; in tsi721_open_inb_mbox()
1675 for (i = 0; i < priv->imsg_ring[mbox].size; i++) in tsi721_open_inb_mbox()
1676 priv->imsg_ring[mbox].imq_base[i] = NULL; in tsi721_open_inb_mbox()
1677 spin_lock_init(&priv->imsg_ring[mbox].lock); in tsi721_open_inb_mbox()
1680 priv->imsg_ring[mbox].buf_base = in tsi721_open_inb_mbox()
1683 &priv->imsg_ring[mbox].buf_phys, in tsi721_open_inb_mbox()
1686 if (priv->imsg_ring[mbox].buf_base == NULL) { in tsi721_open_inb_mbox()
1694 priv->imsg_ring[mbox].imfq_base = in tsi721_open_inb_mbox()
1697 &priv->imsg_ring[mbox].imfq_phys, in tsi721_open_inb_mbox()
1700 if (priv->imsg_ring[mbox].imfq_base == NULL) { in tsi721_open_inb_mbox()
1708 priv->imsg_ring[mbox].imd_base = in tsi721_open_inb_mbox()
1711 &priv->imsg_ring[mbox].imd_phys, GFP_KERNEL); in tsi721_open_inb_mbox()
1713 if (priv->imsg_ring[mbox].imd_base == NULL) { in tsi721_open_inb_mbox()
1722 free_ptr = priv->imsg_ring[mbox].imfq_base; in tsi721_open_inb_mbox()
1725 (u64)(priv->imsg_ring[mbox].buf_phys) + in tsi721_open_inb_mbox()
1746 iowrite32(((u64)priv->imsg_ring[mbox].imfq_phys >> 32), in tsi721_open_inb_mbox()
1748 iowrite32(((u64)priv->imsg_ring[mbox].imfq_phys & in tsi721_open_inb_mbox()
1755 iowrite32(((u64)priv->imsg_ring[mbox].imd_phys >> 32), in tsi721_open_inb_mbox()
1757 iowrite32(((u32)priv->imsg_ring[mbox].imd_phys & in tsi721_open_inb_mbox()
1803 priv->imsg_ring[mbox].fq_wrptr = entries - 1; in tsi721_open_inb_mbox()
1812 priv->imsg_ring[mbox].size * sizeof(struct tsi721_imsg_desc), in tsi721_open_inb_mbox()
1813 priv->imsg_ring[mbox].imd_base, in tsi721_open_inb_mbox()
1814 priv->imsg_ring[mbox].imd_phys); in tsi721_open_inb_mbox()
1816 priv->imsg_ring[mbox].imd_base = NULL; in tsi721_open_inb_mbox()
1821 priv->imsg_ring[mbox].size * 8, in tsi721_open_inb_mbox()
1822 priv->imsg_ring[mbox].imfq_base, in tsi721_open_inb_mbox()
1823 priv->imsg_ring[mbox].imfq_phys); in tsi721_open_inb_mbox()
1825 priv->imsg_ring[mbox].imfq_base = NULL; in tsi721_open_inb_mbox()
1829 priv->imsg_ring[mbox].size * TSI721_MSG_BUFFER_SIZE, in tsi721_open_inb_mbox()
1830 priv->imsg_ring[mbox].buf_base, in tsi721_open_inb_mbox()
1831 priv->imsg_ring[mbox].buf_phys); in tsi721_open_inb_mbox()
1833 priv->imsg_ring[mbox].buf_base = NULL; in tsi721_open_inb_mbox()
1869 for (rx_slot = 0; rx_slot < priv->imsg_ring[mbox].size; rx_slot++) in tsi721_close_inb_mbox()
1870 priv->imsg_ring[mbox].imq_base[rx_slot] = NULL; in tsi721_close_inb_mbox()
1874 priv->imsg_ring[mbox].size * TSI721_MSG_BUFFER_SIZE, in tsi721_close_inb_mbox()
1875 priv->imsg_ring[mbox].buf_base, in tsi721_close_inb_mbox()
1876 priv->imsg_ring[mbox].buf_phys); in tsi721_close_inb_mbox()
1878 priv->imsg_ring[mbox].buf_base = NULL; in tsi721_close_inb_mbox()
1882 priv->imsg_ring[mbox].size * 8, in tsi721_close_inb_mbox()
1883 priv->imsg_ring[mbox].imfq_base, in tsi721_close_inb_mbox()
1884 priv->imsg_ring[mbox].imfq_phys); in tsi721_close_inb_mbox()
1886 priv->imsg_ring[mbox].imfq_base = NULL; in tsi721_close_inb_mbox()
1890 priv->imsg_ring[mbox].size * sizeof(struct tsi721_imsg_desc), in tsi721_close_inb_mbox()
1891 priv->imsg_ring[mbox].imd_base, in tsi721_close_inb_mbox()
1892 priv->imsg_ring[mbox].imd_phys); in tsi721_close_inb_mbox()
1894 priv->imsg_ring[mbox].imd_base = NULL; in tsi721_close_inb_mbox()
1909 rx_slot = priv->imsg_ring[mbox].rx_slot; in tsi721_add_inb_buffer()
1910 if (priv->imsg_ring[mbox].imq_base[rx_slot]) { in tsi721_add_inb_buffer()
1918 priv->imsg_ring[mbox].imq_base[rx_slot] = buf; in tsi721_add_inb_buffer()
1920 if (++priv->imsg_ring[mbox].rx_slot == priv->imsg_ring[mbox].size) in tsi721_add_inb_buffer()
1921 priv->imsg_ring[mbox].rx_slot = 0; in tsi721_add_inb_buffer()
1949 desc = priv->imsg_ring[mbox].imd_base; in tsi721_get_inb_message()
1950 desc += priv->imsg_ring[mbox].desc_rdptr; in tsi721_get_inb_message()
1955 rx_slot = priv->imsg_ring[mbox].rx_slot; in tsi721_get_inb_message()
1956 while (priv->imsg_ring[mbox].imq_base[rx_slot] == NULL) { in tsi721_get_inb_message()
1957 if (++rx_slot == priv->imsg_ring[mbox].size) in tsi721_get_inb_message()
1964 rx_virt = priv->imsg_ring[mbox].buf_base + in tsi721_get_inb_message()
1965 (rx_phys - (u64)priv->imsg_ring[mbox].buf_phys); in tsi721_get_inb_message()
1967 buf = priv->imsg_ring[mbox].imq_base[rx_slot]; in tsi721_get_inb_message()
1973 priv->imsg_ring[mbox].imq_base[rx_slot] = NULL; in tsi721_get_inb_message()
1976 if (++priv->imsg_ring[mbox].desc_rdptr == priv->imsg_ring[mbox].size) in tsi721_get_inb_message()
1977 priv->imsg_ring[mbox].desc_rdptr = 0; in tsi721_get_inb_message()
1979 iowrite32(priv->imsg_ring[mbox].desc_rdptr, in tsi721_get_inb_message()
1983 free_ptr = priv->imsg_ring[mbox].imfq_base; in tsi721_get_inb_message()
1984 free_ptr[priv->imsg_ring[mbox].fq_wrptr] = cpu_to_le64(rx_phys); in tsi721_get_inb_message()
1986 if (++priv->imsg_ring[mbox].fq_wrptr == priv->imsg_ring[mbox].size) in tsi721_get_inb_message()
1987 priv->imsg_ring[mbox].fq_wrptr = 0; in tsi721_get_inb_message()
1989 iowrite32(priv->imsg_ring[mbox].fq_wrptr, in tsi721_get_inb_message()