Lines Matching refs:dir

39 #define SET_RW_32(dw, dir, name, value)			\  argument
41 if ((dir) == EDMA_DIR_WRITE) \
47 #define GET_RW_32(dw, dir, name) \ argument
48 ((dir) == EDMA_DIR_WRITE \
64 #define SET_RW_64(dw, dir, name, value) \ argument
66 if ((dir) == EDMA_DIR_WRITE) \
72 #define GET_RW_64(dw, dir, name) \ argument
73 ((dir) == EDMA_DIR_WRITE \
86 #define SET_RW_COMPAT(dw, dir, name, value) \ argument
88 if ((dir) == EDMA_DIR_WRITE) \
95 __dw_ch_regs(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch) in __dw_ch_regs() argument
100 if (dir == EDMA_DIR_WRITE) in __dw_ch_regs()
106 static inline void writel_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, in writel_ch() argument
116 if (dir == EDMA_DIR_READ) in writel_ch()
129 static inline u32 readl_ch(struct dw_edma *dw, enum dw_edma_dir dir, u16 ch, in readl_ch() argument
141 if (dir == EDMA_DIR_READ) in readl_ch()
156 #define SET_CH_32(dw, dir, ch, name, value) \ argument
157 writel_ch(dw, dir, ch, value, &(__dw_ch_regs(dw, dir, ch)->name))
159 #define GET_CH_32(dw, dir, ch, name) \ argument
160 readl_ch(dw, dir, ch, &(__dw_ch_regs(dw, dir, ch)->name))
172 static u16 dw_edma_v0_core_ch_count(struct dw_edma *dw, enum dw_edma_dir dir) in dw_edma_v0_core_ch_count() argument
176 if (dir == EDMA_DIR_WRITE) in dw_edma_v0_core_ch_count()
195 GET_CH_32(dw, chan->dir, chan->id, ch_control1)); in dw_edma_v0_core_ch_status()
209 SET_RW_32(dw, chan->dir, int_clear, in dw_edma_v0_core_clear_done_int()
217 SET_RW_32(dw, chan->dir, int_clear, in dw_edma_v0_core_clear_abort_int()
221 static u32 dw_edma_v0_core_status_done_int(struct dw_edma *dw, enum dw_edma_dir dir) in dw_edma_v0_core_status_done_int() argument
224 GET_RW_32(dw, dir, int_status)); in dw_edma_v0_core_status_done_int()
227 static u32 dw_edma_v0_core_status_abort_int(struct dw_edma *dw, enum dw_edma_dir dir) in dw_edma_v0_core_status_abort_int() argument
230 GET_RW_32(dw, dir, int_status)); in dw_edma_v0_core_status_abort_int()
234 dw_edma_v0_core_handle_int(struct dw_edma_irq *dw_irq, enum dw_edma_dir dir, in dw_edma_v0_core_handle_int() argument
244 if (dir == EDMA_DIR_WRITE) { in dw_edma_v0_core_handle_int()
254 val = dw_edma_v0_core_status_done_int(dw, dir); in dw_edma_v0_core_handle_int()
265 val = dw_edma_v0_core_status_abort_int(dw, dir); in dw_edma_v0_core_handle_int()
373 SET_RW_32(dw, chan->dir, engine_en, BIT(0)); in dw_edma_v0_core_start()
377 SET_RW_COMPAT(dw, chan->dir, ch0_pwr_en, in dw_edma_v0_core_start()
381 SET_RW_COMPAT(dw, chan->dir, ch1_pwr_en, in dw_edma_v0_core_start()
385 SET_RW_COMPAT(dw, chan->dir, ch2_pwr_en, in dw_edma_v0_core_start()
389 SET_RW_COMPAT(dw, chan->dir, ch3_pwr_en, in dw_edma_v0_core_start()
393 SET_RW_COMPAT(dw, chan->dir, ch4_pwr_en, in dw_edma_v0_core_start()
397 SET_RW_COMPAT(dw, chan->dir, ch5_pwr_en, in dw_edma_v0_core_start()
401 SET_RW_COMPAT(dw, chan->dir, ch6_pwr_en, in dw_edma_v0_core_start()
405 SET_RW_COMPAT(dw, chan->dir, ch7_pwr_en, in dw_edma_v0_core_start()
411 tmp = GET_RW_32(dw, chan->dir, int_mask); in dw_edma_v0_core_start()
414 SET_RW_32(dw, chan->dir, int_mask, tmp); in dw_edma_v0_core_start()
416 tmp = GET_RW_32(dw, chan->dir, linked_list_err_en); in dw_edma_v0_core_start()
418 SET_RW_32(dw, chan->dir, linked_list_err_en, tmp); in dw_edma_v0_core_start()
420 SET_CH_32(dw, chan->dir, chan->id, ch_control1, in dw_edma_v0_core_start()
424 SET_CH_32(dw, chan->dir, chan->id, llp.lsb, in dw_edma_v0_core_start()
426 SET_CH_32(dw, chan->dir, chan->id, llp.msb, in dw_edma_v0_core_start()
433 SET_RW_32(dw, chan->dir, doorbell, in dw_edma_v0_core_start()
443 SET_RW_32(dw, chan->dir, done_imwr.lsb, chan->msi.address_lo); in dw_edma_v0_core_ch_config()
444 SET_RW_32(dw, chan->dir, done_imwr.msb, chan->msi.address_hi); in dw_edma_v0_core_ch_config()
446 SET_RW_32(dw, chan->dir, abort_imwr.lsb, chan->msi.address_lo); in dw_edma_v0_core_ch_config()
447 SET_RW_32(dw, chan->dir, abort_imwr.msb, chan->msi.address_hi); in dw_edma_v0_core_ch_config()
452 tmp = GET_RW_32(dw, chan->dir, ch01_imwr_data); in dw_edma_v0_core_ch_config()
457 tmp = GET_RW_32(dw, chan->dir, ch23_imwr_data); in dw_edma_v0_core_ch_config()
462 tmp = GET_RW_32(dw, chan->dir, ch45_imwr_data); in dw_edma_v0_core_ch_config()
467 tmp = GET_RW_32(dw, chan->dir, ch67_imwr_data); in dw_edma_v0_core_ch_config()
486 SET_RW_32(dw, chan->dir, ch01_imwr_data, tmp); in dw_edma_v0_core_ch_config()
491 SET_RW_32(dw, chan->dir, ch23_imwr_data, tmp); in dw_edma_v0_core_ch_config()
496 SET_RW_32(dw, chan->dir, ch45_imwr_data, tmp); in dw_edma_v0_core_ch_config()
501 SET_RW_32(dw, chan->dir, ch67_imwr_data, tmp); in dw_edma_v0_core_ch_config()