drivers/dma/dw-axi-dmac/dw-axi-dmac.h
Source file repositories/reference/linux-study-clean/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/dw-axi-dmac/dw-axi-dmac.h- Extension
.h- Size
- 12268 bytes
- Lines
- 407
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/bitops.hlinux/clk.hlinux/device.hlinux/dmaengine.hlinux/types.h../virt-dma.h
Detected Declarations
struct dw_axi_dma_hcfgstruct axi_dma_chanstruct dw_axi_dmastruct axi_dma_chipstruct axi_dma_hw_descstruct axi_dma_descstruct axi_dma_chan_config
Annotated Snippet
struct dw_axi_dma_hcfg {
u32 nr_channels;
u32 nr_masters;
u32 m_data_width;
u32 block_size[DMAC_MAX_CHANNELS];
u32 priority[DMAC_MAX_CHANNELS];
/* maximum supported axi burst length */
u32 axi_rw_burst_len;
/* Register map for DMAX_NUM_CHANNELS <= 8 */
bool reg_map_8_channels;
bool restrict_axi_burst_len;
bool use_cfg2;
bool use_handshake_as_channel_number;
};
struct axi_dma_chan {
struct axi_dma_chip *chip;
void __iomem *chan_regs;
u8 id;
u8 hw_handshake_num;
atomic_t descs_allocated;
struct dma_pool *desc_pool;
struct virt_dma_chan vc;
struct axi_dma_desc *desc;
struct dma_slave_config config;
enum dma_transfer_direction direction;
bool cyclic;
/* these other elements are all protected by vc.lock */
bool is_paused;
};
struct dw_axi_dma {
struct dma_device dma;
struct dw_axi_dma_hcfg *hdata;
struct device_dma_parameters dma_parms;
/* channels */
struct axi_dma_chan *chan;
};
struct axi_dma_chip {
struct device *dev;
int irq[DMAC_MAX_CHANNELS];
void __iomem *regs;
void __iomem *apb_regs;
struct clk *core_clk;
struct clk *cfgr_clk;
struct dw_axi_dma *dw;
};
/* LLI == Linked List Item */
struct __packed axi_dma_lli {
__le64 sar;
__le64 dar;
__le32 block_ts_lo;
__le32 block_ts_hi;
__le64 llp;
__le32 ctl_lo;
__le32 ctl_hi;
__le32 sstat;
__le32 dstat;
__le32 status_lo;
__le32 status_hi;
__le32 reserved_lo;
__le32 reserved_hi;
};
struct axi_dma_hw_desc {
struct axi_dma_lli *lli;
dma_addr_t llp;
u32 len;
};
struct axi_dma_desc {
struct axi_dma_hw_desc *hw_desc;
struct virt_dma_desc vd;
struct axi_dma_chan *chan;
u32 completed_blocks;
u32 length;
u32 period_len;
u32 nr_hw_descs;
};
struct axi_dma_chan_config {
u8 dst_multblk_type;
u8 src_multblk_type;
u8 dst_per;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/clk.h`, `linux/device.h`, `linux/dmaengine.h`, `linux/types.h`, `../virt-dma.h`.
- Detected declarations: `struct dw_axi_dma_hcfg`, `struct axi_dma_chan`, `struct dw_axi_dma`, `struct axi_dma_chip`, `struct axi_dma_hw_desc`, `struct axi_dma_desc`, `struct axi_dma_chan_config`.
- Atlas domain: Driver Families / drivers/dma.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.