Lines Matching refs:pchan
605 scpi_free_channels(struct device *dev, struct scpi_chan *pchan, int count) in scpi_free_channels() argument
609 for (i = 0; i < count && pchan->chan; i++, pchan++) { in scpi_free_channels()
610 mbox_free_channel(pchan->chan); in scpi_free_channels()
611 devm_kfree(dev, pchan->xfers); in scpi_free_channels()
612 devm_iounmap(dev, pchan->rx_payload); in scpi_free_channels()
679 struct scpi_chan *pchan = scpi_chan + idx; in scpi_probe() local
680 struct mbox_client *cl = &pchan->cl; in scpi_probe()
690 pchan->rx_payload = devm_ioremap(dev, res.start, size); in scpi_probe()
691 if (!pchan->rx_payload) { in scpi_probe()
696 pchan->tx_payload = pchan->rx_payload + (size >> 1); in scpi_probe()
705 INIT_LIST_HEAD(&pchan->rx_pending); in scpi_probe()
706 INIT_LIST_HEAD(&pchan->xfers_list); in scpi_probe()
707 spin_lock_init(&pchan->rx_lock); in scpi_probe()
708 mutex_init(&pchan->xfers_lock); in scpi_probe()
710 ret = scpi_alloc_xfer_list(dev, pchan); in scpi_probe()
712 pchan->chan = mbox_request_channel(cl, idx); in scpi_probe()
713 if (!IS_ERR(pchan->chan)) in scpi_probe()
715 ret = PTR_ERR(pchan->chan); in scpi_probe()