• Home
  • Raw
  • Download

Lines Matching refs:omsg_ring

1317 	tx_slot = priv->omsg_ring[mbox].tx_slot;  in tsi721_add_outb_message()
1320 memcpy(priv->omsg_ring[mbox].omq_base[tx_slot], buffer, len); in tsi721_add_outb_message()
1326 desc = priv->omsg_ring[mbox].omd_base; in tsi721_add_outb_message()
1335 cpu_to_le32((u64)priv->omsg_ring[mbox].omq_phys[tx_slot] & in tsi721_add_outb_message()
1338 cpu_to_le32((u64)priv->omsg_ring[mbox].omq_phys[tx_slot] >> 32); in tsi721_add_outb_message()
1340 priv->omsg_ring[mbox].wr_count++; in tsi721_add_outb_message()
1343 if (++priv->omsg_ring[mbox].tx_slot == priv->omsg_ring[mbox].size) { in tsi721_add_outb_message()
1344 priv->omsg_ring[mbox].tx_slot = 0; in tsi721_add_outb_message()
1346 priv->omsg_ring[mbox].wr_count++; in tsi721_add_outb_message()
1352 iowrite32(priv->omsg_ring[mbox].wr_count, in tsi721_add_outb_message()
1370 spin_lock(&priv->omsg_ring[ch].lock); in tsi721_omsg_handler()
1389 srd_ptr = priv->omsg_ring[ch].sts_rdptr; in tsi721_omsg_handler()
1390 sts_ptr = priv->omsg_ring[ch].sts_base; in tsi721_omsg_handler()
1400 srd_ptr %= priv->omsg_ring[ch].sts_size; in tsi721_omsg_handler()
1407 priv->omsg_ring[ch].sts_rdptr = srd_ptr; in tsi721_omsg_handler()
1415 tx_slot = (last_ptr - (u64)priv->omsg_ring[ch].omd_phys)/ in tsi721_omsg_handler()
1423 if (tx_slot == priv->omsg_ring[ch].size) { in tsi721_omsg_handler()
1426 (u64)priv->omsg_ring[ch].omd_phys)/ in tsi721_omsg_handler()
1434 if (tx_slot == priv->omsg_ring[ch].size) in tsi721_omsg_handler()
1436 BUG_ON(tx_slot >= priv->omsg_ring[ch].size); in tsi721_omsg_handler()
1438 priv->omsg_ring[ch].dev_id, ch, in tsi721_omsg_handler()
1462 priv->omsg_ring[ch].dev_id, ch, in tsi721_omsg_handler()
1463 priv->omsg_ring[ch].tx_slot); in tsi721_omsg_handler()
1465 iowrite32(priv->omsg_ring[ch].tx_slot, in tsi721_omsg_handler()
1468 priv->omsg_ring[ch].wr_count = priv->omsg_ring[ch].tx_slot; in tsi721_omsg_handler()
1469 priv->omsg_ring[ch].sts_rdptr = 0; in tsi721_omsg_handler()
1484 spin_unlock(&priv->omsg_ring[ch].lock); in tsi721_omsg_handler()
1508 priv->omsg_ring[mbox].dev_id = dev_id; in tsi721_open_outb_mbox()
1509 priv->omsg_ring[mbox].size = entries; in tsi721_open_outb_mbox()
1510 priv->omsg_ring[mbox].sts_rdptr = 0; in tsi721_open_outb_mbox()
1511 spin_lock_init(&priv->omsg_ring[mbox].lock); in tsi721_open_outb_mbox()
1516 priv->omsg_ring[mbox].omq_base[i] = in tsi721_open_outb_mbox()
1519 &priv->omsg_ring[mbox].omq_phys[i], in tsi721_open_outb_mbox()
1521 if (priv->omsg_ring[mbox].omq_base[i] == NULL) { in tsi721_open_outb_mbox()
1531 priv->omsg_ring[mbox].omd_base = dma_alloc_coherent( in tsi721_open_outb_mbox()
1534 &priv->omsg_ring[mbox].omd_phys, GFP_KERNEL); in tsi721_open_outb_mbox()
1535 if (priv->omsg_ring[mbox].omd_base == NULL) { in tsi721_open_outb_mbox()
1543 priv->omsg_ring[mbox].tx_slot = 0; in tsi721_open_outb_mbox()
1546 priv->omsg_ring[mbox].sts_size = roundup_pow_of_two(entries + 1); in tsi721_open_outb_mbox()
1547 priv->omsg_ring[mbox].sts_base = dma_zalloc_coherent(&priv->pdev->dev, in tsi721_open_outb_mbox()
1548 priv->omsg_ring[mbox].sts_size * in tsi721_open_outb_mbox()
1550 &priv->omsg_ring[mbox].sts_phys, GFP_KERNEL); in tsi721_open_outb_mbox()
1551 if (priv->omsg_ring[mbox].sts_base == NULL) { in tsi721_open_outb_mbox()
1564 iowrite32(((u64)priv->omsg_ring[mbox].omd_phys >> 32), in tsi721_open_outb_mbox()
1566 iowrite32(((u64)priv->omsg_ring[mbox].omd_phys & in tsi721_open_outb_mbox()
1571 iowrite32(((u64)priv->omsg_ring[mbox].sts_phys >> 32), in tsi721_open_outb_mbox()
1573 iowrite32(((u64)priv->omsg_ring[mbox].sts_phys & in tsi721_open_outb_mbox()
1576 iowrite32(TSI721_DMAC_DSSZ_SIZE(priv->omsg_ring[mbox].sts_size), in tsi721_open_outb_mbox()
1617 bd_ptr = priv->omsg_ring[mbox].omd_base; in tsi721_open_outb_mbox()
1621 cpu_to_le32((u64)priv->omsg_ring[mbox].omd_phys & in tsi721_open_outb_mbox()
1624 cpu_to_le32((u64)priv->omsg_ring[mbox].omd_phys >> 32); in tsi721_open_outb_mbox()
1625 priv->omsg_ring[mbox].wr_count = 0; in tsi721_open_outb_mbox()
1640 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_open_outb_mbox()
1641 priv->omsg_ring[mbox].sts_base, in tsi721_open_outb_mbox()
1642 priv->omsg_ring[mbox].sts_phys); in tsi721_open_outb_mbox()
1644 priv->omsg_ring[mbox].sts_base = NULL; in tsi721_open_outb_mbox()
1650 priv->omsg_ring[mbox].omd_base, in tsi721_open_outb_mbox()
1651 priv->omsg_ring[mbox].omd_phys); in tsi721_open_outb_mbox()
1653 priv->omsg_ring[mbox].omd_base = NULL; in tsi721_open_outb_mbox()
1656 for (i = 0; i < priv->omsg_ring[mbox].size; i++) { in tsi721_open_outb_mbox()
1657 if (priv->omsg_ring[mbox].omq_base[i]) { in tsi721_open_outb_mbox()
1660 priv->omsg_ring[mbox].omq_base[i], in tsi721_open_outb_mbox()
1661 priv->omsg_ring[mbox].omq_phys[i]); in tsi721_open_outb_mbox()
1663 priv->omsg_ring[mbox].omq_base[i] = NULL; in tsi721_open_outb_mbox()
1700 priv->omsg_ring[mbox].sts_size * sizeof(struct tsi721_dma_sts), in tsi721_close_outb_mbox()
1701 priv->omsg_ring[mbox].sts_base, in tsi721_close_outb_mbox()
1702 priv->omsg_ring[mbox].sts_phys); in tsi721_close_outb_mbox()
1704 priv->omsg_ring[mbox].sts_base = NULL; in tsi721_close_outb_mbox()
1708 (priv->omsg_ring[mbox].size + 1) * in tsi721_close_outb_mbox()
1710 priv->omsg_ring[mbox].omd_base, in tsi721_close_outb_mbox()
1711 priv->omsg_ring[mbox].omd_phys); in tsi721_close_outb_mbox()
1713 priv->omsg_ring[mbox].omd_base = NULL; in tsi721_close_outb_mbox()
1716 for (i = 0; i < priv->omsg_ring[mbox].size; i++) { in tsi721_close_outb_mbox()
1717 if (priv->omsg_ring[mbox].omq_base[i]) { in tsi721_close_outb_mbox()
1720 priv->omsg_ring[mbox].omq_base[i], in tsi721_close_outb_mbox()
1721 priv->omsg_ring[mbox].omq_phys[i]); in tsi721_close_outb_mbox()
1723 priv->omsg_ring[mbox].omq_base[i] = NULL; in tsi721_close_outb_mbox()