diff options
author | Vinod Koul <vinod.koul@intel.com> | 2018-04-09 23:25:52 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2018-04-09 23:25:52 -0400 |
commit | 3a7b854d625816166c0faa3846810fee23f4b3d3 (patch) | |
tree | af454e28e2183ee1e4cbfa19db763451e7de4fc8 | |
parent | 477e0f90aea39d9945c7e8f9a7b33a0861015161 (diff) | |
parent | a0b007e1ef1cb5b7f8d4be296beeb0a097af57ac (diff) |
Merge branch 'topic/renesas' into for-linus
-rw-r--r-- | Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | 2 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt | 1 | ||||
-rw-r--r-- | drivers/dma/sh/rcar-dmac.c | 13 |
3 files changed, 14 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt index 891db41e9420..aadfb236d53a 100644 --- a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt +++ b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.txt | |||
@@ -18,6 +18,7 @@ Required Properties: | |||
18 | Examples with soctypes are: | 18 | Examples with soctypes are: |
19 | - "renesas,dmac-r8a7743" (RZ/G1M) | 19 | - "renesas,dmac-r8a7743" (RZ/G1M) |
20 | - "renesas,dmac-r8a7745" (RZ/G1E) | 20 | - "renesas,dmac-r8a7745" (RZ/G1E) |
21 | - "renesas,dmac-r8a77470" (RZ/G1C) | ||
21 | - "renesas,dmac-r8a7790" (R-Car H2) | 22 | - "renesas,dmac-r8a7790" (R-Car H2) |
22 | - "renesas,dmac-r8a7791" (R-Car M2-W) | 23 | - "renesas,dmac-r8a7791" (R-Car M2-W) |
23 | - "renesas,dmac-r8a7792" (R-Car V2H) | 24 | - "renesas,dmac-r8a7792" (R-Car V2H) |
@@ -26,6 +27,7 @@ Required Properties: | |||
26 | - "renesas,dmac-r8a7795" (R-Car H3) | 27 | - "renesas,dmac-r8a7795" (R-Car H3) |
27 | - "renesas,dmac-r8a7796" (R-Car M3-W) | 28 | - "renesas,dmac-r8a7796" (R-Car M3-W) |
28 | - "renesas,dmac-r8a77970" (R-Car V3M) | 29 | - "renesas,dmac-r8a77970" (R-Car V3M) |
30 | - "renesas,dmac-r8a77980" (R-Car V3H) | ||
29 | 31 | ||
30 | - reg: base address and length of the registers block for the DMAC | 32 | - reg: base address and length of the registers block for the DMAC |
31 | 33 | ||
diff --git a/Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt b/Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt index f3d1f151ba80..9dc935e24e55 100644 --- a/Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt +++ b/Documentation/devicetree/bindings/dma/renesas,usb-dmac.txt | |||
@@ -11,6 +11,7 @@ Required Properties: | |||
11 | - "renesas,r8a7794-usb-dmac" (R-Car E2) | 11 | - "renesas,r8a7794-usb-dmac" (R-Car E2) |
12 | - "renesas,r8a7795-usb-dmac" (R-Car H3) | 12 | - "renesas,r8a7795-usb-dmac" (R-Car H3) |
13 | - "renesas,r8a7796-usb-dmac" (R-Car M3-W) | 13 | - "renesas,r8a7796-usb-dmac" (R-Car M3-W) |
14 | - "renesas,r8a77965-usb-dmac" (R-Car M3-N) | ||
14 | - reg: base address and length of the registers block for the DMAC | 15 | - reg: base address and length of the registers block for the DMAC |
15 | - interrupts: interrupt specifiers for the DMAC, one for each entry in | 16 | - interrupts: interrupt specifiers for the DMAC, one for each entry in |
16 | interrupt-names. | 17 | interrupt-names. |
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index e3ff162c03fc..65538c0f4cfc 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c | |||
@@ -1301,8 +1301,17 @@ static unsigned int rcar_dmac_chan_get_residue(struct rcar_dmac_chan *chan, | |||
1301 | * If the cookie doesn't correspond to the currently running transfer | 1301 | * If the cookie doesn't correspond to the currently running transfer |
1302 | * then the descriptor hasn't been processed yet, and the residue is | 1302 | * then the descriptor hasn't been processed yet, and the residue is |
1303 | * equal to the full descriptor size. | 1303 | * equal to the full descriptor size. |
1304 | * Also, a client driver is possible to call this function before | ||
1305 | * rcar_dmac_isr_channel_thread() runs. In this case, the "desc.running" | ||
1306 | * will be the next descriptor, and the done list will appear. So, if | ||
1307 | * the argument cookie matches the done list's cookie, we can assume | ||
1308 | * the residue is zero. | ||
1304 | */ | 1309 | */ |
1305 | if (cookie != desc->async_tx.cookie) { | 1310 | if (cookie != desc->async_tx.cookie) { |
1311 | list_for_each_entry(desc, &chan->desc.done, node) { | ||
1312 | if (cookie == desc->async_tx.cookie) | ||
1313 | return 0; | ||
1314 | } | ||
1306 | list_for_each_entry(desc, &chan->desc.pending, node) { | 1315 | list_for_each_entry(desc, &chan->desc.pending, node) { |
1307 | if (cookie == desc->async_tx.cookie) | 1316 | if (cookie == desc->async_tx.cookie) |
1308 | return desc->size; | 1317 | return desc->size; |
@@ -1677,8 +1686,8 @@ static const struct dev_pm_ops rcar_dmac_pm = { | |||
1677 | * - Wait for the current transfer to complete and stop the device, | 1686 | * - Wait for the current transfer to complete and stop the device, |
1678 | * - Resume transfers, if any. | 1687 | * - Resume transfers, if any. |
1679 | */ | 1688 | */ |
1680 | SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, | 1689 | SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, |
1681 | pm_runtime_force_resume) | 1690 | pm_runtime_force_resume) |
1682 | SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume, | 1691 | SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume, |
1683 | NULL) | 1692 | NULL) |
1684 | }; | 1693 | }; |