Home
last modified time | relevance | path

Searched +full:dma +full:- +full:mem (Results 1 – 25 of 1039) sorted by relevance

12345678910>>...42

/OK3568_Linux_fs/kernel/drivers/media/v4l2-core/
H A Dvideobuf-dma-sg.c1 // 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 …]
H A Dvideobuf-dma-contig.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/infiniband/sw/rxe/
H A Drxe_mr.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dmem.c23 #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 …]
/OK3568_Linux_fs/kernel/drivers/gpu/arm/mali400/mali/linux/
H A Dmali_memory_dma_buf.c2 * Copyright (C) 2012-2017 ARM Limited. All rights reserved.
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
13 #include <linux/dma-buf.h>
33 * Map DMA buf attachment \a mem into \a session at virtual address \a virt.
38 struct mali_dma_buf_attachment *mem; in mali_dma_buf_map() local
48 alloc = mem_backend->mali_allocation; in mali_dma_buf_map()
51 mem = mem_backend->dma_buf.attachment; in mali_dma_buf_map()
52 MALI_DEBUG_ASSERT_POINTER(mem); in mali_dma_buf_map()
54 session = alloc->session; in mali_dma_buf_map()
56 MALI_DEBUG_ASSERT(mem->session == session); in mali_dma_buf_map()
[all …]
H A Dmali_memory_secure.c2 * Copyright (C) 2010-2017 ARM Limited. All rights reserved.
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #include <linux/dma-mapping.h>
17 #include <linux/dma-buf.h>
18 #include <linux/dma-direct.h>
25 /* get dma buffer */ in mali_mem_secure_attach_dma_buf()
28 MALI_DEBUG_PRINT_ERROR(("Failed to get dma buf!\n")); in mali_mem_secure_attach_dma_buf()
32 if (size != buf->size) { in mali_mem_secure_attach_dma_buf()
33 MALI_DEBUG_PRINT_ERROR(("The secure mem size not match to the dma buf size!\n")); in mali_mem_secure_attach_dma_buf()
37 secure_mem->buf = buf; in mali_mem_secure_attach_dma_buf()
[all …]
/OK3568_Linux_fs/kernel/kernel/dma/
H A Dcoherent.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/net/ipa/
H A Dipa_table.c1 // 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>
30 * The IPA has tables defined in its local (IPA-resident) memory that define
32 * endian 64-bit "slot" that holds the address of a rule definition. (The
33 * size of these slots is 64 bits regardless of the host DMA address size.)
41 * an object (such as a route or filter table) in IPA-resident memory must
42 * 128-byte aligned. An object in system memory (such as a route or filter
43 * rule) must be at an 8-byte aligned address. We currently only place
[all …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/dma/
H A Drenesas,nbpfaxi.txt1 * 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 …]
H A Darm-pl08x.txt1 * 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 …]
H A Darm-pl330.txt1 * 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 …]
H A Dlpc1850-dmamux.txt1 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 …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/huawei/hinic/
H A Dhinic_common.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/pnp/
H A Dsupport.c1 // 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 …]
H A Dresource.c1 // 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 …]
H A Dinterface.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/remoteproc/
H A Dremoteproc_core.c1 // 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 */
56 struct rproc_mem_entry *mem);
58 struct rproc_mem_entry *mem);
99 return -ENOSYS; in rproc_iommu_fault()
105 struct device *dev = rproc->dev.parent; in rproc_enable_iommu()
[all …]
/OK3568_Linux_fs/kernel/arch/mips/include/asm/sgi/
H A Dmc.h22 #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 …]
/OK3568_Linux_fs/kernel/drivers/spi/
H A Dspi-mem.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/media/platform/vsp1/
H A Dvsp1_dl.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/stmicro/stmmac/
H A Dstmmac_uio.c1 // SPDX-License-Identifier: GPL-2.0
25 #include <linux/dma-mapping.h>
91 pfn = (info->mem[vma->vm_pgoff].addr) >> PAGE_SHIFT; in rockchip_gmac_uio_mmap()
93 if (vma->vm_pgoff) in rockchip_gmac_uio_mmap()
94 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); in rockchip_gmac_uio_mmap()
96 vma->vm_page_prot = pgprot_device(vma->vm_page_prot); in rockchip_gmac_uio_mmap()
98 ret = remap_pfn_range(vma, vma->vm_start, pfn, in rockchip_gmac_uio_mmap()
99 vma->vm_end - vma->vm_start, vma->vm_page_prot); in rockchip_gmac_uio_mmap()
108 * uio_free_dma_rx_desc_resources - free RX dma desc resources
113 u32 rx_count = priv->plat->rx_queues_to_use; in uio_free_dma_rx_desc_resources()
[all …]
/OK3568_Linux_fs/kernel/drivers/scsi/
H A Dsun3_scsi.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/pnp/pnpacpi/
H A Drsparser.c1 // 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 …]
/OK3568_Linux_fs/kernel/sound/soc/sh/rcar/
H A Ddma.c1 // 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 …]
/OK3568_Linux_fs/kernel/drivers/media/platform/mtk-vcodec/vdec/
H A Dvdec_h264_if.c1 // 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 …]

12345678910>>...42