Lines Matching refs:dma_ctrl_reg

324 									uint32_t *dma_ctrl_reg)  in dma_channel_update_dreq_mode()  argument
331 DMA_CTRL_REG_SET_FIELD(DREQ_MODE, *dma_ctrl_reg, DREQ_MODE_SW); in dma_channel_update_dreq_mode()
337 DMA_CTRL_REG_SET_FIELD(DREQ_MODE, *dma_ctrl_reg, DREQ_MODE_HW); in dma_channel_update_dreq_mode()
346 static bool dma_channel_update_src_addr_adj(enum dma_addr_adj addr_adj, uint32_t *dma_ctrl_reg) in dma_channel_update_src_addr_adj() argument
350 DMA_CTRL_REG_SET_FIELD(AINC, *dma_ctrl_reg, ADDR_ADJ_NO_CHANGE); in dma_channel_update_src_addr_adj()
353 DMA_CTRL_REG_SET_FIELD(AINC, *dma_ctrl_reg, ADDR_ADJ_INCR); in dma_channel_update_src_addr_adj()
362 static bool dma_channel_update_dst_addr_adj(enum dma_addr_adj addr_adj, uint32_t *dma_ctrl_reg) in dma_channel_update_dst_addr_adj() argument
366 DMA_CTRL_REG_SET_FIELD(BINC, *dma_ctrl_reg, ADDR_ADJ_NO_CHANGE); in dma_channel_update_dst_addr_adj()
369 DMA_CTRL_REG_SET_FIELD(BINC, *dma_ctrl_reg, ADDR_ADJ_INCR); in dma_channel_update_dst_addr_adj()
378 static bool dma_channel_update_bus_width(uint16_t bw, uint32_t *dma_ctrl_reg) in dma_channel_update_bus_width() argument
382 DMA_CTRL_REG_SET_FIELD(BW, *dma_ctrl_reg, BUS_WIDTH_1B); in dma_channel_update_bus_width()
385 DMA_CTRL_REG_SET_FIELD(BW, *dma_ctrl_reg, BUS_WIDTH_2B); in dma_channel_update_bus_width()
388 DMA_CTRL_REG_SET_FIELD(BW, *dma_ctrl_reg, BUS_WIDTH_4B); in dma_channel_update_bus_width()
397 static bool dma_channel_update_burst_mode(uint16_t burst, uint32_t *dma_ctrl_reg) in dma_channel_update_burst_mode() argument
401 DMA_CTRL_REG_SET_FIELD(BURST_MODE, *dma_ctrl_reg, BURST_MODE_0B); in dma_channel_update_burst_mode()
404 DMA_CTRL_REG_SET_FIELD(BURST_MODE, *dma_ctrl_reg, BURST_MODE_4B); in dma_channel_update_burst_mode()
407 DMA_CTRL_REG_SET_FIELD(BURST_MODE, *dma_ctrl_reg, BURST_MODE_8B); in dma_channel_update_burst_mode()
417 uint32_t channel, uint32_t *dma_ctrl_reg) in dma_channel_update_req_sense() argument
428 DMA_CTRL_REG_SET_FIELD(REQ_SENSE, *dma_ctrl_reg, REQ_SENSE_EDGE); in dma_channel_update_req_sense()
432 DMA_CTRL_REG_SET_FIELD(REQ_SENSE, *dma_ctrl_reg, REQ_SENSE_LEVEL); in dma_channel_update_req_sense()
489 uint32_t dma_ctrl_reg; in dma_smartbond_config() local
498 dma_ctrl_reg = regs->DMA_CTRL_REG; in dma_smartbond_config()
500 if (DMA_CTRL_REG_GET_FIELD(DMA_ON, dma_ctrl_reg)) { in dma_smartbond_config()
537 DMA_CTRL_REG_SET_FIELD(DMA_PRIO, dma_ctrl_reg, cfg->channel_priority); in dma_smartbond_config()
540 !dma_channel_update_burst_mode(cfg->source_burst_length, &dma_ctrl_reg))) { in dma_smartbond_config()
548 !dma_channel_update_bus_width(cfg->source_data_size, &dma_ctrl_reg)) { in dma_smartbond_config()
562 &dma_ctrl_reg)) { in dma_smartbond_config()
567 if (!dma_channel_update_dst_addr_adj(cfg->head_block->dest_addr_adj, &dma_ctrl_reg)) { in dma_smartbond_config()
572 if (!dma_channel_update_dreq_mode(cfg->channel_direction, &dma_ctrl_reg)) { in dma_smartbond_config()
578 if (cfg->cyclic && DMA_CTRL_REG_GET_FIELD(DREQ_MODE, dma_ctrl_reg) != DREQ_MODE_HW) { in dma_smartbond_config()
583 DMA_CTRL_REG_SET_FIELD(CIRCULAR, dma_ctrl_reg, cfg->cyclic); in dma_smartbond_config()
585 if (DMA_CTRL_REG_GET_FIELD(DREQ_MODE, dma_ctrl_reg) == DREQ_MODE_SW && in dma_smartbond_config()
586 DMA_CTRL_REG_GET_FIELD(AINC, dma_ctrl_reg) == ADDR_ADJ_NO_CHANGE && in dma_smartbond_config()
587 DMA_CTRL_REG_GET_FIELD(BINC, dma_ctrl_reg) == ADDR_ADJ_INCR) { in dma_smartbond_config()
592 DMA_CTRL_REG_SET_FIELD(DMA_INIT, dma_ctrl_reg, COPY_MODE_INIT); in dma_smartbond_config()
594 DMA_CTRL_REG_SET_FIELD(DMA_INIT, dma_ctrl_reg, COPY_MODE_BLOCK); in dma_smartbond_config()
597 dma_channel_update_req_sense(cfg->dma_slot, channel, &dma_ctrl_reg); in dma_smartbond_config()
599 regs->DMA_CTRL_REG = dma_ctrl_reg; in dma_smartbond_config()
805 uint32_t dma_ctrl_reg, dma_idx_reg, dma_len_reg; in dma_smartbond_get_status() local
831 dma_ctrl_reg = regs->DMA_CTRL_REG; in dma_smartbond_get_status()
836 bus_width = DMA_CTRL_REG_GET_FIELD(BW, dma_ctrl_reg); in dma_smartbond_get_status()
846 stat->busy = DMA_CTRL_REG_GET_FIELD(DMA_ON, dma_ctrl_reg); in dma_smartbond_get_status()