/Linux-v5.10/drivers/media/v4l2-core/ |
D | videobuf-dma-sg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * helper functions for SG DMA video4linux capture buffers 12 * Highly based on video-buf written originally by: 26 #include <linux/dma-mapping.h> 32 #include <media/videobuf-dma-sg.h> 47 MODULE_DESCRIPTION("helper module to manage video4linux dma sg buffers"); 53 printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg) 55 /* --------------------------------------------------------------------- */ 58 * Return a scatterlist for some page-aligned vmalloc()'ed memory 106 /* DMA to highmem pages might not work */ in videobuf_pages_to_sg() [all …]
|
D | videobuf-dma-contig.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 * Based on videobuf-vmalloc.c, 18 #include <linux/dma-mapping.h> 21 #include <media/videobuf-dma-contig.h> 38 struct videobuf_dma_contig_memory *mem, in __videobuf_dc_alloc() argument 41 mem->size = size; in __videobuf_dc_alloc() 42 mem->vaddr = dma_alloc_coherent(dev, mem->size, in __videobuf_dc_alloc() 43 &mem->dma_handle, flags); in __videobuf_dc_alloc() 45 if (!mem->vaddr) { in __videobuf_dc_alloc() 46 dev_err(dev, "memory alloc size %ld failed\n", mem->size); in __videobuf_dc_alloc() [all …]
|
/Linux-v5.10/drivers/infiniband/sw/rxe/ |
D | rxe_mr.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 27 int mem_check_range(struct rxe_mem *mem, u64 iova, size_t length) in mem_check_range() argument 29 switch (mem->type) { in mem_check_range() 35 if (iova < mem->iova || in mem_check_range() 36 length > mem->length || in mem_check_range() 37 iova > mem->iova + mem->length - length) in mem_check_range() 38 return -EFAULT; in mem_check_range() 42 return -EFAULT; in mem_check_range() 50 static void rxe_mem_init(int access, struct rxe_mem *mem) in rxe_mem_init() argument 52 u32 lkey = mem->pelem.index << 8 | rxe_get_key(); in rxe_mem_init() [all …]
|
/Linux-v5.10/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
D | mem.c | 23 #include "mem.h" 35 struct page **mem; member 38 dma_addr_t *dma; member 45 return nvkm_mem(memory)->target; in nvkm_mem_target() 57 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_addr() local 58 if (mem->pages == 1 && mem->mem) in nvkm_mem_addr() 59 return mem->dma[0]; in nvkm_mem_addr() 66 return nvkm_mem(memory)->pages << PAGE_SHIFT; in nvkm_mem_size() 73 struct nvkm_mem *mem = nvkm_mem(memory); in nvkm_mem_map_dma() local 75 .memory = &mem->memory, in nvkm_mem_map_dma() [all …]
|
/Linux-v5.10/kernel/dma/ |
D | coherent.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Coherent per-device memory handling. 10 #include <linux/dma-direct.h> 11 #include <linux/dma-map-ops.h> 27 if (dev && dev->dma_mem) in dev_get_coherent_memory() 28 return dev->dma_mem; in dev_get_coherent_memory() 33 struct dma_coherent_mem * mem) in dma_get_device_base() argument 35 if (mem->use_dev_dma_pfn_offset) in dma_get_device_base() 36 return phys_to_dma(dev, PFN_PHYS(mem->pfn_base)); in dma_get_device_base() 37 return mem->device_base; in dma_get_device_base() [all …]
|
/Linux-v5.10/drivers/net/ipa/ |
D | ipa_table.c | 1 // SPDX-License-Identifier: GPL-2.0 3 /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. 4 * Copyright (C) 2018-2020 Linaro Ltd. 15 #include <linux/dma-mapping.h> 31 * and routing rules. Each entry in these tables contains a 64-bit DMA 33 * A rule consists of a contiguous block of 32-bit values terminated with 42 * not all TX endpoints support filtering. The first 64-bit entry in a 44 * the table. The low-order bit (bit 0) in this bitmap represents a 47 * entry (i.e. a DMA address referring to a rule) for endpoint 0 in the 59 * ---------------------- [all …]
|
/Linux-v5.10/drivers/net/ethernet/huawei/hinic/ |
D | hinic_common.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 * hinic_cpu_to_be32 - convert data to big endian 32 bit format 20 u32 *mem = data; in hinic_cpu_to_be32() local 26 *mem = cpu_to_be32(*mem); in hinic_cpu_to_be32() 27 mem++; in hinic_cpu_to_be32() 32 * hinic_be32_to_cpu - convert data from big endian 32 bit format 38 u32 *mem = data; in hinic_be32_to_cpu() local 44 *mem = be32_to_cpu(*mem); in hinic_be32_to_cpu() 45 mem++; in hinic_be32_to_cpu() 50 * hinic_set_sge - set dma area in scatter gather entry [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/dma/ |
D | renesas,nbpfaxi.txt | 1 * Renesas "Type-AXI" NBPFAXI* DMA controllers 3 * DMA controller 7 - compatible: must be one of 17 - #dma-cells: must be 2: the first integer is a terminal number, to which this 26 - max-burst-mem-read: limit burst size for memory reads 29 - max-burst-mem-write: limit burst size for memory writes 32 If both max-burst-mem-read and max-burst-mem-write are set, DMA_MEM_TO_MEM 35 You can use dma-channels and dma-requests as described in dma.txt, although they 40 dma: dma-controller@48000000 { 51 #dma-cells = <2>; [all …]
|
D | arm-pl08x.txt | 1 * ARM PrimeCells PL080 and PL081 and derivatives DMA controller 4 - compatible: "arm,pl080", "arm,primecell"; 7 - arm,primecell-periphid: on the FTDMAC020 the primecell ID is not hard-coded 11 - reg: Address range of the PL08x registers 12 - interrupt: The PL08x interrupt number 13 - clocks: The clock running the IP core clock 14 - clock-names: Must contain "apb_pclk" 15 - lli-bus-interface-ahb1: if AHB master 1 is eligible for fetching LLIs 16 - lli-bus-interface-ahb2: if AHB master 2 is eligible for fetching LLIs 17 - mem-bus-interface-ahb1: if AHB master 1 is eligible for fetching memory contents [all …]
|
D | lpc1850-dmamux.txt | 1 NXP LPC18xx/43xx DMA MUX (DMA request router) 4 - compatible: "nxp,lpc1850-dmamux" 5 - reg: Memory map for accessing module 6 - #dma-cells: Should be set to <3>. 7 * 1st cell contain the master dma request signal 8 * 2nd cell contain the mux value (0-3) for the peripheral 11 - dma-requests: Number of DMA requests for the mux 12 - dma-masters: phandle pointing to the DMA controller 14 The DMA controller node need to have the following poroperties: 15 - dma-requests: Number of DMA requests the controller can handle [all …]
|
D | arm-pl330.txt | 1 * ARM PrimeCell PL330 DMA Controller 3 The ARM PrimeCell PL330 DMA controller can move blocks of memory contents 7 - compatible: should include both "arm,pl330" and "arm,primecell". 8 - reg: physical base address of the controller and length of memory mapped 10 - interrupts: interrupt number to the cpu. 13 - dma-coherent : Present if dma operations are coherent 14 - #dma-cells: must be <1>. used to represent the number of integer 16 - dma-channels: contains the total number of DMA channels supported by the DMAC 17 - dma-requests: contains the total number of DMA requests supported by the DMAC 18 - arm,pl330-broken-no-flushp: quirk for avoiding to execute DMAFLUSHP [all …]
|
/Linux-v5.10/drivers/pnp/ |
D | support.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * support.c - standard functions for the use of pnp protocol drivers 6 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 16 * pnp_is_active - Determines if a device is active based on its current 24 * only clears out auto-assigned resources. in pnp_is_active() 28 pnp_irq(dev, 0) == -1 && pnp_dma(dev, 0) == -1) in pnp_is_active() 45 * According to the specs, the first three characters are five-bit in pnp_eisa_id_to_string() 46 * compressed ASCII, and the left-over high order bit should be zero. in pnp_eisa_id_to_string() 52 str[0] = 'A' + ((id >> 26) & 0x3f) - 1; in pnp_eisa_id_to_string() 53 str[1] = 'A' + ((id >> 21) & 0x1f) - 1; in pnp_eisa_id_to_string() [all …]
|
D | resource.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * resource.c - Contains functions for registering and analyzing resource information 7 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 17 #include <asm/dma.h> 26 static int pnp_reserve_irq[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some IRQ */ 27 static int pnp_reserve_dma[8] = {[0 ... 7] = -1 }; /* reserve (don't use) some DMA */ 28 static int pnp_reserve_io[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some I/O region */ 29 static int pnp_reserve_mem[16] = {[0 ... 15] = -1 }; /* reserve (don't use) some memory region */ 44 option->flags = option_flags; in pnp_build_option() 45 option->type = type; in pnp_build_option() [all …]
|
D | interface.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * interface.c - contains everything related to the user interface 7 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 41 if (buffer->stop || buffer->error) in pnp_printf() 44 res = vsnprintf(buffer->curr, buffer->len - buffer->size, fmt, args); in pnp_printf() 46 if (buffer->size + res >= buffer->len) { in pnp_printf() 47 buffer->stop = 1; in pnp_printf() 50 buffer->curr += res; in pnp_printf() 51 buffer->size += res; in pnp_printf() 58 pnp_printf(buffer, "%sport %#llx-%#llx, align %#llx, size %#llx, " in pnp_print_port() [all …]
|
/Linux-v5.10/drivers/spi/ |
D | spi-mem.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <linux/spi/spi-mem.h> 18 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a 22 * @sgt: a pointer to a non-initialized sg_table that will be filled by this 25 * Some controllers might want to do DMA on the data buffer embedded in @op. 26 * This helper prepares everything for you and provides a ready-to-use 30 * op->data.buf.{in,out} is DMA-able before calling this function. 40 if (!op->data.nbytes) in spi_controller_dma_map_mem_op_data() 41 return -EINVAL; in spi_controller_dma_map_mem_op_data() 43 if (op->data.dir == SPI_MEM_DATA_OUT && ctlr->dma_tx) in spi_controller_dma_map_mem_op_data() [all …]
|
/Linux-v5.10/arch/mips/include/asm/sgi/ |
D | mc.h | 22 #define SGIMC_CCTRL0_EPERRMEM 0x00000040 /* Main mem parity error enable */ 32 #define SGIMC_CCTRL0_WRESETPMEM 0x00010000 /* Perform warm reset, preserves mem */ 33 #define SGIMC_CCTRL0_LENDIAN 0x00020000 /* Put MC in little-endian mode */ 34 #define SGIMC_CCTRL0_WRESETDMEM 0x00040000 /* Warm reset, destroys mem contents */ 35 #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000 /* Generate bad perr from cpu to mem */ 36 #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000 /* Don't chk parity on mem data reads */ 64 #define SGIMC_EEPROM_SDATAO 0x00000008 /* Serial EEPROM data-out */ 65 #define SGIMC_EEPROM_SDATAI 0x00000010 /* Serial EEPROM data-in */ 75 #define SGIMC_GIOPAR_HPC64 0x00000001 /* HPC talks to GIO using 64-bits */ 76 #define SGIMC_GIOPAR_GFX64 0x00000002 /* GFX talks to GIO using 64-bits */ [all …]
|
/Linux-v5.10/drivers/remoteproc/ |
D | remoteproc_core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * Ohad Ben-Cohen <ohad@wizery.com> 12 * Suman Anna <s-anna@ti.com> 25 #include <linux/dma-map-ops.h> 26 #include <linux/dma-mapping.h> 27 #include <linux/dma-direct.h> /* XXX: pokes into bus_dma_range */ 55 struct rproc_mem_entry *mem); 57 struct rproc_mem_entry *mem); 97 return -ENOSYS; in rproc_iommu_fault() 103 struct device *dev = rproc->dev.parent; in rproc_enable_iommu() [all …]
|
/Linux-v5.10/drivers/media/platform/mtk-vcodec/ |
D | mtk_vcodec_util.c | 1 // SPDX-License-Identifier: GPL-2.0 18 * That is, files under mtk-vcodec/. 32 return ctx->dev->reg_base[reg_idx]; in mtk_vcodec_get_reg_addr() 37 struct mtk_vcodec_mem *mem) in mtk_vcodec_mem_alloc() argument 39 unsigned long size = mem->size; in mtk_vcodec_mem_alloc() 41 struct device *dev = &ctx->dev->plat_dev->dev; in mtk_vcodec_mem_alloc() 43 mem->va = dma_alloc_coherent(dev, size, &mem->dma_addr, GFP_KERNEL); in mtk_vcodec_mem_alloc() 44 if (!mem->va) { in mtk_vcodec_mem_alloc() 47 return -ENOMEM; in mtk_vcodec_mem_alloc() 50 mtk_v4l2_debug(3, "[%d] - va = %p", ctx->id, mem->va); in mtk_vcodec_mem_alloc() [all …]
|
/Linux-v5.10/drivers/media/platform/vsp1/ |
D | vsp1_dl.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * vsp1_dl.c -- R-Car VSP1 Display List 11 #include <linux/dma-mapping.h> 41 * struct vsp1_dl_ext_header - Extended display list header 43 * @pre_ext_dl_num_cmd: number of pre-extended command bodies to parse 45 * @pre_ext_dl_plist: start address of pre-extended display list bodies 46 * @post_ext_dl_num_cmd: number of post-extended command bodies to parse 47 * @post_ext_dl_plist: start address of post-extended display list bodies 54 * expecting 32-bit accesses. The flags are appropriate to the whole 79 * struct vsp1_pre_ext_dl_body - Pre Extended Display List Body [all …]
|
/Linux-v5.10/drivers/media/platform/mtk-vcodec/vdec/ |
D | vdec_h264_if.c | 1 // SPDX-License-Identifier: GPL-2.0 36 * struct h264_fb - h264 decode frame buffer information 38 * @y_fb_dma : dma address of Y frame buffer (luma) 39 * @c_fb_dma : dma address of C frame buffer (chroma) 52 * struct h264_ring_fb_list - ring frame buffer list 68 * struct vdec_h264_dec_info - decode information 71 * @realloc_mv_buf : flag to notify driver to re-allocate mv buffer 73 * @bs_dma : Input bit-stream buffer dma address 74 * @y_fb_dma : Y frame buffer dma address 75 * @c_fb_dma : C frame buffer dma address [all …]
|
/Linux-v5.10/drivers/scsi/ |
D | sun3_scsi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Sun3 DMA routines added by Sam Creasey (sammy@sammy.net) 39 /* minimum number of bytes to do dma on */ 46 #define NCR5380_read(reg) in_8(hostdata->io + (reg)) 47 #define NCR5380_write(reg, value) out_8(hostdata->io + (reg), value) 61 /* dma regs start at regbase + 8, directly after the NCR regs */ 67 unsigned short udc_data; /* udc dma data reg (obio only) */ 68 unsigned short udc_addr; /* uda dma addr reg (obio only) */ 70 * holds extra byte on odd dma reads 80 /* ucd chip specific regs - live in dvma space */ [all …]
|
/Linux-v5.10/drivers/tty/serial/cpm_uart/ |
D | cpm_uart.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 27 #define IS_SMC(pinfo) (pinfo->flags & FLAG_SMC) 28 #define IS_DISCARDING(pinfo) (pinfo->flags & FLAG_DISCARDING) 115 u32 mem = (u32)pinfo->mem_addr; in cpu2cpm_addr() local 117 if (likely(val >= mem && val < mem + pinfo->mem_size)) { in cpu2cpm_addr() 118 offset = val - mem; in cpu2cpm_addr() 119 return pinfo->dma_addr + offset; in cpu2cpm_addr() 131 u32 dma = (u32)pinfo->dma_addr; in cpm2cpu_addr() local 133 if (likely(val >= dma && val < dma + pinfo->mem_size)) { in cpm2cpu_addr() 134 offset = val - dma; in cpm2cpu_addr() [all …]
|
/Linux-v5.10/drivers/pnp/pnpacpi/ |
D | rsparser.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * pnpacpi -- PnP ACPI driver 7 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P. 40 dev_err(&dev->dev, "can't encode invalid IRQ mode %#x\n", in decode_irq_flags() 76 dev_err(&dev->dev, "invalid DMA type %d\n", type); in dma_flags() 91 dev_err(&dev->dev, "invalid DMA transfer type %d\n", transfer); in dma_flags() 103 if (!(r->flags & IORESOURCE_DISABLED)) in pnpacpi_add_irqresource() 104 pcibios_penalize_isa_irq(r->start, 1); in pnpacpi_add_irqresource() 112 * marked as "consumer-only," but old versions of Windows and Linux ignore 113 * the producer/consumer flag, so HP invented a vendor-defined resource to [all …]
|
/Linux-v5.10/sound/soc/sh/rcar/ |
D | dma.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Renesas R-Car Audio DMAC support 43 } dma; member 52 #define rsnd_priv_to_dmac(p) ((struct rsnd_dma_ctrl *)(p)->dma) 54 #define rsnd_dma_to_dmaen(dma) (&(dma)->dma.en) argument 55 #define rsnd_dma_to_dmapp(dma) (&(dma)->dma.pp) argument 59 .name = "mem", 62 static struct rsnd_mod mem = { variable 100 struct rsnd_dma *dma = rsnd_mod_to_dma(mod); in rsnd_dmaen_stop() local 101 struct rsnd_dmaen *dmaen = rsnd_dma_to_dmaen(dma); in rsnd_dmaen_stop() [all …]
|
/Linux-v5.10/drivers/dma/ |
D | acpi-dma.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ACPI helpers for DMA request / controller 5 * Based on of-dma.c 13 #include <linux/dma-mapping.h> 29 * acpi_dma_parse_resource_group - match device and parse resource group 32 * @adma: struct acpi_dma of the given DMA controller 47 resource_size_t mem = 0, irq = 0; in acpi_dma_parse_resource_group() local 50 if (grp->shared_info_length != sizeof(struct acpi_csrt_shared_info)) in acpi_dma_parse_resource_group() 51 return -ENODEV; in acpi_dma_parse_resource_group() 59 if (resource_type(rentry->res) == IORESOURCE_MEM) in acpi_dma_parse_resource_group() [all …]
|