Lines Matching refs:imsg_ring

2119 	spin_lock(&priv->imsg_ring[mbox].lock);  in tsi721_imsg_handler()
2139 priv->imsg_ring[mbox].dev_id, mbox, -1); in tsi721_imsg_handler()
2150 spin_unlock(&priv->imsg_ring[mbox].lock); in tsi721_imsg_handler()
2182 priv->imsg_ring[mbox].dev_id = dev_id; in tsi721_open_inb_mbox()
2183 priv->imsg_ring[mbox].size = entries; in tsi721_open_inb_mbox()
2184 priv->imsg_ring[mbox].rx_slot = 0; in tsi721_open_inb_mbox()
2185 priv->imsg_ring[mbox].desc_rdptr = 0; in tsi721_open_inb_mbox()
2186 priv->imsg_ring[mbox].fq_wrptr = 0; in tsi721_open_inb_mbox()
2187 for (i = 0; i < priv->imsg_ring[mbox].size; i++) in tsi721_open_inb_mbox()
2188 priv->imsg_ring[mbox].imq_base[i] = NULL; in tsi721_open_inb_mbox()
2189 spin_lock_init(&priv->imsg_ring[mbox].lock); in tsi721_open_inb_mbox()
2192 priv->imsg_ring[mbox].buf_base = in tsi721_open_inb_mbox()
2195 &priv->imsg_ring[mbox].buf_phys, in tsi721_open_inb_mbox()
2198 if (priv->imsg_ring[mbox].buf_base == NULL) { in tsi721_open_inb_mbox()
2206 priv->imsg_ring[mbox].imfq_base = in tsi721_open_inb_mbox()
2209 &priv->imsg_ring[mbox].imfq_phys, in tsi721_open_inb_mbox()
2212 if (priv->imsg_ring[mbox].imfq_base == NULL) { in tsi721_open_inb_mbox()
2220 priv->imsg_ring[mbox].imd_base = in tsi721_open_inb_mbox()
2223 &priv->imsg_ring[mbox].imd_phys, GFP_KERNEL); in tsi721_open_inb_mbox()
2225 if (priv->imsg_ring[mbox].imd_base == NULL) { in tsi721_open_inb_mbox()
2234 free_ptr = priv->imsg_ring[mbox].imfq_base; in tsi721_open_inb_mbox()
2237 (u64)(priv->imsg_ring[mbox].buf_phys) + in tsi721_open_inb_mbox()
2258 iowrite32(((u64)priv->imsg_ring[mbox].imfq_phys >> 32), in tsi721_open_inb_mbox()
2260 iowrite32(((u64)priv->imsg_ring[mbox].imfq_phys & in tsi721_open_inb_mbox()
2267 iowrite32(((u64)priv->imsg_ring[mbox].imd_phys >> 32), in tsi721_open_inb_mbox()
2269 iowrite32(((u32)priv->imsg_ring[mbox].imd_phys & in tsi721_open_inb_mbox()
2313 priv->imsg_ring[mbox].fq_wrptr = entries - 1; in tsi721_open_inb_mbox()
2322 priv->imsg_ring[mbox].size * sizeof(struct tsi721_imsg_desc), in tsi721_open_inb_mbox()
2323 priv->imsg_ring[mbox].imd_base, in tsi721_open_inb_mbox()
2324 priv->imsg_ring[mbox].imd_phys); in tsi721_open_inb_mbox()
2326 priv->imsg_ring[mbox].imd_base = NULL; in tsi721_open_inb_mbox()
2331 priv->imsg_ring[mbox].size * 8, in tsi721_open_inb_mbox()
2332 priv->imsg_ring[mbox].imfq_base, in tsi721_open_inb_mbox()
2333 priv->imsg_ring[mbox].imfq_phys); in tsi721_open_inb_mbox()
2335 priv->imsg_ring[mbox].imfq_base = NULL; in tsi721_open_inb_mbox()
2339 priv->imsg_ring[mbox].size * TSI721_MSG_BUFFER_SIZE, in tsi721_open_inb_mbox()
2340 priv->imsg_ring[mbox].buf_base, in tsi721_open_inb_mbox()
2341 priv->imsg_ring[mbox].buf_phys); in tsi721_open_inb_mbox()
2343 priv->imsg_ring[mbox].buf_base = NULL; in tsi721_open_inb_mbox()
2379 for (rx_slot = 0; rx_slot < priv->imsg_ring[mbox].size; rx_slot++) in tsi721_close_inb_mbox()
2380 priv->imsg_ring[mbox].imq_base[rx_slot] = NULL; in tsi721_close_inb_mbox()
2384 priv->imsg_ring[mbox].size * TSI721_MSG_BUFFER_SIZE, in tsi721_close_inb_mbox()
2385 priv->imsg_ring[mbox].buf_base, in tsi721_close_inb_mbox()
2386 priv->imsg_ring[mbox].buf_phys); in tsi721_close_inb_mbox()
2388 priv->imsg_ring[mbox].buf_base = NULL; in tsi721_close_inb_mbox()
2392 priv->imsg_ring[mbox].size * 8, in tsi721_close_inb_mbox()
2393 priv->imsg_ring[mbox].imfq_base, in tsi721_close_inb_mbox()
2394 priv->imsg_ring[mbox].imfq_phys); in tsi721_close_inb_mbox()
2396 priv->imsg_ring[mbox].imfq_base = NULL; in tsi721_close_inb_mbox()
2400 priv->imsg_ring[mbox].size * sizeof(struct tsi721_imsg_desc), in tsi721_close_inb_mbox()
2401 priv->imsg_ring[mbox].imd_base, in tsi721_close_inb_mbox()
2402 priv->imsg_ring[mbox].imd_phys); in tsi721_close_inb_mbox()
2404 priv->imsg_ring[mbox].imd_base = NULL; in tsi721_close_inb_mbox()
2419 rx_slot = priv->imsg_ring[mbox].rx_slot; in tsi721_add_inb_buffer()
2420 if (priv->imsg_ring[mbox].imq_base[rx_slot]) { in tsi721_add_inb_buffer()
2428 priv->imsg_ring[mbox].imq_base[rx_slot] = buf; in tsi721_add_inb_buffer()
2430 if (++priv->imsg_ring[mbox].rx_slot == priv->imsg_ring[mbox].size) in tsi721_add_inb_buffer()
2431 priv->imsg_ring[mbox].rx_slot = 0; in tsi721_add_inb_buffer()
2459 desc = priv->imsg_ring[mbox].imd_base; in tsi721_get_inb_message()
2460 desc += priv->imsg_ring[mbox].desc_rdptr; in tsi721_get_inb_message()
2465 rx_slot = priv->imsg_ring[mbox].rx_slot; in tsi721_get_inb_message()
2466 while (priv->imsg_ring[mbox].imq_base[rx_slot] == NULL) { in tsi721_get_inb_message()
2467 if (++rx_slot == priv->imsg_ring[mbox].size) in tsi721_get_inb_message()
2474 rx_virt = priv->imsg_ring[mbox].buf_base + in tsi721_get_inb_message()
2475 (rx_phys - (u64)priv->imsg_ring[mbox].buf_phys); in tsi721_get_inb_message()
2477 buf = priv->imsg_ring[mbox].imq_base[rx_slot]; in tsi721_get_inb_message()
2483 priv->imsg_ring[mbox].imq_base[rx_slot] = NULL; in tsi721_get_inb_message()
2486 if (++priv->imsg_ring[mbox].desc_rdptr == priv->imsg_ring[mbox].size) in tsi721_get_inb_message()
2487 priv->imsg_ring[mbox].desc_rdptr = 0; in tsi721_get_inb_message()
2489 iowrite32(priv->imsg_ring[mbox].desc_rdptr, in tsi721_get_inb_message()
2493 free_ptr = priv->imsg_ring[mbox].imfq_base; in tsi721_get_inb_message()
2494 free_ptr[priv->imsg_ring[mbox].fq_wrptr] = cpu_to_le64(rx_phys); in tsi721_get_inb_message()
2496 if (++priv->imsg_ring[mbox].fq_wrptr == priv->imsg_ring[mbox].size) in tsi721_get_inb_message()
2497 priv->imsg_ring[mbox].fq_wrptr = 0; in tsi721_get_inb_message()
2499 iowrite32(priv->imsg_ring[mbox].fq_wrptr, in tsi721_get_inb_message()