Go to the documentation of this file.
15 #define MB (1024*1024)
23 #define MBCS_CM_ID 0x0000
24 #define MBCS_CM_STATUS 0x0008
25 #define MBCS_CM_ERROR_DETAIL1 0x0010
26 #define MBCS_CM_ERROR_DETAIL2 0x0018
27 #define MBCS_CM_CONTROL 0x0020
28 #define MBCS_CM_REQ_TOUT 0x0028
29 #define MBCS_CM_ERR_INT_DEST 0x0038
30 #define MBCS_CM_TARG_FL 0x0050
31 #define MBCS_CM_ERR_STAT 0x0060
32 #define MBCS_CM_CLR_ERR_STAT 0x0068
33 #define MBCS_CM_ERR_INT_EN 0x0070
34 #define MBCS_RD_DMA_SYS_ADDR 0x0100
35 #define MBCS_RD_DMA_LOC_ADDR 0x0108
36 #define MBCS_RD_DMA_CTRL 0x0110
37 #define MBCS_RD_DMA_AMO_DEST 0x0118
38 #define MBCS_RD_DMA_INT_DEST 0x0120
39 #define MBCS_RD_DMA_AUX_STAT 0x0130
40 #define MBCS_WR_DMA_SYS_ADDR 0x0200
41 #define MBCS_WR_DMA_LOC_ADDR 0x0208
42 #define MBCS_WR_DMA_CTRL 0x0210
43 #define MBCS_WR_DMA_AMO_DEST 0x0218
44 #define MBCS_WR_DMA_INT_DEST 0x0220
45 #define MBCS_WR_DMA_AUX_STAT 0x0230
46 #define MBCS_ALG_AMO_DEST 0x0300
47 #define MBCS_ALG_INT_DEST 0x0308
48 #define MBCS_ALG_OFFSETS 0x0310
49 #define MBCS_ALG_STEP 0x0318
51 #define MBCS_GSCR_START 0x0000000
52 #define MBCS_DEBUG_START 0x0100000
53 #define MBCS_RAM0_START 0x0200000
54 #define MBCS_RAM1_START 0x0400000
55 #define MBCS_RAM2_START 0x0600000
57 #define MBCS_CM_CONTROL_REQ_TOUT_MASK 0x0000000000ffffffUL
60 #define MBCS_SRAM_SIZE (1024*1024)
61 #define MBCS_CACHELINE_SIZE 128
66 #define MBCS_MMR_ADDR(mmr_base, offset)((uint64_t *)(mmr_base + offset))
67 #define MBCS_MMR_SET(mmr_base, offset, value) { \
68 uint64_t *mbcs_mmr_set_u64p, readback; \
69 mbcs_mmr_set_u64p = (uint64_t *)(mmr_base + offset); \
70 *mbcs_mmr_set_u64p = value; \
71 readback = *mbcs_mmr_set_u64p; \
73 #define MBCS_MMR_GET(mmr_base, offset) *(uint64_t *)(mmr_base + offset)
74 #define MBCS_MMR_ZERO(mmr_base, offset) MBCS_MMR_SET(mmr_base, offset, 0)
478 #define DEVICE_NAME "mbcs"
479 #define MBCS_PART_NUM 0xfff0
480 #define MBCS_PART_NUM_ALG0 0xf001
481 #define MBCS_MFG_NUM 0x1
546 static ssize_t mbcs_sram_read(
struct file *
fp,
char __user *
buf,
size_t len,
548 static ssize_t mbcs_sram_write(
struct file *
fp,
const char __user *
buf,
size_t len,
550 static loff_t mbcs_sram_llseek(
struct file *filp, loff_t off,
int whence);