diff options
author | Arnd Bergmann <arnd@arndb.de> | 2015-02-17 01:46:49 +0000 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-02-23 16:12:24 +0530 |
commit | 411fdaf846afb0be1b54383c184f58a42fa416ff (patch) | |
tree | 2460b59f2c049f6e47c59d67f8c2f18c4be23b33 /include/linux/shdma-base.h | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
download | lwn-411fdaf846afb0be1b54383c184f58a42fa416ff.tar.gz lwn-411fdaf846afb0be1b54383c184f58a42fa416ff.zip |
dmaengine: shdma: use normal interface for passing slave id
in dma_slave_config, which is incompatible with the way that the
dmaengine API normally works.
I've had a closer look at the existing code now and found that all
slave drivers that pass a slave_id in dma_slave_config for SH do that
right after passing the same ID into shdma_chan_filter, so we can just
rely on that. However, the various shdma drivers currently do not
remember the slave ID that was passed into the filter function when
used in non-DT mode and only check the value to find a matching channel,
unlike all other drivers.
There might still be drivers that are not part of the kernel that rely
on setting the slave_id to some other value, so to be on the safe side,
this adds another 'real_slave_id' field to shdma_chan that remembers
the ID and uses it when a driver passes a zero slave_id in dma_slave_config,
like most drivers do.
Eventually, the real_slave_id and slave_id fields should just get merged
into one field, but that requires other changes.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'include/linux/shdma-base.h')
-rw-r--r-- | include/linux/shdma-base.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h index abdf1f229dc3..dd0ba502ccb3 100644 --- a/include/linux/shdma-base.h +++ b/include/linux/shdma-base.h @@ -69,6 +69,7 @@ struct shdma_chan { int id; /* Raw id of this channel */ int irq; /* Channel IRQ */ int slave_id; /* Client ID for slave DMA */ + int real_slave_id; /* argument passed to filter function */ int hw_req; /* DMA request line for slave DMA - same * as MID/RID, used with DT */ enum shdma_pm_state pm_state; |