Path: blob/master/drivers/dma/dw-edma/dw-hdma-v0-regs.h
26282 views
/* SPDX-License-Identifier: GPL-2.0 */1/*2* Copyright (c) 2023 Cai Huoqing3* Synopsys DesignWare HDMA v0 reg4*5* Author: Cai Huoqing <[email protected]>6*/78#ifndef _DW_HDMA_V0_REGS_H9#define _DW_HDMA_V0_REGS_H1011#include <linux/dmaengine.h>1213#define HDMA_V0_MAX_NR_CH 814#define HDMA_V0_LOCAL_ABORT_INT_EN BIT(6)15#define HDMA_V0_REMOTE_ABORT_INT_EN BIT(5)16#define HDMA_V0_LOCAL_STOP_INT_EN BIT(4)17#define HDMA_V0_REMOTE_STOP_INT_EN BIT(3)18#define HDMA_V0_ABORT_INT_MASK BIT(2)19#define HDMA_V0_STOP_INT_MASK BIT(0)20#define HDMA_V0_LINKLIST_EN BIT(0)21#define HDMA_V0_CONSUMER_CYCLE_STAT BIT(1)22#define HDMA_V0_CONSUMER_CYCLE_BIT BIT(0)23#define HDMA_V0_DOORBELL_START BIT(0)24#define HDMA_V0_CH_STATUS_MASK GENMASK(1, 0)2526struct dw_hdma_v0_ch_regs {27u32 ch_en; /* 0x0000 */28u32 doorbell; /* 0x0004 */29u32 prefetch; /* 0x0008 */30u32 handshake; /* 0x000c */31union {32u64 reg; /* 0x0010..0x0014 */33struct {34u32 lsb; /* 0x0010 */35u32 msb; /* 0x0014 */36};37} llp;38u32 cycle_sync; /* 0x0018 */39u32 transfer_size; /* 0x001c */40union {41u64 reg; /* 0x0020..0x0024 */42struct {43u32 lsb; /* 0x0020 */44u32 msb; /* 0x0024 */45};46} sar;47union {48u64 reg; /* 0x0028..0x002c */49struct {50u32 lsb; /* 0x0028 */51u32 msb; /* 0x002c */52};53} dar;54u32 watermark_en; /* 0x0030 */55u32 control1; /* 0x0034 */56u32 func_num; /* 0x0038 */57u32 qos; /* 0x003c */58u32 padding_1[16]; /* 0x0040..0x007c */59u32 ch_stat; /* 0x0080 */60u32 int_stat; /* 0x0084 */61u32 int_setup; /* 0x0088 */62u32 int_clear; /* 0x008c */63union {64u64 reg; /* 0x0090..0x0094 */65struct {66u32 lsb; /* 0x0090 */67u32 msb; /* 0x0094 */68};69} msi_stop;70union {71u64 reg; /* 0x0098..0x009c */72struct {73u32 lsb; /* 0x0098 */74u32 msb; /* 0x009c */75};76} msi_watermark;77union {78u64 reg; /* 0x00a0..0x00a4 */79struct {80u32 lsb; /* 0x00a0 */81u32 msb; /* 0x00a4 */82};83} msi_abort;84u32 msi_msgdata; /* 0x00a8 */85u32 padding_2[21]; /* 0x00ac..0x00fc */86} __packed;8788struct dw_hdma_v0_ch {89struct dw_hdma_v0_ch_regs wr; /* 0x0000 */90struct dw_hdma_v0_ch_regs rd; /* 0x0100 */91} __packed;9293struct dw_hdma_v0_regs {94struct dw_hdma_v0_ch ch[HDMA_V0_MAX_NR_CH]; /* 0x0000..0x0fa8 */95} __packed;9697struct dw_hdma_v0_lli {98u32 control;99u32 transfer_size;100union {101u64 reg;102struct {103u32 lsb;104u32 msb;105};106} sar;107union {108u64 reg;109struct {110u32 lsb;111u32 msb;112};113} dar;114} __packed;115116struct dw_hdma_v0_llp {117u32 control;118u32 reserved;119union {120u64 reg;121struct {122u32 lsb;123u32 msb;124};125} llp;126} __packed;127128#endif /* _DW_HDMA_V0_REGS_H */129130131