| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-4.19/drivers/media/v4l2-core/ |
| D | videobuf-dma-sg.c | 2 * helper functions for SG DMA video4linux capture buffers 11 * Highly based on video-buf written originally by: 28 #include <linux/dma-mapping.h> 35 #include <media/videobuf-dma-sg.h> 50 MODULE_DESCRIPTION("helper module to manage video4linux dma sg buffers"); 56 printk(KERN_DEBUG "vbuf-sg: " fmt , ## arg) 58 /* --------------------------------------------------------------------- */ 61 * Return a scatterlist for some page-aligned vmalloc()'ed memory 109 /* DMA to highmem pages might not work */ in videobuf_pages_to_sg() 112 min_t(size_t, PAGE_SIZE - offset, size), offset); in videobuf_pages_to_sg() [all …]
|
| D | videobuf-dma-contig.c | 9 * Based on videobuf-vmalloc.c, 21 #include <linux/dma-mapping.h> 24 #include <media/videobuf-dma-contig.h> 41 struct videobuf_dma_contig_memory *mem, in __videobuf_dc_alloc() argument 44 mem->size = size; in __videobuf_dc_alloc() 45 mem->vaddr = dma_alloc_coherent(dev, mem->size, in __videobuf_dc_alloc() 46 &mem->dma_handle, flags); in __videobuf_dc_alloc() 48 if (!mem->vaddr) { in __videobuf_dc_alloc() 49 dev_err(dev, "memory alloc size %ld failed\n", mem->size); in __videobuf_dc_alloc() 50 return -ENOMEM; in __videobuf_dc_alloc() [all …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-4.19/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 …]
|
| /kernel/linux/linux-4.19/drivers/infiniband/sw/rxe/ |
| D | rxe_mr.c | 15 * - Redistributions of source code must retain the above 19 * - Redistributions in binary form must reproduce the above 54 int mem_check_range(struct rxe_mem *mem, u64 iova, size_t length) in mem_check_range() argument 56 switch (mem->type) { in mem_check_range() 62 if (iova < mem->iova || in mem_check_range() 63 length > mem->length || in mem_check_range() 64 iova > mem->iova + mem->length - length) in mem_check_range() 65 return -EFAULT; in mem_check_range() 69 return -EFAULT; in mem_check_range() 77 static void rxe_mem_init(int access, struct rxe_mem *mem) in rxe_mem_init() argument [all …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-4.19/kernel/dma/ |
| D | coherent.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Coherent per-device memory handling. 10 #include <linux/dma-mapping.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 (mem->pfn_base - dev->dma_pfn_offset) << PAGE_SHIFT; in dma_get_device_base() 38 return mem->device_base; in dma_get_device_base() 43 struct dma_coherent_mem **mem) in dma_init_coherent_memory() argument [all …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/dma/ |
| D | 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 …]
|
| /kernel/linux/linux-4.19/drivers/net/ethernet/huawei/hinic/ |
| D | hinic_common.c | 23 * hinic_cpu_to_be32 - convert data to big endian 32 bit format 29 u32 *mem = data; in hinic_cpu_to_be32() local 35 *mem = cpu_to_be32(*mem); in hinic_cpu_to_be32() 36 mem++; in hinic_cpu_to_be32() 41 * hinic_be32_to_cpu - convert data from big endian 32 bit format 47 u32 *mem = data; in hinic_be32_to_cpu() local 53 *mem = be32_to_cpu(*mem); in hinic_be32_to_cpu() 54 mem++; in hinic_be32_to_cpu() 59 * hinic_set_sge - set dma area in scatter gather entry 61 * @addr: dma address [all …]
|
| /kernel/linux/linux-4.19/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 …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-4.19/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 …]
|
| /kernel/linux/linux-4.19/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 …]
|
| /kernel/linux/linux-4.19/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 …]
|
| /kernel/linux/linux-5.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 …]
|
| /kernel/linux/linux-5.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 …]
|