Home
last modified time | relevance | path

Searched +full:dma +full:- +full:min +full:- +full:transfer +full:- +full:size (Results 1 – 25 of 42) sorted by relevance

12

/Zephyr-latest/dts/bindings/usb/
Drenesas,smartbond-usbd.yaml2 # SPDX-License-Identifier: Apache-2.0
6 compatible: "renesas,smartbond-usbd"
8 include: usb-ep.yaml
11 dma-min-transfer-size:
14 Minimum transfer size required to engage DMA.
16 ep-out-buf-size:
20 Buffer size for OUT end points 0-3.
22 fifo-read-threshold:
25 RX FIFO is 64 bytes. When endpoint size is greater then 64,
40 iso-out-mps:
[all …]
/Zephyr-latest/drivers/dma/
Ddma_mcux_lpc.c2 * Copyright (c) 2020-2023 NXP
4 * SPDX-License-Identifier: Apache-2.0
8 * @brief Common part of DMA drivers for some NXP SoC.
13 #include <zephyr/drivers/dma.h>
21 #include <zephyr/drivers/dma/dma_mcux_lpc.h>
71 ((DMA_Type *)((const struct dma_mcux_lpc_config *const)(dev)->config)->base)
74 ((struct channel_data *)(&(((struct dma_mcux_lpc_dma_data *)dev->data)->channel_data[ch])))
77 ((dma_handle_t *)(&(DEV_CHANNEL_DATA(dev, ch)->dma_handle)))
79 #define EMPTY_OTRIG -1
84 int ret = -EIO; in nxp_lpc_dma_callback()
[all …]
Ddma_smartbond.c4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/drivers/dma.h>
16 #include <zephyr/drivers/dma/dma_smartbond.h>
28 #define DMA_CHANNELS_COUNT DT_PROP(DT_NODELABEL(dma), dma_channels)
29 #define DMA_BLOCK_COUNT DT_PROP(DT_NODELABEL(dma), block_count)
40 #define DMA_CHN2REG(_idx) (&((struct channel_regs *)DMA)[(_idx)])
45 DMA->DMA_REQ_MUX_REG = \
46 (DMA->DMA_REQ_MUX_REG & ~(0xf << DMA_MUX_SHIFT((_idx)))) | \
50 ((DMA->DMA_REQ_MUX_REG >> DMA_MUX_SHIFT((_idx))) & 0xf)
58 * DMA channel priority level. The smaller the value the lower the priority granted to a channel
[all …]
Ddma_emul.c4 * SPDX-License-Identifier: Apache-2.0
12 #include <zephyr/drivers/dma.h>
55 /* points to an array of size num_channels */
57 /* points to an array of size num_channels * num_requests */
98 * Note: these must be called with data->lock locked!
103 const struct dma_emul_config *config = dev->config; in dma_emul_get_channel_state()
105 __ASSERT_NO_MSG(channel < config->num_channels); in dma_emul_get_channel_state()
107 return (enum dma_emul_channel_state)config->xfer[channel].config._reserved; in dma_emul_get_channel_state()
113 const struct dma_emul_config *config = dev->config; in dma_emul_set_channel_state()
117 __ASSERT_NO_MSG(channel < config->num_channels); in dma_emul_set_channel_state()
[all …]
Ddma_iproc_pax_v2.c4 * SPDX-License-Identifier: Apache-2.0
19 #include <zephyr/drivers/dma.h>
28 /* Driver runtime data for PAX DMA and RM */
36 return ring->pkt_id = 0x0; in reset_pkt_id()
41 ring->pkt_id = (ring->pkt_id + 1) % 32; in alloc_pkt_id()
42 return ring->pkt_id; in alloc_pkt_id()
47 return ring->pkt_id; in curr_pkt_id()
52 return ring->curr.toggle; in curr_toggle_val()
64 r->opq = opq; in rm_write_header_desc()
65 r->bdf = 0x0; in rm_write_header_desc()
[all …]
/Zephyr-latest/drivers/mipi_dbi/
Dmipi_dbi_nxp_lcdic.c4 * SPDX-License-Identifier: Apache-2.0
13 #include <zephyr/drivers/dma.h>
16 #include <zephyr/drivers/dma/dma_mcux_lpc.h>
43 /* Limit imposed by size of data length field in LCDIC command */
101 /* Tracks number of bytes remaining in transfer */
103 /* Tracks start of transfer buffer */
153 const struct mipi_dbi_lcdic_config *config = dev->config; in mipi_dbi_lcdic_reset_state()
154 LCDIC_Type *base = config->base; in mipi_dbi_lcdic_reset_state()
156 base->CTRL &= ~LCDIC_CTRL_LCDIC_EN_MASK; in mipi_dbi_lcdic_reset_state()
158 base->CTRL |= LCDIC_CTRL_LCDIC_EN_MASK; in mipi_dbi_lcdic_reset_state()
[all …]
/Zephyr-latest/drivers/spi/
Dspi_mcux_lpspi.c4 * SPDX-License-Identifier: Apache-2.0
36 #define DEV_CFG(_dev) ((const struct spi_mcux_config *)(_dev)->config)
37 #define DEV_DATA(_dev) ((struct spi_mcux_data *)(_dev)->data)
47 #include <zephyr/drivers/dma.h>
57 uint32_t channel; /* stores the channel for dma */
97 struct spi_mcux_data *data = dev->data; in spi_mcux_isr()
100 LPSPI_MasterTransferHandleIRQ(LPSPI_IRQ_HANDLE_ARG, &data->handle); in spi_mcux_isr()
108 spi_context_update_tx(&data->ctx, 1, data->transfer_len); in spi_mcux_master_callback()
109 spi_context_update_rx(&data->ctx, 1, data->transfer_len); in spi_mcux_master_callback()
111 spi_mcux_transfer_next_packet(data->dev); in spi_mcux_master_callback()
[all …]
Dspi_mcux_flexcomm.c5 * SPDX-License-Identifier: Apache-2.0
17 #include <zephyr/drivers/dma.h>
54 uint32_t channel; /* stores the channel for dma */
79 const struct spi_mcux_config *config = dev->config; in spi_mcux_transfer_next_packet()
80 struct spi_mcux_data *data = dev->data; in spi_mcux_transfer_next_packet()
81 SPI_Type *base = config->base; in spi_mcux_transfer_next_packet()
82 struct spi_context *ctx = &data->ctx; in spi_mcux_transfer_next_packet()
83 spi_transfer_t transfer; in spi_mcux_transfer_next_packet() local
86 if ((ctx->tx_len == 0) && (ctx->rx_len == 0)) { in spi_mcux_transfer_next_packet()
88 spi_context_cs_control(&data->ctx, false); in spi_mcux_transfer_next_packet()
[all …]
Dspi_renesas_ra.c3 * SPDX-License-Identifier: Apache-2.0
59 struct device *dev = (struct device *)p_args->p_context; in spi_cb()
60 struct ra_spi_data *data = dev->data; in spi_cb()
62 switch (p_args->event) { in spi_cb()
64 spi_context_cs_control(&data->ctx, false); in spi_cb()
65 spi_context_complete(&data->ctx, dev, 0); in spi_cb()
73 spi_context_cs_control(&data->ctx, false); in spi_cb()
74 spi_context_complete(&data->ctx, dev, -EIO); in spi_cb()
83 struct ra_spi_data *data = dev->data; in ra_spi_configure()
86 if (spi_context_configured(&data->ctx, config)) { in ra_spi_configure()
[all …]
Dspi_b_renesas_ra8.c4 * SPDX-License-Identifier: Apache-2.0
63 struct device *dev = (struct device *)p_args->p_context; in spi_cb()
64 struct ra_spi_data *data = dev->data; in spi_cb()
66 switch (p_args->event) { in spi_cb()
68 spi_context_cs_control(&data->ctx, false); in spi_cb()
69 spi_context_complete(&data->ctx, dev, 0); in spi_cb()
77 spi_context_cs_control(&data->ctx, false); in spi_cb()
78 spi_context_complete(&data->ctx, dev, -EIO); in spi_cb()
87 struct ra_spi_data *data = dev->data; in ra_spi_b_configure()
90 if (spi_context_configured(&data->ctx, config)) { in ra_spi_b_configure()
[all …]
Dspi_pl022.c4 * SPDX-License-Identifier: Apache-2.0
22 #include <zephyr/drivers/dma.h>
64 /* Data size select */
206 * DMA Control Register
213 /* Receive DMA Enable bit */
215 /* Transmit DMA Enable bit */
293 const struct spi_pl022_dma_config dma[NUM_OF_DIRECTION]; member
303 struct spi_pl022_dma_data dma[NUM_OF_DIRECTION]; member
333 for (postdiv = SCR_MAX + 1; postdiv > SCR_MIN + 1; --postdiv) { in spi_pl022_calc_postdiv()
334 if (pclk / (prescale * (postdiv - 1)) > baud) { in spi_pl022_calc_postdiv()
[all …]
/Zephyr-latest/drivers/flash/
Dflash_stm32_ospi.c5 * SPDX-License-Identifier: Apache-2.0
20 #include <zephyr/dt-bindings/flash_controller/ospi.h>
52 #include <zephyr/drivers/dma/dma_stm32.h>
53 #include <zephyr/drivers/dma.h>
95 /* Lookup table to set dma priority from the DTS */
115 /* Lookup table to set dma priority from the DTS */
181 struct stream dma; member
187 struct flash_stm32_ospi_data *dev_data = dev->data; in ospi_lock_thread()
189 k_sem_take(&dev_data->sem, K_FOREVER); in ospi_lock_thread()
194 struct flash_stm32_ospi_data *dev_data = dev->data; in ospi_unlock_thread()
[all …]
Dflash_stm32_xspi.c4 * SPDX-License-Identifier: Apache-2.0
23 #include <zephyr/dt-bindings/flash_controller/xspi.h>
50 #include <zephyr/drivers/dma/dma_stm32.h>
51 #include <zephyr/drivers/dma.h>
59 struct flash_stm32_xspi_data *dev_data = dev->data; in xspi_lock_thread()
61 k_sem_take(&dev_data->sem, K_FOREVER); in xspi_lock_thread()
66 struct flash_stm32_xspi_data *dev_data = dev->data; in xspi_unlock_thread()
68 k_sem_give(&dev_data->sem); in xspi_unlock_thread()
73 struct flash_stm32_xspi_data *dev_data = dev->data; in xspi_send_cmd()
76 LOG_DBG("Instruction 0x%x", cmd->Instruction); in xspi_send_cmd()
[all …]
Dflash_stm32_qspi.c6 * SPDX-License-Identifier: Apache-2.0
23 #include <zephyr/drivers/dma.h>
24 #include <zephyr/drivers/dma/dma_stm32.h>
58 /* In dual-flash mode, total size is twice the size of one flash component */
74 /* Lookup table to set dma priority from the DTS */
120 struct stream dma; member
125 * If set addressed operations should use 32-bit rather than
126 * 24-bit addresses.
138 struct flash_stm32_qspi_data *dev_data = dev->data; in qspi_lock_thread()
140 k_sem_take(&dev_data->sem, K_FOREVER); in qspi_lock_thread()
[all …]
/Zephyr-latest/dts/arm/renesas/smartbond/
Dda1469x.dtsi3 * SPDX-License-Identifier: Apache-2.0
6 #include <arm/armv8-m.dtsi>
9 #include <zephyr/dt-bindings/gpio/gpio.h>
10 #include <zephyr/dt-bindings/adc/smartbond-adc.h>
11 #include <zephyr/dt-bindings/pinctrl/smartbond-pinctrl.h>
12 #include <zephyr/dt-bindings/dma/dma_smartbond.h>
17 zephyr,flash-controller = &flash_controller;
21 compatible = "zephyr,lvgl-pointer-input";
25 #address-cells = <1>;
26 #size-cells = <0>;
[all …]
/Zephyr-latest/drivers/mipi_dsi/
Ddsi_mcux_2l.c4 * SPDX-License-Identifier: Apache-2.0
15 #include <zephyr/drivers/dma.h>
16 #include <zephyr/drivers/dma/dma_mcux_smartdma.h>
66 /* Callback for DSI DMA transfer completion, called in ISR context */
71 const struct mcux_mipi_dsi_config *config = dev->config; in dsi_mcux_dma_cb()
72 struct mcux_mipi_dsi_data *data = dev->data; in dsi_mcux_dma_cb()
76 LOG_ERR("SMARTDMA transfer failed"); in dsi_mcux_dma_cb()
78 /* Disable DSI interrupts at transfer completion */ in dsi_mcux_dma_cb()
79 DSI_DisableInterrupts(config->base, kDSI_InterruptGroup1ApbTxDone | in dsi_mcux_dma_cb()
81 DSI_GetAndClearInterruptStatus(config->base, &int_flags1, &int_flags2); in dsi_mcux_dma_cb()
[all …]
/Zephyr-latest/dts/riscv/andes/
Dandes_v5_ae350.dtsi4 * SPDX-License-Identifier: Apache-2.0
7 /dts-v1/;
8 #include <zephyr/dt-bindings/gpio/gpio.h>
12 #address-cells = <1>;
13 #size-cells = <1>;
16 #address-cells = <1>;
17 #size-cells = <0>;
19 compatible = "andestech,andescore-v5", "riscv";
24 mmu-type = "riscv,sv32";
25 clock-frequency = <60000000>;
[all …]
/Zephyr-latest/drivers/usb/device/
Dusb_dc_smartbond.c4 * SPDX-License-Identifier: Apache-2.0
32 #include <zephyr/drivers/dma.h>
45 * Minimal transfer size needed to use DMA. For short transfers
47 * of programming DMA registers.
52 /* Size of hardware RX and TX FIFO. */
106 (struct smartbond_ep_reg_set *)&USB->USB_EPC0_REG,
107 (struct smartbond_ep_reg_set *)&USB->USB_EPC1_REG,
108 (struct smartbond_ep_reg_set *)&USB->USB_EPC3_REG,
109 (struct smartbond_ep_reg_set *)&USB->USB_EPC5_REG,
115 uint16_t total_len; /** Total length of current transfer */
[all …]
Dusb_dc_numaker.c4 * SPDX-License-Identifier: Apache-2.0
11 #include <zephyr/dt-bindings/usb/usb.h>
39 /* Reserve DMA buffer for Setup/CTRL OUT/CTRL IN, required to be 8-byte aligned */
45 * This is to static-allocate EP contexts which can accommodate all instances.
97 /* EP DMA buffer */
102 /* On USBD, no H/W FIFO. Simulate based on above DMA buffer with
103 * one-shot implementation
131 * Allocate-only, and de-allocate all on re-initialize in usb_dc_attach().
135 /* DMA buffer management
137 * Allocate-only, and de-allocate all on re-initialize in usb_dc_attach().
[all …]
/Zephyr-latest/drivers/usb/udc/
Dudc_numaker.c4 * SPDX-License-Identifier: Apache-2.0
40 /* Reserve DMA buffer for Setup/CTRL OUT/CTRL IN, required to be 8-byte aligned */
52 /* Re-activate queued transfer for specific EP */
88 /* EP DMA buffer */
132 * Allocate-only, and de-allocate all on re-initialize in udc_numaker_init().
136 /* DMA buffer management
138 * Allocate-only, and de-allocate all on re-initialize in udc_numaker_init().
158 * net_buf can over-allocate for UDC_BUF_GRANULARITY requirement
167 const struct udc_numaker_config *config = dev->config; in numaker_usbd_sw_connect()
168 USBD_T *const base = config->base; in numaker_usbd_sw_connect()
[all …]
Dudc_dwc2.c4 * SPDX-License-Identifier: Apache-2.0
28 /* Trigger next transfer, must not be used for control OUT */
44 /* Minimum RX FIFO size in 32-bit words considering the largest used OUT packet
49 /* Default Rx FIFO size in 32-bit words calculated to support High-Speed with:
50 * * 1 control endpoint in Completer/Buffer DMA mode: 13 locations
57 /* TX FIFO0 depth in 32-bit words (used by control IN endpoint)
105 /* Transfer triggers (IN on bits 0-15, OUT on bits 16-31) */
107 /* Finished transactions (IN on bits 0-15, OUT on bits 16-31) */
143 const struct udc_dwc2_config *const config = dev->config; in dwc2_init_pinctrl()
144 const struct pinctrl_dev_config *const pcfg = config->pcfg; in dwc2_init_pinctrl()
[all …]
Dudc_smartbond.c4 * SPDX-License-Identifier: Apache-2.0
19 #include <zephyr/drivers/dma.h>
30 /* Size of hardware RX and TX FIFO. */
39 #define REG_GET_BIT(reg, field) (USB->reg & USB_##reg##_##field##_Msk)
40 #define REG_SET_BIT(reg, field) (USB->reg |= USB_##reg##_##field##_Msk)
41 #define REG_CLR_BIT(reg, field) (USB->reg &= ~USB_##reg##_##field##_Msk)
43 (USB->reg = (USB->reg & ~USB_##reg##_##field##_Msk) | (val << USB_##reg##_##field##_Pos))
92 /** Packet size sent or received so far. It is used to modify transferred field
93 * after ACK is received or when filling ISO endpoint with size larger then
94 * FIFO size.
[all …]
/Zephyr-latest/drivers/i2c/
Di2c_dw.c1 /* dw_i2c.c - I2C file for Design Ware */
5 * Copyright (c) 2022 Andrei-Edward Popa
7 * SPDX-License-Identifier: Apache-2.0
34 #include <zephyr/drivers/dma.h>
35 #include <zephyr/drivers/dma/dma_intel_lpss.h>
49 #include "i2c-priv.h"
73 void cb_i2c_idma_transfer(const struct device *dma, void *user_data, uint32_t channel, int status) in cb_i2c_idma_transfer() argument
76 const struct i2c_dw_rom_config *const rom = dev->config; in cb_i2c_idma_transfer()
77 struct i2c_dw_dev_config *const dw = dev->data; in cb_i2c_idma_transfer()
79 dma_stop(rom->dma_dev, channel); in cb_i2c_idma_transfer()
[all …]
/Zephyr-latest/soc/intel/intel_adsp/tools/
Dcavstool.py3 # SPDX-License-Identifier: Apache-2.0
19 log = logging.getLogger("cavs-fw")
23 HUGEPAGE_FILE = "/dev/hugepages/cavs-fw-dma.tmp."
28 # Window 1 is the IPC "inbox" (host-writable memory, just 384 bytes currently)
30 # Window 3 is winstream-formatted log output
43 # pylint: disable=duplicate-code
106 self.regs.LVI = self.n_bufs - 1
113 bufl = min(len(data), self.buf_len)
136 log.info(f"Mapped 2M huge page at 0x{phys_addr:x} for buf size ({buf_len})")
155 log.info("Filled the buffer descriptor list (BDL) for DMA.")
[all …]
/Zephyr-latest/drivers/i3c/
Di3c_stm32.c4 * SPDX-License-Identifier: Apache-2.0
15 #include <zephyr/drivers/dma/dma_stm32.h>
16 #include <zephyr/drivers/dma.h>
107 size_t xfer_offset; /* Current message transfer offset */
133 size_t ccc_target_idx; /* Current target index, used for filling C-FIFO */
140 struct i3c_stm32_dma_stream dma_rx; /* RX DMA channel config */
141 struct i3c_stm32_dma_stream dma_tx; /* TX DMA channel config */
142 struct i3c_stm32_dma_stream dma_tc; /* Control FIFO DMA channel config */
143 struct i3c_stm32_dma_stream dma_rs; /* Status FIFO DMA channel config */
146 size_t fifo_len; /* The size in bytes for the allocated region for each FIFO */
[all …]

12