- interrupts: exactly one interrupt specifier
Optional properties:
-- pinctrl: When present, must have one state named "sleep"
- and one state named "default"
-- clocks: When present, must refer to exactly one clock named
- "apb_pclk"
-- dmas: When present, may have one or two dma channels.
- The first one must be named "rx", the second one
- must be named "tx".
+- pinctrl: When present, must have one state named "sleep"
+ and one state named "default"
+- clocks: When present, must refer to exactly one clock named
+ "apb_pclk"
+- dmas: When present, may have one or two dma channels.
+ The first one must be named "rx", the second one
+ must be named "tx".
+- auto-poll: Enables polling when using RX DMA.
+- poll-rate-ms: Rate at which poll occurs when auto-poll is set,
+ default 100ms.
+- poll-timeout-ms: Poll timeout when auto-poll is set, default
+ 3000ms.
See also bindings/arm/primecell.txt
dmaengine_slave_config(chan, &rx_conf);
uap->dmarx.chan = chan;
+ uap->dmarx.auto_poll_rate = false;
if (plat && plat->dma_rx_poll_enable) {
/* Set poll rate if specified. */
if (plat->dma_rx_poll_rate) {
plat->dma_rx_poll_timeout;
else
uap->dmarx.poll_timeout = 3000;
- } else
- uap->dmarx.auto_poll_rate = false;
-
+ } else if (!plat && dev->of_node) {
+ uap->dmarx.auto_poll_rate = of_property_read_bool(
+ dev->of_node, "auto-poll");
+ if (uap->dmarx.auto_poll_rate) {
+ u32 x;
+
+ if (0 == of_property_read_u32(dev->of_node,
+ "poll-rate-ms", &x))
+ uap->dmarx.poll_rate = x;
+ else
+ uap->dmarx.poll_rate = 100;
+ if (0 == of_property_read_u32(dev->of_node,
+ "poll-timeout-ms", &x))
+ uap->dmarx.poll_timeout = x;
+ else
+ uap->dmarx.poll_timeout = 3000;
+ }
+ }
dev_info(uap->port.dev, "DMA channel RX %s\n",
dma_chan_name(uap->dmarx.chan));
}