Commit abd2dbf6 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Felipe Balbi

usb: renesas_usbhs: add support for requesting DT DMA

This patch adds dma_request_slave_channel_reason() calling to request
dma slave channels for multiplatform environment.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 6e3f53ab
...@@ -14,6 +14,8 @@ Optional properties: ...@@ -14,6 +14,8 @@ Optional properties:
function should be enabled function should be enabled
- phys: phandle + phy specifier pair - phys: phandle + phy specifier pair
- phy-names: must be "usb" - phy-names: must be "usb"
- dmas: Must contain a list of references to DMA specifiers.
- dma-names : Must contain a list of DMA names, "tx" or "rx".
Example: Example:
usbhs: usb@e6590000 { usbhs: usb@e6590000 {
......
...@@ -1069,11 +1069,20 @@ static void usbhsf_dma_init_pdev(struct usbhs_fifo *fifo) ...@@ -1069,11 +1069,20 @@ static void usbhsf_dma_init_pdev(struct usbhs_fifo *fifo)
&fifo->rx_slave); &fifo->rx_slave);
} }
static void usbhsf_dma_init_dt(struct device *dev, struct usbhs_fifo *fifo)
{
fifo->tx_chan = dma_request_slave_channel_reason(dev, "tx");
fifo->rx_chan = dma_request_slave_channel_reason(dev, "rx");
}
static void usbhsf_dma_init(struct usbhs_priv *priv, static void usbhsf_dma_init(struct usbhs_priv *priv,
struct usbhs_fifo *fifo) struct usbhs_fifo *fifo)
{ {
struct device *dev = usbhs_priv_to_dev(priv); struct device *dev = usbhs_priv_to_dev(priv);
if (dev->of_node)
usbhsf_dma_init_dt(dev, fifo);
else
usbhsf_dma_init_pdev(fifo); usbhsf_dma_init_pdev(fifo);
if (fifo->tx_chan || fifo->rx_chan) if (fifo->tx_chan || fifo->rx_chan)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment