Skip to content

Commit

Permalink
dmaengine: rcar-dmac: Support S2RAM
Browse files Browse the repository at this point in the history
It is not necessary to backup/restore module registers.
They will be set when a new transaction starts.

Signed-off-by: Hien Dang <hien.dang.eb@rvc.renesas.com>
  • Loading branch information
Hien Dang authored and r-kataok committed Dec 21, 2016
1 parent 79c4433 commit 9d867d5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions drivers/dma/sh/rcar-dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,16 +1638,26 @@ static struct dma_chan *rcar_dmac_of_xlate(struct of_phandle_args *dma_spec,
#ifdef CONFIG_PM_SLEEP
static int rcar_dmac_sleep_suspend(struct device *dev)
{
/*
* TODO: Wait for the current transfer to complete and stop the device.
*/
struct rcar_dmac *dmac = dev_get_drvdata(dev);
int i;

for (i = 0; i < dmac->n_channels; ++i) {
if (!dmac->channels[i].iomem)
break;

spin_lock(&dmac->channels[i].lock);
rcar_dmac_chan_halt(&dmac->channels[i]);
spin_unlock(&dmac->channels[i].lock);
}

return 0;
}

static int rcar_dmac_sleep_resume(struct device *dev)
{
/* TODO: Resume transfers, if any. */
return 0;
struct rcar_dmac *dmac = dev_get_drvdata(dev);

return rcar_dmac_init(dmac);
}
#endif

Expand Down

0 comments on commit 9d867d5

Please sign in to comment.