drivers/dma/dw-edma/dw-edma-core.h
Source file repositories/reference/linux-study-clean/drivers/dma/dw-edma/dw-edma-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/dw-edma/dw-edma-core.h- Extension
.h- Size
- 4422 bytes
- Lines
- 228
- Domain
- Driver Families
- Bucket
- drivers/dma
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/msi.hlinux/dma/edma.h../virt-dma.h
Detected Declarations
struct dw_edma_chanstruct dw_edma_chunkstruct dw_edma_burststruct dw_edma_chunkstruct dw_edma_descstruct dw_edma_chanstruct dw_edma_irqstruct dw_edmastruct dw_edma_core_opsstruct dw_edma_sgstruct dw_edma_cyclicstruct dw_edma_transferenum dw_edma_direnum dw_edma_requestenum dw_edma_statusenum dw_edma_xfer_typefunction dw_edma_core_offfunction dw_edma_core_ch_countfunction dw_edma_core_ch_statusfunction dw_edma_core_handle_intfunction dw_edma_core_startfunction dw_edma_core_ch_configfunction dw_edma_core_debugfs_onfunction dw_edma_core_ack_emulated_irqfunction dw_edma_core_db_offset
Annotated Snippet
struct dw_edma_burst {
struct list_head list;
u64 sar;
u64 dar;
u32 sz;
};
struct dw_edma_chunk {
struct list_head list;
struct dw_edma_chan *chan;
struct dw_edma_burst *burst;
u32 bursts_alloc;
u8 cb;
struct dw_edma_region ll_region; /* Linked list */
};
struct dw_edma_desc {
struct virt_dma_desc vd;
struct dw_edma_chan *chan;
struct dw_edma_chunk *chunk;
u32 chunks_alloc;
u32 alloc_sz;
u32 xfer_sz;
};
struct dw_edma_chan {
struct virt_dma_chan vc;
struct dw_edma *dw;
int id;
enum dw_edma_dir dir;
u32 ll_max;
struct msi_msg msi;
enum dw_edma_request request;
enum dw_edma_status status;
u8 configured;
struct dma_slave_config config;
bool non_ll;
};
struct dw_edma_irq {
struct msi_msg msi;
u32 wr_mask;
u32 rd_mask;
struct dw_edma *dw;
};
struct dw_edma {
char name[32];
struct dma_device dma;
u16 wr_ch_cnt;
u16 rd_ch_cnt;
struct dw_edma_irq *irq;
int nr_irqs;
struct dw_edma_chan *chan;
raw_spinlock_t lock; /* Only for legacy */
struct dw_edma_chip *chip;
const struct dw_edma_core_ops *core;
};
typedef void (*dw_edma_handler_t)(struct dw_edma_chan *);
struct dw_edma_core_ops {
void (*off)(struct dw_edma *dw);
u16 (*ch_count)(struct dw_edma *dw, enum dw_edma_dir dir);
enum dma_status (*ch_status)(struct dw_edma_chan *chan);
irqreturn_t (*handle_int)(struct dw_edma_irq *dw_irq, enum dw_edma_dir dir,
dw_edma_handler_t done, dw_edma_handler_t abort);
void (*start)(struct dw_edma_chunk *chunk, bool first);
void (*ch_config)(struct dw_edma_chan *chan);
void (*debugfs_on)(struct dw_edma *dw);
void (*ack_emulated_irq)(struct dw_edma *dw);
resource_size_t (*db_offset)(struct dw_edma *dw);
};
struct dw_edma_sg {
Annotation
- Immediate include surface: `linux/msi.h`, `linux/dma/edma.h`, `../virt-dma.h`.
- Detected declarations: `struct dw_edma_chan`, `struct dw_edma_chunk`, `struct dw_edma_burst`, `struct dw_edma_chunk`, `struct dw_edma_desc`, `struct dw_edma_chan`, `struct dw_edma_irq`, `struct dw_edma`, `struct dw_edma_core_ops`, `struct dw_edma_sg`.
- Atlas domain: Driver Families / drivers/dma.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.