drivers/dma/dw-edma/dw-edma-v0-regs.h

Source file repositories/reference/linux-study-clean/drivers/dma/dw-edma/dw-edma-v0-regs.h

File Facts

System
Linux kernel
Corpus path
drivers/dma/dw-edma/dw-edma-v0-regs.h
Extension
.h
Size
5876 bytes
Lines
234
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct dw_edma_v0_ch_regs {
	u32 ch_control1;				/* 0x0000 */
	u32 ch_control2;				/* 0x0004 */
	u32 transfer_size;				/* 0x0008 */
	union {
		u64 reg;				/* 0x000c..0x0010 */
		struct {
			u32 lsb;			/* 0x000c */
			u32 msb;			/* 0x0010 */
		};
	} sar;
	union {
		u64 reg;				/* 0x0014..0x0018 */
		struct {
			u32 lsb;			/* 0x0014 */
			u32 msb;			/* 0x0018 */
		};
	} dar;
	union {
		u64 reg;				/* 0x001c..0x0020 */
		struct {
			u32 lsb;			/* 0x001c */
			u32 msb;			/* 0x0020 */
		};
	} llp;
} __packed;

struct dw_edma_v0_ch {
	struct dw_edma_v0_ch_regs wr;			/* 0x0200 */
	u32 padding_1[55];				/* 0x0224..0x02fc */
	struct dw_edma_v0_ch_regs rd;			/* 0x0300 */
	u32 padding_2[55];				/* 0x0324..0x03fc */
} __packed;

struct dw_edma_v0_unroll {
	u32 padding_1;					/* 0x00f8 */
	u32 wr_engine_chgroup;				/* 0x0100 */
	u32 rd_engine_chgroup;				/* 0x0104 */
	union {
		u64 reg;				/* 0x0108..0x010c */
		struct {
			u32 lsb;			/* 0x0108 */
			u32 msb;			/* 0x010c */
		};
	} wr_engine_hshake_cnt;
	u32 padding_2[2];				/* 0x0110..0x0114 */
	union {
		u64 reg;				/* 0x0120..0x0124 */
		struct {
			u32 lsb;			/* 0x0120 */
			u32 msb;			/* 0x0124 */
		};
	} rd_engine_hshake_cnt;
	u32 padding_3[2];				/* 0x0120..0x0124 */
	u32 wr_ch0_pwr_en;				/* 0x0128 */
	u32 wr_ch1_pwr_en;				/* 0x012c */
	u32 wr_ch2_pwr_en;				/* 0x0130 */
	u32 wr_ch3_pwr_en;				/* 0x0134 */
	u32 wr_ch4_pwr_en;				/* 0x0138 */
	u32 wr_ch5_pwr_en;				/* 0x013c */
	u32 wr_ch6_pwr_en;				/* 0x0140 */
	u32 wr_ch7_pwr_en;				/* 0x0144 */
	u32 padding_4[8];				/* 0x0148..0x0164 */
	u32 rd_ch0_pwr_en;				/* 0x0168 */
	u32 rd_ch1_pwr_en;				/* 0x016c */
	u32 rd_ch2_pwr_en;				/* 0x0170 */
	u32 rd_ch3_pwr_en;				/* 0x0174 */
	u32 rd_ch4_pwr_en;				/* 0x0178 */
	u32 rd_ch5_pwr_en;				/* 0x018c */
	u32 rd_ch6_pwr_en;				/* 0x0180 */
	u32 rd_ch7_pwr_en;				/* 0x0184 */
	u32 padding_5[30];				/* 0x0188..0x01fc */
	struct dw_edma_v0_ch ch[EDMA_V0_MAX_NR_CH];	/* 0x0200..0x1120 */
} __packed;

struct dw_edma_v0_legacy {
	u32 viewport_sel;				/* 0x00f8 */
	struct dw_edma_v0_ch_regs ch;			/* 0x0100..0x0120 */
} __packed;

struct dw_edma_v0_regs {
	/* eDMA global registers */
	u32 ctrl_data_arb_prior;			/* 0x0000 */
	u32 padding_1;					/* 0x0004 */
	u32 ctrl;					/* 0x0008 */
	u32 wr_engine_en;				/* 0x000c */
	u32 wr_doorbell;				/* 0x0010 */
	u32 padding_2;					/* 0x0014 */
	union {
		u64 reg;				/* 0x0018..0x001c */

Annotation

Implementation Notes