arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h- Extension
.h- Size
- 13564 bytes
- Lines
- 389
- Domain
- Architecture Layer
- Bucket
- arch/mips
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef _AU1000_DBDMA_H_
#define _AU1000_DBDMA_H_
#ifndef _LANGUAGE_ASSEMBLY
typedef volatile struct dbdma_global {
u32 ddma_config;
u32 ddma_intstat;
u32 ddma_throttle;
u32 ddma_inten;
} dbdma_global_t;
/* General Configuration. */
#define DDMA_CONFIG_AF (1 << 2)
#define DDMA_CONFIG_AH (1 << 1)
#define DDMA_CONFIG_AL (1 << 0)
#define DDMA_THROTTLE_EN (1 << 31)
/* The structure of a DMA Channel. */
typedef volatile struct au1xxx_dma_channel {
u32 ddma_cfg; /* See below */
u32 ddma_desptr; /* 32-byte aligned pointer to descriptor */
u32 ddma_statptr; /* word aligned pointer to status word */
u32 ddma_dbell; /* A write activates channel operation */
u32 ddma_irq; /* If bit 0 set, interrupt pending */
u32 ddma_stat; /* See below */
u32 ddma_bytecnt; /* Byte count, valid only when chan idle */
/* Remainder, up to the 256 byte boundary, is reserved. */
} au1x_dma_chan_t;
#define DDMA_CFG_SED (1 << 9) /* source DMA level/edge detect */
#define DDMA_CFG_SP (1 << 8) /* source DMA polarity */
#define DDMA_CFG_DED (1 << 7) /* destination DMA level/edge detect */
#define DDMA_CFG_DP (1 << 6) /* destination DMA polarity */
#define DDMA_CFG_SYNC (1 << 5) /* Sync static bus controller */
#define DDMA_CFG_PPR (1 << 4) /* PCI posted read/write control */
#define DDMA_CFG_DFN (1 << 3) /* Descriptor fetch non-coherent */
#define DDMA_CFG_SBE (1 << 2) /* Source big endian */
#define DDMA_CFG_DBE (1 << 1) /* Destination big endian */
#define DDMA_CFG_EN (1 << 0) /* Channel enable */
/*
* Always set when descriptor processing done, regardless of
* interrupt enable state. Reflected in global intstat, don't
* clear this until global intstat is read/used.
*/
#define DDMA_IRQ_IN (1 << 0)
#define DDMA_STAT_DB (1 << 2) /* Doorbell pushed */
#define DDMA_STAT_V (1 << 1) /* Descriptor valid */
#define DDMA_STAT_H (1 << 0) /* Channel Halted */
/*
* "Standard" DDMA Descriptor.
* Must be 32-byte aligned.
*/
typedef volatile struct au1xxx_ddma_desc {
u32 dscr_cmd0; /* See below */
u32 dscr_cmd1; /* See below */
u32 dscr_source0; /* source phys address */
u32 dscr_source1; /* See below */
u32 dscr_dest0; /* Destination address */
u32 dscr_dest1; /* See below */
u32 dscr_stat; /* completion status */
u32 dscr_nxtptr; /* Next descriptor pointer (mostly) */
/*
* First 32 bytes are HW specific!!!
* Let's have some SW data following -- make sure it's 32 bytes.
*/
u32 sw_status;
u32 sw_context;
u32 sw_reserved[6];
} au1x_ddma_desc_t;
#define DSCR_CMD0_V (1 << 31) /* Descriptor valid */
#define DSCR_CMD0_MEM (1 << 30) /* mem-mem transfer */
#define DSCR_CMD0_SID_MASK (0x1f << 25) /* Source ID */
#define DSCR_CMD0_DID_MASK (0x1f << 20) /* Destination ID */
#define DSCR_CMD0_SW_MASK (0x3 << 18) /* Source Width */
#define DSCR_CMD0_DW_MASK (0x3 << 16) /* Destination Width */
#define DSCR_CMD0_ARB (0x1 << 15) /* Set for Hi Pri */
#define DSCR_CMD0_DT_MASK (0x3 << 13) /* Descriptor Type */
#define DSCR_CMD0_SN (0x1 << 12) /* Source non-coherent */
#define DSCR_CMD0_DN (0x1 << 11) /* Destination non-coherent */
#define DSCR_CMD0_SM (0x1 << 10) /* Stride mode */
#define DSCR_CMD0_IE (0x1 << 8) /* Interrupt Enable */
#define DSCR_CMD0_SP (0x1 << 4) /* Status pointer select */
#define DSCR_CMD0_CV (0x1 << 2) /* Clear Valid when done */
#define DSCR_CMD0_ST_MASK (0x3 << 0) /* Status instruction */
Annotation
- Atlas domain: Architecture Layer / arch/mips.
- Implementation status: source implementation candidate.
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.