Lines Matching +full:ref +full:- +full:clk +full:- +full:src

5  * SPDX-License-Identifier: Apache-2.0
36 /* ref of the associated dma stream for this instance */
63 uint32_t src, uint32_t dst, size_t size);
99 if (dev_config->base == DT_REG_ADDR(DT_NODELABEL(dmamux1))) { in get_dma_fops()
105 if (dev_config->base == DT_REG_ADDR(DT_NODELABEL(dmamux2))) { in get_dma_fops()
110 __ASSERT(false, "Unknown dma base address %x", dev_config->base); in get_dma_fops()
118 const struct dmamux_stm32_config *dev_config = dev->config; in dmamux_stm32_configure()
125 int request_id = config->dma_slot; in dmamux_stm32_configure()
127 if (request_id > dev_config->req_nb + dev_config->gen_nb) { in dmamux_stm32_configure()
129 return -EINVAL; in dmamux_stm32_configure()
133 if (id >= dev_config->channel_nb) { in dmamux_stm32_configure()
135 return -EINVAL; in dmamux_stm32_configure()
149 if (dma_device->configure(dev_config->mux_channels[id].dev_dma, in dmamux_stm32_configure()
150 dev_config->mux_channels[id].dma_id, config) != 0) { in dmamux_stm32_configure()
152 return -EINVAL; in dmamux_stm32_configure()
157 (DMAMUX_Channel_TypeDef *)dev_config->base; in dmamux_stm32_configure()
167 const struct dmamux_stm32_config *dev_config = dev->config; in dmamux_stm32_start()
171 if (id >= dev_config->channel_nb) { in dmamux_stm32_start()
173 return -EINVAL; in dmamux_stm32_start()
176 if (dma_device->start(dev_config->mux_channels[id].dev_dma, in dmamux_stm32_start()
177 dev_config->mux_channels[id].dma_id) != 0) { in dmamux_stm32_start()
179 return -EINVAL; in dmamux_stm32_start()
187 const struct dmamux_stm32_config *dev_config = dev->config; in dmamux_stm32_stop()
191 if (id >= dev_config->channel_nb) { in dmamux_stm32_stop()
193 return -EINVAL; in dmamux_stm32_stop()
196 if (dma_device->stop(dev_config->mux_channels[id].dev_dma, in dmamux_stm32_stop()
197 dev_config->mux_channels[id].dma_id) != 0) { in dmamux_stm32_stop()
199 return -EINVAL; in dmamux_stm32_stop()
206 uint32_t src, uint32_t dst, size_t size) in dmamux_stm32_reload() argument
208 const struct dmamux_stm32_config *dev_config = dev->config; in dmamux_stm32_reload()
212 if (id >= dev_config->channel_nb) { in dmamux_stm32_reload()
214 return -EINVAL; in dmamux_stm32_reload()
217 if (dma_device->reload(dev_config->mux_channels[id].dev_dma, in dmamux_stm32_reload()
218 dev_config->mux_channels[id].dma_id, in dmamux_stm32_reload()
219 src, dst, size) != 0) { in dmamux_stm32_reload()
221 return -EINVAL; in dmamux_stm32_reload()
230 const struct dmamux_stm32_config *dev_config = dev->config; in dmamux_stm32_get_status()
234 if (id >= dev_config->channel_nb) { in dmamux_stm32_get_status()
236 return -EINVAL; in dmamux_stm32_get_status()
239 if (dma_device->get_status(dev_config->mux_channels[id].dev_dma, in dmamux_stm32_get_status()
240 dev_config->mux_channels[id].dma_id, stat) != 0) { in dmamux_stm32_get_status()
242 return -EINVAL; in dmamux_stm32_get_status()
250 const struct dmamux_stm32_config *config = dev->config; in dmamux_stm32_init()
252 const struct device *const clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE); in dmamux_stm32_init() local
254 if (!device_is_ready(clk)) { in dmamux_stm32_init()
256 return -ENODEV; in dmamux_stm32_init()
259 if (clock_control_on(clk, in dmamux_stm32_init()
260 (clock_control_subsys_t) &config->pclken) != 0) { in dmamux_stm32_init()
262 return -EIO; in dmamux_stm32_init()
268 if (config->base == DT_REG_ADDR(DT_NODELABEL(dmamux1))) { in dmamux_stm32_init()
272 return -ENODEV; in dmamux_stm32_init()
277 return -ENODEV; in dmamux_stm32_init()
284 if (config->base == DT_REG_ADDR(DT_NODELABEL(dmamux2))) { in dmamux_stm32_init()
286 return -ENODEV; in dmamux_stm32_init()
338 (mux_channel + 1) : (mux_channel - DMA_2_BEGIN_DMAMUX_CHANNEL + 1))