Lines Matching refs:omsg_ring

1312 	tx_slot = priv->omsg_ring[mbox].tx_slot;  in tsi721_add_outb_message()
1315 memcpy(priv->omsg_ring[mbox].omq_base[tx_slot], buffer, len); in tsi721_add_outb_message()
1321 desc = priv->omsg_ring[mbox].omd_base; in tsi721_add_outb_message()
1330 cpu_to_le32((u64)priv->omsg_ring[mbox].omq_phys[tx_slot] & in tsi721_add_outb_message()
1333 cpu_to_le32((u64)priv->omsg_ring[mbox].omq_phys[tx_slot] >> 32); in tsi721_add_outb_message()
1335 priv->omsg_ring[mbox].wr_count++; in tsi721_add_outb_message()
1338 if (++priv->omsg_ring[mbox].tx_slot == priv->omsg_ring[mbox].size) { in tsi721_add_outb_message()
1339 priv->omsg_ring[mbox].tx_slot = 0; in tsi721_add_outb_message()
1341 priv->omsg_ring[mbox].wr_count++; in tsi721_add_outb_message()
1347 iowrite32(priv->omsg_ring[mbox].wr_count, in tsi721_add_outb_message()
1365 spin_lock(&priv->omsg_ring[ch].lock); in tsi721_omsg_handler()
1384 srd_ptr = priv->omsg_ring[ch].sts_rdptr; in tsi721_omsg_handler()
1385 sts_ptr = priv->omsg_ring[ch].sts_base; in tsi721_omsg_handler()
1395 srd_ptr %= priv->omsg_ring[ch].sts_size; in tsi721_omsg_handler()
1402 priv->omsg_ring[ch].sts_rdptr = srd_ptr; in tsi721_omsg_handler()
1410 tx_slot = (last_ptr - (u64)priv->omsg_ring[ch].omd_phys)/ in tsi721_omsg_handler()
1418 if (tx_slot == priv->omsg_ring[ch].size) { in tsi721_omsg_handler()
1421 (u64)priv->omsg_ring[ch].omd_phys)/ in tsi721_omsg_handler()
1429 if (tx_slot == priv->omsg_ring[ch].size) in tsi721_omsg_handler()
1431 BUG_ON(tx_slot >= priv->omsg_ring[ch].size); in tsi721_omsg_handler()
1433 priv->omsg_ring[ch].dev_id, ch, in tsi721_omsg_handler()
1457 priv->omsg_ring[ch].dev_id, ch, in tsi721_omsg_handler()
1458 priv->omsg_ring[ch].tx_slot); in tsi721_omsg_handler()
1460 iowrite32(priv->omsg_ring[ch].tx_slot, in tsi721_omsg_handler()
1463 priv->omsg_ring[ch].wr_count = priv->omsg_ring[ch].tx_slot; in tsi721_omsg_handler()
1464 priv->omsg_ring[ch].sts_rdptr = 0; in tsi721_omsg_handler()
1479 spin_unlock(&priv->omsg_ring[ch].lock); in tsi721_omsg_handler()
1503 priv->omsg_ring[mbox].dev_id = dev_id; in tsi721_open_outb_mbox()
1504 priv->omsg_ring[mbox].size = entries; in tsi721_open_outb_mbox()
1505 priv->omsg_ring[mbox].sts_rdptr = 0; in tsi721_open_outb_mbox()
1506 spin_lock_init(&priv->omsg_ring[mbox].lock); in tsi721_open_outb_mbox()
1511 priv->omsg_ring[mbox].omq_base[i] = in tsi721_open_outb_mbox()
1514 &priv->omsg_ring[mbox].omq_phys[i], in tsi721_open_outb_mbox()
1516 if (priv->omsg_ring[mbox].omq_base[i] == NULL) { in tsi721_open_outb_mbox()
1526 priv->omsg_ring[mbox].omd_base = dma_alloc_coherent( in tsi721_open_outb_mbox()
1529 &priv->omsg_ring[mbox].omd_phys, GFP_KERNEL); in tsi721_open_outb_mbox()
1530 if (priv->omsg_ring[mbox].omd_base == NULL) { in tsi721_open_outb_mbox()
1538 priv->omsg_ring[mbox].tx_slot = 0; in tsi721_open_outb_mbox()
1541 priv->omsg_ring[mbox].sts_size = roundup_pow_of_two(entries + 1); in tsi721_open_outb_mbox()
1542 priv->omsg_ring[mbox].sts_base = dma_zalloc_coherent(&priv->pdev->dev, in tsi721_open_outb_mbox()
1543 priv->omsg_ring[mbox].sts_size * in tsi721_open_outb_mbox()
1545 &priv->omsg_ring[mbox].sts_phys, GFP_KERNEL); in tsi721_open_outb_mbox()
1546 if (priv->omsg_ring[mbox].sts_base == NULL) { in tsi721_open_outb_mbox()
1559 iowrite32(((u64)priv->omsg_ring[mbox].omd_phys >> 32), in tsi721_open_outb_mbox()
1561 iowrite32(((u64)priv->omsg_ring[mbox].omd_phys & in tsi721_open_outb_mbox()
1566 iowrite32(((u64)priv->omsg_ring[mbox].sts_phys >> 32), in tsi721_open_outb_mbox()
1568 iowrite32(((u64)priv->omsg_ring[mbox].sts_phys & in tsi721_open_outb_mbox()
1571 iowrite32(TSI721_DMAC_DSSZ_SIZE(priv->omsg_ring[mbox].sts_size), in tsi721_open_outb_mbox()
1612 bd_ptr = priv->omsg_ring[mbox].omd_base; in tsi721_open_outb_mbox()
1616 cpu_to_le32((u64)priv->omsg_ring[mbox].omd_phys & in tsi721_open_outb_mbox()
1619 cpu_to_le32((u64)priv->omsg_ring[mbox].omd_phys >> 32); in tsi721_open_outb_mbox()
1620 priv->omsg_ring[mbox].wr_count = 0; in tsi721_open_outb_mbox()
1635 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_open_outb_mbox()
1636 priv->omsg_ring[mbox].sts_base, in tsi721_open_outb_mbox()
1637 priv->omsg_ring[mbox].sts_phys); in tsi721_open_outb_mbox()
1639 priv->omsg_ring[mbox].sts_base = NULL; in tsi721_open_outb_mbox()
1645 priv->omsg_ring[mbox].omd_base, in tsi721_open_outb_mbox()
1646 priv->omsg_ring[mbox].omd_phys); in tsi721_open_outb_mbox()
1648 priv->omsg_ring[mbox].omd_base = NULL; in tsi721_open_outb_mbox()
1651 for (i = 0; i < priv->omsg_ring[mbox].size; i++) { in tsi721_open_outb_mbox()
1652 if (priv->omsg_ring[mbox].omq_base[i]) { in tsi721_open_outb_mbox()
1655 priv->omsg_ring[mbox].omq_base[i], in tsi721_open_outb_mbox()
1656 priv->omsg_ring[mbox].omq_phys[i]); in tsi721_open_outb_mbox()
1658 priv->omsg_ring[mbox].omq_base[i] = NULL; in tsi721_open_outb_mbox()
1695 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_close_outb_mbox()
1696 priv->omsg_ring[mbox].sts_base, in tsi721_close_outb_mbox()
1697 priv->omsg_ring[mbox].sts_phys); in tsi721_close_outb_mbox()
1699 priv->omsg_ring[mbox].sts_base = NULL; in tsi721_close_outb_mbox()
1703 (priv->omsg_ring[mbox].size + 1) * in tsi721_close_outb_mbox()
1705 priv->omsg_ring[mbox].omd_base, in tsi721_close_outb_mbox()
1706 priv->omsg_ring[mbox].omd_phys); in tsi721_close_outb_mbox()
1708 priv->omsg_ring[mbox].omd_base = NULL; in tsi721_close_outb_mbox()
1711 for (i = 0; i < priv->omsg_ring[mbox].size; i++) { in tsi721_close_outb_mbox()
1712 if (priv->omsg_ring[mbox].omq_base[i]) { in tsi721_close_outb_mbox()
1715 priv->omsg_ring[mbox].omq_base[i], in tsi721_close_outb_mbox()
1716 priv->omsg_ring[mbox].omq_phys[i]); in tsi721_close_outb_mbox()
1718 priv->omsg_ring[mbox].omq_base[i] = NULL; in tsi721_close_outb_mbox()