36 #ifndef __OS_HAL_DMA_H__
37 #define __OS_HAL_DMA_H__
u8 wrap_side
The side for using address-wrapping: source or destination, and only one side can activate address-wr...
Definition: os_hal_dma.h:314
u8 bw_transfer_en
Word to byte or byte to word transfer flag, only for HALF-SIZE DMA.
Definition: os_hal_dma.h:338
struct dma_vfifo vfifo
The VFF DMA specified setting.
Definition: os_hal_dma.h:412
u8 bw_limiter
Bandwidth limiter.
Definition: os_hal_dma.h:352
dma_control_mode specifies the DMA channel settings to control the DMA channel transfer mode...
Definition: os_hal_dma.h:330
HALF-SIZE DMA channel 7 as ISU3-RX.
Definition: os_hal_dma.h:173
dma_interrupt_type
DMA interrupt type definition.
Definition: os_hal_dma.h:249
The interrupt of data transfer completion, for FULL-SIZE DMA and HALF-SIZE DMA.
Definition: os_hal_dma.h:253
u8 src_inc_en
Source addresses automatically increase after every transfer, only for FULL-SIZE DMA and HALF-SIZE DM...
Definition: os_hal_dma.h:346
VFF DMA channel 17 as ISU2-TX.
Definition: os_hal_dma.h:189
int mtk_os_hal_dma_clr_dreq(enum dma_channel chn)
This function is used to clear dreq signal of DMA channel.
struct dma_control_mode ctrl_mode
The setting to control DMA hardware transfer mode.
Definition: os_hal_dma.h:414
u32 src_addr
The source address of data transfer.
Definition: os_hal_dma.h:404
HALF-SIZE DMA channel 4 as ISU2-TX.
Definition: os_hal_dma.h:167
FULL-SIZE DMA channel 12 as memory copy.
Definition: os_hal_dma.h:179
int mtk_os_hal_dma_alloc_chan(enum dma_channel chn)
This function is used to allocate one DMA channel.
u32 dst_addr
The destination address of data transfer.
Definition: os_hal_dma.h:406
int mtk_os_hal_dma_set_param(enum dma_channel chn, enum dma_param_type param_type, u32 value)
This function is used to set DMA parameter which is defined in the dma_param_type.
void * cb_data
The users data being used in callback function.
Definition: os_hal_dma.h:364
int mtk_os_hal_dma_pause(enum dma_channel chn)
This function is used to pause one DMA channel.
u8 wrap_en
Flag of transfer address-wrapping fucntion.
Definition: os_hal_dma.h:310
u8 dir
Transfer direction, only for HALF-SIZE DMA and VFF DMA.
Definition: os_hal_dma.h:402
The interrupt of the Virtual FIFO data threshold, only for Virtual FIFO DMA.
Definition: os_hal_dma.h:265
HALF-SIZE DMA channel 3 as ISU1-RX.
Definition: os_hal_dma.h:165
HALF-SIZE DMA channel 1 as ISU0-RX.
Definition: os_hal_dma.h:161
VFF DMA channel 29 as ADC-RX.
Definition: os_hal_dma.h:209
dma_setting specifies the DMA channel settings which control the DMA channel transfer.
Definition: os_hal_dma.h:394
u8 burst_type
Burst-type, only for FULL-SIZE DMA and HALF-SIZE DMA.
Definition: os_hal_dma.h:334
The byte count of data in Virtual FIFO, read-only for VFF DMA.
Definition: os_hal_dma.h:236
HALF-SIZE DMA channel 0 as ISU0-TX.
Definition: os_hal_dma.h:159
dma_interrupt_callback isr_cb
The interrupt callback function.
Definition: os_hal_dma.h:362
u32 timeout_cnt
Interrupt will assert if there is no new data into FIFO more than n T(Bus Clock)
Definition: os_hal_dma.h:387
VFF DMA channel 19 as ISU3-TX.
Definition: os_hal_dma.h:193
VFF DMA channel 13 as ISU0-TX.
Definition: os_hal_dma.h:181
The SW pointer of Virtual FIFO, Only for VFF DMA.
Definition: os_hal_dma.h:240
VFF DMA channel 18 as ISU2-RX.
Definition: os_hal_dma.h:191
int mtk_os_hal_dma_reset(enum dma_channel chn)
This function is used to reset DMA channel.
dma_channel
DMA channels definition.
Definition: os_hal_dma.h:157
int mtk_os_hal_dma_get_status(enum dma_channel chn)
This function is used to get DMA channel status.
VFF DMA channel 27 as I2S1-TX.
Definition: os_hal_dma.h:205
dma_interrupt indicates the callback function and users data of DMA hardware interrupts.
Definition: os_hal_dma.h:360
dma_vfifo specifies the specified settings of the VFF DMA, which are only used for the VFF DMA...
Definition: os_hal_dma.h:370
HALF-SIZE DMA channel 8 as ISU4-TX.
Definition: os_hal_dma.h:175
u8 alert_cmp_type
Specifies the Alert Length of Virtual FIFO DMA.
Definition: os_hal_dma.h:377
The programable address which indicates the memory address, for HALF-SIZE DMA and VFF DMA...
Definition: os_hal_dma.h:232
VFF DMA channel 16 as ISU1-RX.
Definition: os_hal_dma.h:187
VFF DMA channel 15 as ISU1-TX.
Definition: os_hal_dma.h:185
VFF DMA channel 21 as ISU4-TX.
Definition: os_hal_dma.h:197
u32 wrap_point
Wrap point from start address.
Definition: os_hal_dma.h:319
u8 transize
Data size within the confine of a bus cycle per transfer.
Definition: os_hal_dma.h:350
VFF DMA channel 22 as ISU4-RX.
Definition: os_hal_dma.h:199
int mtk_os_hal_dma_dump_register(enum dma_channel chn)
This function is used to dump DMA registers for debug.
VFF DMA channel 26 as I2S0-RX.
Definition: os_hal_dma.h:203
HALF-SIZE DMA channel 2 as ISU1-TX.
Definition: os_hal_dma.h:163
int mtk_os_hal_dma_update_swptr(enum dma_channel chn, u32 length_byte)
This function is used to update VFF DMA channel swptr.
int mtk_os_hal_dma_vff_read_data(enum dma_channel chn, u8 *buffer, u32 length)
This function is used to read data from FIFO of VFF DMA channel.
The fix address which indicates the data port of peripheral devices, for HALF-SIZE DMA and VFF DMA...
Definition: os_hal_dma.h:228
int mtk_os_hal_dma_release_chan(enum dma_channel chn)
This function is used to release one DMA channel.
u8 dst_inc_en
Destination addresses automatically increase after every transfer, only for FULL-SIZE DMA and HALF-SI...
Definition: os_hal_dma.h:342
u32 count
The total byte count of data transfer.
Definition: os_hal_dma.h:408
int mtk_os_hal_dma_register_isr(enum dma_channel chn, dma_interrupt_callback callback, void *callback_data, enum dma_interrupt_type isr_type)
This function is used to register interrupt callback.
dma_wrap specifies the DMA channel settings which control the address-wrap function for FULL-SIZE DMA...
Definition: os_hal_dma.h:306
int mtk_os_hal_dma_stop(enum dma_channel chn)
This function is used to stop one DMA channel.
int mtk_os_hal_dma_resume(enum dma_channel chn)
This function is used to resume one DMA channel.
int mtk_os_hal_dma_start(enum dma_channel chn)
This function is used to start one DMA channel.
The remain count of data transfer, read-only for FULL-SIZE DMA and HALF-SIZE DMA. ...
Definition: os_hal_dma.h:224
The Virtual FIFO Length, only for VFF DMA.
Definition: os_hal_dma.h:234
dma_param_type
DMA parameters type.
Definition: os_hal_dma.h:220
HALF-SIZE DMA channel 9 as ISU4-RX.
Definition: os_hal_dma.h:177
u8 interrupt_flag
The flag of DMA hardware interrupt, please refer to dma_interrupt_type.
Definition: os_hal_dma.h:398
HALF-SIZE DMA channel 5 as ISU2-RX.
Definition: os_hal_dma.h:169
VFF DMA channel 28 as I2S1-RX.
Definition: os_hal_dma.h:207
u8 reload_en
Reload transfer count flag, only for HALF-SIZE DMA.
Definition: os_hal_dma.h:410
u32 fifo_size
Virtual FIFO size.
Definition: os_hal_dma.h:383
int mtk_os_hal_dma_get_param(enum dma_channel chn, enum dma_param_type param_type)
This function is used to get DMA parameter which is defined in the dma_param_type.
void(* dma_interrupt_callback)(void *user_data)
This defines the function prototype of DMA interrupt service routines callback.
Definition: os_hal_dma.h:290
u32 fifo_thrsh
It specifies the threshold for DMA_INT_VFIFO_THRESHOLD.
Definition: os_hal_dma.h:375
VFF DMA channel 14 as ISU0-RX.
Definition: os_hal_dma.h:183
HALF-SIZE DMA channel 6 as ISU3-TX.
Definition: os_hal_dma.h:171
The HW pointer of Virtual FIFO, read-only for VFF DMA.
Definition: os_hal_dma.h:238
struct dma_wrap wrap_settings
The setting for address-wrap function.
Definition: os_hal_dma.h:354
u32 alert_len
Specifies the Compare Equation Between ALTLEN and FIFO_SIZE - FIFO_CNT.
Definition: os_hal_dma.h:381
The interrupt of the half of data transfer completion, only for HALF-SIZE DMA.
Definition: os_hal_dma.h:257
u32 wrap_to_addr
The address which DMA will wrap to.
Definition: os_hal_dma.h:324
The interrupt of the Virtual FIFO data updating timeout, only for Virtual FIFO DMA.
Definition: os_hal_dma.h:261
VFF DMA channel 25 as I2S0-TX.
Definition: os_hal_dma.h:201
VFF DMA channel 20 as ISU3-RX.
Definition: os_hal_dma.h:195
int mtk_os_hal_dma_config(enum dma_channel chn, struct dma_setting *setting)
This function is used to config one DMA channel.