| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/dma/ |
| D | ti-dma-crossbar.txt | 1 Texas Instruments DMA Crossbar (DMA request router) 4 - compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar 5 "ti,am335x-edma-crossbar" for AM335x and AM437x 6 - reg: Memory map for accessing module 7 - #dma-cells: Should be set to match with the DMA controller's dma-cells 8 for ti,dra7-dma-crossbar and <3> for ti,am335x-edma-crossbar. 9 - dma-requests: Number of DMA requests the crossbar can receive 10 - dma-masters: phandle pointing to the DMA controller 12 The DMA controller node need to have the following poroperties: 13 - dma-requests: Number of DMA requests the controller can handle [all …]
|
| D | dma-router.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/dma/dma-router.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: DMA Router Common Properties 10 - Vinod Koul <vkoul@kernel.org> 13 - $ref: dma-common.yaml# 16 DMA routers are transparent IP blocks used to route DMA request 17 lines from devices to the DMA controller. Some SoCs (like TI DRA7x) 18 have more peripherals integrated with DMA requests than what the DMA [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/dma/ |
| D | ti-dma-crossbar.txt | 1 Texas Instruments DMA Crossbar (DMA request router) 4 - compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar 5 "ti,am335x-edma-crossbar" for AM335x and AM437x 6 - reg: Memory map for accessing module 7 - #dma-cells: Should be set to to match with the DMA controller's dma-cells 8 for ti,dra7-dma-crossbar and <3> for ti,am335x-edma-crossbar. 9 - dma-requests: Number of DMA requests the crossbar can receive 10 - dma-masters: phandle pointing to the DMA controller 12 The DMA controller node need to have the following poroperties: 13 - dma-requests: Number of DMA requests the controller can handle [all …]
|
| D | dma-router.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/dma/dma-router.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: DMA Router Generic Binding 10 - Vinod Koul <vkoul@kernel.org> 13 - $ref: "dma-common.yaml#" 16 DMA routers are transparent IP blocks used to route DMA request 17 lines from devices to the DMA controller. Some SoCs (like TI DRA7x) 18 have more peripherals integrated with DMA requests than what the DMA [all …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | genalloc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * kmalloc/kfree interface. Uses for this includes on-device special 8 * It is safe to use the allocator in NMI handlers and other special 21 * On architectures that don't have NMI-safe cmpxchg implementation, 26 * Copyright 2005 (C) Jes Sorensen <jes@trained-monkey.org> 40 return chunk->end_addr - chunk->start_addr + 1; in chunk_size() 51 return -EBUSY; in set_bits_ll() 66 return -EBUSY; in clear_bits_ll() 74 * bitmap_set_ll - set the specified number of bits at the specified position 75 * @map: pointer to a bitmap [all …]
|
| /kernel/linux/linux-6.6/lib/ |
| D | genalloc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * kmalloc/kfree interface. Uses for this includes on-device special 8 * It is safe to use the allocator in NMI handlers and other special 21 * On architectures that don't have NMI-safe cmpxchg implementation, 26 * Copyright 2005 (C) Jes Sorensen <jes@trained-monkey.org> 42 return chunk->end_addr - chunk->start_addr + 1; in chunk_size() 52 return -EBUSY; in set_bits_ll() 66 return -EBUSY; in clear_bits_ll() 74 * bitmap_set_ll - set the specified number of bits at the specified position 75 * @map: pointer to a bitmap [all …]
|
| /kernel/linux/linux-5.10/arch/arm/common/ |
| D | dmabounce.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Special dma_{map/unmap/dma_sync}_* routines for systems that have 6 * limited DMA windows. These functions utilize bounce buffers to 7 * copy data to/from buffers located outside the DMA region. This 8 * only works for systems in which DMA memory is at the bottom of 9 * RAM, the remainder of memory is at the top and the DMA memory 11 * DMA windows will require custom implementations that reserve memory 15 * Re-written by Christopher Hoover <ch@murgatroid.com> 25 #include <linux/page-flags.h> 27 #include <linux/dma-direct.h> [all …]
|
| /kernel/linux/linux-5.10/include/linux/ |
| D | genalloc.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * kmalloc/kfree interface. Uses for this includes on-device special 8 * It is safe to use the allocator in NMI handlers and other special 21 * On architectures that don't have NMI-safe cmpxchg implementation, 41 * @map: Pointer to bitmap 48 typedef unsigned long (*genpool_algo_t)(unsigned long *map, 108 * gen_pool_add - add a new chunk of special memory to the pool 113 * allocated on, or -1 117 * Returns 0 on success or a -ve errno on failure. 122 return gen_pool_add_virt(pool, addr, -1, size, nid); in gen_pool_add() [all …]
|
| D | dma-mapping.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 9 #include <linux/dma-direction.h> 15 * List of possible attributes associated with a DMA mapping. The semantics 16 * of each attribute should be defined in Documentation/core-api/dma-attributes.rst. 46 * DMA_ATTR_ALLOC_SINGLE_PAGES: This is a hint to the DMA-mapping subsystem 52 * DMA_ATTR_NO_WARN: This tells the DMA-mapping subsystem to suppress 60 * at least read-only at lesser-privileged levels). 65 * A dma_addr_t can hold any valid DMA or bus address for the platform. It can 66 * be given to a device to use as a DMA source or target. It is specific to a 76 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) [all …]
|
| /kernel/linux/linux-6.6/include/linux/ |
| D | genalloc.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * kmalloc/kfree interface. Uses for this includes on-device special 8 * It is safe to use the allocator in NMI handlers and other special 21 * On architectures that don't have NMI-safe cmpxchg implementation, 41 * @map: Pointer to bitmap 48 typedef unsigned long (*genpool_algo_t)(unsigned long *map, 108 * gen_pool_add - add a new chunk of special memory to the pool 113 * allocated on, or -1 117 * Returns 0 on success or a -ve errno on failure. 122 return gen_pool_add_virt(pool, addr, -1, size, nid); in gen_pool_add() [all …]
|
| D | dma-map-ops.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 4 * It should not be included in drivers just using the DMA API. 9 #include <linux/dma-mapping.h> 88 #include <asm/dma-mapping.h> 92 if (dev->dma_ops) in get_dma_ops() 93 return dev->dma_ops; in get_dma_ops() 100 dev->dma_ops = dma_ops; in set_dma_ops() 118 if (dev && dev->cma_area) in dev_get_cma_area() 119 return dev->cma_area; in dev_get_cma_area() 147 return -ENOSYS; in dma_contiguous_reserve_area() [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/usb/ |
| D | dma.rst | 1 USB DMA 5 over how DMA may be used to perform I/O operations. The APIs are detailed 11 The big picture is that USB drivers can continue to ignore most DMA issues, 12 though they still must provide DMA-ready buffers (see 13 :doc:`/core-api/dma-api-howto`). That's how they've worked through 14 the 2.4 (and earlier) kernels, or they can now be DMA-aware. 16 DMA-aware usb drivers: 18 - New calls enable DMA-aware drivers, letting them allocate dma buffers and 19 manage dma mappings for existing dma-ready buffers (see below). 21 - URBs have an additional "transfer_dma" field, as well as a transfer_flags [all …]
|
| /kernel/linux/linux-6.6/Documentation/driver-api/usb/ |
| D | dma.rst | 1 USB DMA 5 over how DMA may be used to perform I/O operations. The APIs are detailed 11 The big picture is that USB drivers can continue to ignore most DMA issues, 12 though they still must provide DMA-ready buffers (see 13 Documentation/core-api/dma-api-howto.rst). That's how they've worked through 14 the 2.4 (and earlier) kernels, or they can now be DMA-aware. 16 DMA-aware usb drivers: 18 - New calls enable DMA-aware drivers, letting them allocate dma buffers and 19 manage dma mappings for existing dma-ready buffers (see below). 21 - URBs have an additional "transfer_dma" field, as well as a transfer_flags [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/i915/ |
| D | i915_mm.c | 26 #include <linux/io-mapping.h> 41 #define use_dma(io) ((io) != -1) 45 if (use_dma(r->iobase)) in sgt_pfn() 46 return (r->sgt.dma + r->sgt.curr + r->iobase) >> PAGE_SHIFT; in sgt_pfn() 48 return r->sgt.pfn + (r->sgt.curr >> PAGE_SHIFT); in sgt_pfn() 55 if (GEM_WARN_ON(!r->sgt.sgp)) in remap_sg() 56 return -EINVAL; in remap_sg() 59 set_pte_at(r->mm, addr, pte, in remap_sg() 60 pte_mkspecial(pfn_pte(sgt_pfn(r), r->prot))); in remap_sg() 61 r->pfn++; /* track insertions in case we need to unwind later */ in remap_sg() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/i915/ |
| D | i915_mm.c | 26 #include <linux/io-mapping.h> 45 set_pte_at(r->mm, addr, pte, pte_mkspecial(pfn_pte(r->pfn, r->prot))); in remap_pfn() 46 r->pfn++; in remap_pfn() 51 #define use_dma(io) ((io) != -1) 55 if (use_dma(r->iobase)) in sgt_pfn() 56 return (r->sgt.dma + r->sgt.curr + r->iobase) >> PAGE_SHIFT; in sgt_pfn() 58 return r->sgt.pfn + (r->sgt.curr >> PAGE_SHIFT); in sgt_pfn() 65 if (GEM_WARN_ON(!r->sgt.pfn)) in remap_sg() 66 return -EINVAL; in remap_sg() 69 set_pte_at(r->mm, addr, pte, in remap_sg() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/gasket/ |
| D | gasket_page_table.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 * As much as possible, internal details are hidden to simplify use - 6 * all calls are thread-safe (protected by an internal mutex) except where 42 * Description: Allocates and initializes data to track address translation - 44 * partitioned such that all addresses are "simple" (single-level lookup). 62 * thread-safe (mutex-protected)! 76 * Returns 0 if successful, or non-zero if the page table entries 83 * Get and map [host] user space pages into device memory. 87 * @num_pages: Number of [4kB] pages to map. 94 * Returns 0 if successful or a non-zero error number otherwise. [all …]
|
| /kernel/linux/linux-5.10/include/net/ |
| D | page_pool.h | 1 /* SPDX-License-Identifier: GPL-2.0 12 * uses one-frame-per-page, but have fallbacks that act like the 19 * API keeps track of in-flight pages, in-order to let API user know 20 * when it is safe to dealloactor page_pool object. Thus, API users 27 * will release the DMA mapping and in-flight state accounting. We 35 #include <linux/dma-direction.h> 37 #define PP_FLAG_DMA_MAP BIT(0) /* Should page_pool do the DMA 38 * map/unmap 42 * DMA-synced-for-device according to 45 * Please note DMA-sync-for-CPU is still [all …]
|
| /kernel/linux/linux-5.10/Documentation/networking/ |
| D | page_pool.rst | 1 .. SPDX-License-Identifier: GPL-2.0 8 per-page, but it can fallback on the regular page allocator APIs. 15 when it is safe to free a page_pool object. Thus, API users 22 release the DMA mapping and inflight state accounting. 27 .. code-block:: none 29 +------------------+ 31 +------------------+ 37 +--------------------------------------------+ 39 +--------------------------------------------+ 45 +-----------------------+ +------------------------+ [all …]
|
| /kernel/linux/linux-6.6/drivers/dma/ti/ |
| D | dma-crossbar.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com 25 .compatible = "ti,dra7-dma-crossbar", 29 .compatible = "ti,am335x-edma-crossbar", 44 u32 dma_requests; /* number of DMA requests on eDMA */ 60 writeb_relaxed(val, iomem + (63 - event % 4)); in ti_am335x_xbar_write() 68 struct ti_am335x_xbar_map *map = route_data; in ti_am335x_xbar_free() local 71 map->mux_val, map->dma_line); in ti_am335x_xbar_free() 73 ti_am335x_xbar_write(xbar->iomem, map->dma_line, 0); in ti_am335x_xbar_free() 74 kfree(map); in ti_am335x_xbar_free() [all …]
|
| /kernel/linux/linux-5.10/drivers/dma/ti/ |
| D | dma-crossbar.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com 24 .compatible = "ti,dra7-dma-crossbar", 28 .compatible = "ti,am335x-edma-crossbar", 43 u32 dma_requests; /* number of DMA requests on eDMA */ 59 writeb_relaxed(val, iomem + (63 - event % 4)); in ti_am335x_xbar_write() 67 struct ti_am335x_xbar_map *map = route_data; in ti_am335x_xbar_free() local 70 map->mux_val, map->dma_line); in ti_am335x_xbar_free() 72 ti_am335x_xbar_write(xbar->iomem, map->dma_line, 0); in ti_am335x_xbar_free() 73 kfree(map); in ti_am335x_xbar_free() [all …]
|
| /kernel/linux/linux-5.10/Documentation/driver-api/pci/ |
| D | p2pdma.rst | 1 .. SPDX-License-Identifier: GPL-2.0 4 PCI Peer-to-Peer DMA Support 7 The PCI bus has pretty decent support for performing DMA transfers 9 called Peer-to-Peer (or P2P). However, there are a number of issues that 10 make P2P transactions tricky to do in a perfectly safe way. 36 * Provider - A driver which provides or publishes P2P resources like 38 * Client - A driver which makes use of a resource by setting up a 39 DMA transaction to or from it. 40 * Orchestrator - A driver which orchestrates the flow of data between 54 can DMA directly to the memory exposed by the NVMe device. [all …]
|
| /kernel/linux/linux-5.10/Documentation/core-api/ |
| D | dma-api-howto.rst | 2 Dynamic DMA mapping Guide 9 This is a guide to device driver writers on how to use the DMA API 10 with example pseudo-code. For a concise description of the API, see 11 DMA-API.txt. 13 CPU and DMA addresses 16 There are several kinds of addresses involved in the DMA API, and it's 27 address is not directly useful to a driver; it must use ioremap() to map 31 registers at an MMIO address, or if it performs DMA to read or write system 37 From a device's point of view, DMA uses the bus address space, but it may 39 supports 64-bit addresses for main memory and PCI BARs, it may use an IOMMU [all …]
|
| /kernel/linux/linux-6.6/Documentation/core-api/ |
| D | dma-api-howto.rst | 2 Dynamic DMA mapping Guide 9 This is a guide to device driver writers on how to use the DMA API 10 with example pseudo-code. For a concise description of the API, see 11 DMA-API.txt. 13 CPU and DMA addresses 16 There are several kinds of addresses involved in the DMA API, and it's 27 address is not directly useful to a driver; it must use ioremap() to map 31 registers at an MMIO address, or if it performs DMA to read or write system 37 From a device's point of view, DMA uses the bus address space, but it may 39 supports 64-bit addresses for main memory and PCI BARs, it may use an IOMMU [all …]
|
| /kernel/linux/linux-6.6/drivers/gpu/drm/ |
| D | drm_fbdev_dma.c | 1 // SPDX-License-Identifier: MIT 19 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_open() 22 if (user && !try_module_get(fb_helper->dev->driver->fops->owner)) in drm_fbdev_dma_fb_open() 23 return -ENODEV; in drm_fbdev_dma_fb_open() 30 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_release() 33 module_put(fb_helper->dev->driver->fops->owner); in drm_fbdev_dma_fb_release() 40 struct drm_fb_helper *fb_helper = info->par; in drm_fbdev_dma_fb_destroy() 42 if (!fb_helper->dev) in drm_fbdev_dma_fb_destroy() 47 drm_client_buffer_vunmap(fb_helper->buffer); in drm_fbdev_dma_fb_destroy() 48 drm_client_framebuffer_delete(fb_helper->buffer); in drm_fbdev_dma_fb_destroy() [all …]
|
| /kernel/linux/linux-5.10/net/core/ |
| D | page_pool.c | 1 /* SPDX-License-Identifier: GPL-2.0 14 #include <linux/dma-direction.h> 15 #include <linux/dma-mapping.h> 16 #include <linux/page-flags.h> 29 memcpy(&pool->p, params, sizeof(pool->p)); in page_pool_init() 32 if (pool->p.flags & ~(PP_FLAG_ALL)) in page_pool_init() 33 return -EINVAL; in page_pool_init() 35 if (pool->p.pool_size) in page_pool_init() 36 ring_qsize = pool->p.pool_size; in page_pool_init() 40 return -E2BIG; in page_pool_init() [all …]
|