function should be enabled
- phys: phandle + phy specifier pair
- 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:
usbhs: usb@e6590000 {
&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,
struct usbhs_fifo *fifo)
{
struct device *dev = usbhs_priv_to_dev(priv);
- usbhsf_dma_init_pdev(fifo);
+ if (dev->of_node)
+ usbhsf_dma_init_dt(dev, fifo);
+ else
+ usbhsf_dma_init_pdev(fifo);
if (fifo->tx_chan || fifo->rx_chan)
dev_dbg(dev, "enable DMAEngine (%s%s%s)\n",