drivers: dma: Apply DMA callback change to relevant drivers
Now the dma device instance is passed as parameter to the callback. Fixes #26923 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
020dab824c
commit
6acee3dcba
19 changed files with 81 additions and 58 deletions
|
@ -166,7 +166,7 @@ I2S_DEVICE_OBJECT_DECLARE(1);
|
|||
I2S_DEVICE_OBJECT_DECLARE(2);
|
||||
I2S_DEVICE_OBJECT_DECLARE(3);
|
||||
|
||||
static void i2s_dma_tx_callback(void *, uint32_t, int);
|
||||
static void i2s_dma_tx_callback(struct device *, void *, uint32_t, int);
|
||||
static void i2s_tx_stream_disable(struct i2s_cavs_dev_data *,
|
||||
volatile struct i2s_cavs_ssp *const, struct device *);
|
||||
static void i2s_rx_stream_disable(struct i2s_cavs_dev_data *,
|
||||
|
@ -186,8 +186,8 @@ static inline void i2s_purge_stream_buffers(struct stream *strm,
|
|||
}
|
||||
|
||||
/* This function is executed in the interrupt context */
|
||||
static void i2s_dma_tx_callback(void *arg, uint32_t channel,
|
||||
int status)
|
||||
static void i2s_dma_tx_callback(struct device *dma_dev, void *arg,
|
||||
uint32_t channel, int status)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct i2s_cavs_config *const dev_cfg = DEV_CFG(dev);
|
||||
|
@ -242,7 +242,8 @@ static void i2s_dma_tx_callback(void *arg, uint32_t channel,
|
|||
}
|
||||
}
|
||||
|
||||
static void i2s_dma_rx_callback(void *arg, uint32_t channel, int status)
|
||||
static void i2s_dma_rx_callback(struct device *dma_dev, void *arg,
|
||||
uint32_t channel, int status)
|
||||
{
|
||||
struct device *dev = (struct device *)arg;
|
||||
const struct i2s_cavs_config *const dev_cfg = DEV_CFG(dev);
|
||||
|
|
|
@ -492,7 +492,8 @@ static void rx_stream_disable(struct stream *stream, struct device *dev);
|
|||
static void tx_stream_disable(struct stream *stream, struct device *dev);
|
||||
|
||||
/* This function is executed in the interrupt context */
|
||||
static void dma_rx_callback(void *arg, uint32_t channel, int status)
|
||||
static void dma_rx_callback(struct device *dma_dev, void *arg,
|
||||
uint32_t channel, int status)
|
||||
{
|
||||
struct device *dev = get_dev_from_rx_dma_channel(channel);
|
||||
const struct i2s_stm32_cfg *cfg = DEV_CFG(dev);
|
||||
|
@ -558,7 +559,8 @@ rx_disable:
|
|||
rx_stream_disable(stream, dev);
|
||||
}
|
||||
|
||||
static void dma_tx_callback(void *arg, uint32_t channel, int status)
|
||||
static void dma_tx_callback(struct device *dma_dev, void *arg,
|
||||
uint32_t channel, int status)
|
||||
{
|
||||
struct device *dev = get_dev_from_tx_dma_channel(channel);
|
||||
const struct i2s_stm32_cfg *cfg = DEV_CFG(dev);
|
||||
|
|
|
@ -104,8 +104,8 @@ struct i2s_sam_dev_data {
|
|||
#define MODULO_INC(val, max) { val = (++val < max) ? val : 0; }
|
||||
|
||||
static struct device *get_dev_from_dma_channel(uint32_t dma_channel);
|
||||
static void dma_rx_callback(void *, uint32_t, int);
|
||||
static void dma_tx_callback(void *, uint32_t, int);
|
||||
static void dma_rx_callback(struct device *, void *, uint32_t, int);
|
||||
static void dma_tx_callback(struct device *, void *, uint32_t, int);
|
||||
static void rx_stream_disable(struct stream *, Ssc *const, struct device *);
|
||||
static void tx_stream_disable(struct stream *, Ssc *const, struct device *);
|
||||
|
||||
|
@ -186,7 +186,8 @@ static int start_dma(struct device *dev_dma, uint32_t channel,
|
|||
}
|
||||
|
||||
/* This function is executed in the interrupt context */
|
||||
static void dma_rx_callback(void *callback_arg, uint32_t channel, int status)
|
||||
static void dma_rx_callback(struct device *dma_dev, void *callback_arg,
|
||||
uint32_t channel, int status)
|
||||
{
|
||||
struct device *dev = get_dev_from_dma_channel(channel);
|
||||
const struct i2s_sam_dev_cfg *const dev_cfg = DEV_CFG(dev);
|
||||
|
@ -245,7 +246,8 @@ rx_disable:
|
|||
}
|
||||
|
||||
/* This function is executed in the interrupt context */
|
||||
static void dma_tx_callback(void *callback_arg, uint32_t channel, int status)
|
||||
static void dma_tx_callback(struct device *dma_dev, void *callback_arg,
|
||||
uint32_t channel, int status)
|
||||
{
|
||||
struct device *dev = get_dev_from_dma_channel(channel);
|
||||
const struct i2s_sam_dev_cfg *const dev_cfg = DEV_CFG(dev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue