Lines Matching refs:dma

1521 static int udma_request(struct dma *dma)  in udma_request()  argument
1523 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_request()
1529 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_request()
1530 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_request()
1534 uc = &ud->channels[dma->id]; in udma_request()
1538 dev_err(dma->dev, "alloc dma res failed %d\n", ret); in udma_request()
1563 static int udma_rfree(struct dma *dma) in udma_rfree() argument
1565 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_rfree()
1568 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_rfree()
1569 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_rfree()
1572 uc = &ud->channels[dma->id]; in udma_rfree()
1583 static int udma_enable(struct dma *dma) in udma_enable() argument
1585 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_enable()
1589 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_enable()
1590 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_enable()
1593 uc = &ud->channels[dma->id]; in udma_enable()
1600 static int udma_disable(struct dma *dma) in udma_disable() argument
1602 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_disable()
1606 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_disable()
1607 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_disable()
1610 uc = &ud->channels[dma->id]; in udma_disable()
1615 dev_err(dma->dev, "%s not running\n", __func__); in udma_disable()
1620 static int udma_send(struct dma *dma, void *src, size_t len, void *metadata) in udma_send() argument
1622 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_send()
1634 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_send()
1635 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_send()
1638 uc = &ud->channels[dma->id]; in udma_send()
1669 dev_err(dma->dev, "TX dma push fail ch_id %lu %d\n", in udma_send()
1670 dma->id, ret); in udma_send()
1679 static int udma_receive(struct dma *dma, void **dst, void *metadata) in udma_receive() argument
1681 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_receive()
1690 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_receive()
1691 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_receive()
1694 uc = &ud->channels[dma->id]; in udma_receive()
1704 dev_err(dma->dev, "rx dma fail ch_id:%lu %d\n", dma->id, ret); in udma_receive()
1729 static int udma_of_xlate(struct dma *dma, struct ofnode_phandle_args *args) in udma_of_xlate() argument
1732 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_of_xlate()
1775 dma->id = uc->id; in udma_of_xlate()
1777 dma->id, ucc->needs_epib, in udma_of_xlate()
1784 int udma_prepare_rcv_buf(struct dma *dma, void *dst, size_t size) in udma_prepare_rcv_buf() argument
1786 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_prepare_rcv_buf()
1792 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_prepare_rcv_buf()
1793 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_prepare_rcv_buf()
1796 uc = &ud->channels[dma->id]; in udma_prepare_rcv_buf()
1828 static int udma_get_cfg(struct dma *dma, u32 id, void **data) in udma_get_cfg() argument
1830 struct udma_dev *ud = dev_get_priv(dma->dev); in udma_get_cfg()
1833 if (dma->id >= (ud->rchan_cnt + ud->tchan_cnt)) { in udma_get_cfg()
1834 dev_err(dma->dev, "invalid dma ch_id %lu\n", dma->id); in udma_get_cfg()
1840 uc = &ud->channels[dma->id]; in udma_get_cfg()