drivers: dma: Align all drivers using dma_callback_t type
No need to re-declare such signature anymore. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
800e6c3a28
commit
3a3f10c06e
8 changed files with 8 additions and 23 deletions
|
@ -32,11 +32,9 @@ extern "C" {
|
||||||
struct dma_chan_data {
|
struct dma_chan_data {
|
||||||
uint32_t direction;
|
uint32_t direction;
|
||||||
void *blkcallback_arg;
|
void *blkcallback_arg;
|
||||||
void (*dma_blkcallback)(struct device *dev, void *arg,
|
dma_callback_t dma_blkcallback;
|
||||||
uint32_t channel, int error_code);
|
|
||||||
void *tfrcallback_arg;
|
void *tfrcallback_arg;
|
||||||
void (*dma_tfrcallback)(struct device *dev, void *arg,
|
dma_callback_t dma_tfrcallback;
|
||||||
uint32_t channel, int error_code);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DW_MAX_CHAN 8
|
#define DW_MAX_CHAN 8
|
||||||
|
|
|
@ -39,8 +39,7 @@ struct call_back {
|
||||||
edma_handle_t edma_handle;
|
edma_handle_t edma_handle;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
void (*dma_callback)(struct device *dev, void *callback_arg,
|
dma_callback_t dma_callback;
|
||||||
uint32_t channel, int error_code);
|
|
||||||
enum dma_channel_direction dir;
|
enum dma_channel_direction dir;
|
||||||
bool busy;
|
bool busy;
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,8 +26,7 @@ struct nios2_msgdma_dev_cfg {
|
||||||
uint32_t direction;
|
uint32_t direction;
|
||||||
struct k_sem sem_lock;
|
struct k_sem sem_lock;
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
void (*dma_callback)(struct device *dev, void *arg,
|
dma_callback_t dma_callback;
|
||||||
uint32_t id, int error_code);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEV_NAME(dev) ((dev)->name)
|
#define DEV_NAME(dev) ((dev)->name)
|
||||||
|
|
|
@ -133,9 +133,6 @@ struct dma_pl330_ch_internal {
|
||||||
int nonsec_mode;
|
int nonsec_mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*dma_xfer_callback)(struct device *dev, void *callback_arg,
|
|
||||||
uint32_t channel, int error_code);
|
|
||||||
|
|
||||||
struct dma_pl330_ch_config {
|
struct dma_pl330_ch_config {
|
||||||
/* Channel configuration details */
|
/* Channel configuration details */
|
||||||
uint64_t src_addr;
|
uint64_t src_addr;
|
||||||
|
@ -145,7 +142,7 @@ struct dma_pl330_ch_config {
|
||||||
enum dma_channel_direction direction;
|
enum dma_channel_direction direction;
|
||||||
uint32_t trans_size;
|
uint32_t trans_size;
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
dma_xfer_callback dma_callback;
|
dma_callback_t dma_callback;
|
||||||
uint32_t dma_exe_addr;
|
uint32_t dma_exe_addr;
|
||||||
struct k_mutex ch_mutex;
|
struct k_mutex ch_mutex;
|
||||||
int channel_active;
|
int channel_active;
|
||||||
|
|
|
@ -15,11 +15,8 @@ LOG_MODULE_REGISTER(dma_sam0, CONFIG_DMA_LOG_LEVEL);
|
||||||
|
|
||||||
#define DMA_REGS ((Dmac *)DT_INST_REG_ADDR(0))
|
#define DMA_REGS ((Dmac *)DT_INST_REG_ADDR(0))
|
||||||
|
|
||||||
typedef void (*dma_callback)(struct device *dev, void *callback_arg,
|
|
||||||
uint32_t channel, int error_code);
|
|
||||||
|
|
||||||
struct dma_sam0_channel {
|
struct dma_sam0_channel {
|
||||||
dma_callback cb;
|
dma_callback_t cb;
|
||||||
void *cb_arg;
|
void *cb_arg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(dma_sam_xdmac);
|
||||||
/* DMA channel configuration */
|
/* DMA channel configuration */
|
||||||
struct sam_xdmac_channel_cfg {
|
struct sam_xdmac_channel_cfg {
|
||||||
void *callback_arg;
|
void *callback_arg;
|
||||||
dma_callback callback;
|
dma_callback_t callback;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Device constant configuration parameters */
|
/* Device constant configuration parameters */
|
||||||
|
|
|
@ -17,10 +17,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** DMA transfer callback */
|
|
||||||
typedef void (*dma_callback)(struct device *dev, void *arg,
|
|
||||||
uint32_t channel, int error_code);
|
|
||||||
|
|
||||||
/* XDMA_MBR_UBC */
|
/* XDMA_MBR_UBC */
|
||||||
#define XDMA_UBC_NDE (0x1u << 24)
|
#define XDMA_UBC_NDE (0x1u << 24)
|
||||||
#define XDMA_UBC_NDE_FETCH_DIS (0x0u << 24)
|
#define XDMA_UBC_NDE_FETCH_DIS (0x0u << 24)
|
||||||
|
|
|
@ -20,8 +20,7 @@ struct dma_stm32_stream {
|
||||||
uint32_t src_size;
|
uint32_t src_size;
|
||||||
uint32_t dst_size;
|
uint32_t dst_size;
|
||||||
void *callback_arg; /* holds the client data */
|
void *callback_arg; /* holds the client data */
|
||||||
void (*dma_callback)(struct device *dev, void *arg,
|
dma_callback_t dma_callback;
|
||||||
uint32_t id, int error_code);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dma_stm32_data {
|
struct dma_stm32_data {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue