Go to the documentation of this file.
21 #include <linux/types.h>
27 #define MV_XOR_SLOT_SIZE 64
28 #define MV_XOR_THRESHOLD 1
30 #define XOR_OPERATION_MODE_XOR 0
31 #define XOR_OPERATION_MODE_MEMCPY 2
32 #define XOR_OPERATION_MODE_MEMSET 4
34 #define XOR_CURR_DESC(chan) (chan->mmr_base + 0x210 + (chan->idx * 4))
35 #define XOR_NEXT_DESC(chan) (chan->mmr_base + 0x200 + (chan->idx * 4))
36 #define XOR_BYTE_COUNT(chan) (chan->mmr_base + 0x220 + (chan->idx * 4))
37 #define XOR_DEST_POINTER(chan) (chan->mmr_base + 0x2B0 + (chan->idx * 4))
38 #define XOR_BLOCK_SIZE(chan) (chan->mmr_base + 0x2C0 + (chan->idx * 4))
39 #define XOR_INIT_VALUE_LOW(chan) (chan->mmr_base + 0x2E0)
40 #define XOR_INIT_VALUE_HIGH(chan) (chan->mmr_base + 0x2E4)
42 #define XOR_CONFIG(chan) (chan->mmr_base + 0x10 + (chan->idx * 4))
43 #define XOR_ACTIVATION(chan) (chan->mmr_base + 0x20 + (chan->idx * 4))
44 #define XOR_INTR_CAUSE(chan) (chan->mmr_base + 0x30)
45 #define XOR_INTR_MASK(chan) (chan->mmr_base + 0x40)
46 #define XOR_ERROR_CAUSE(chan) (chan->mmr_base + 0x50)
47 #define XOR_ERROR_ADDR(chan) (chan->mmr_base + 0x60)
48 #define XOR_INTR_MASK_VALUE 0x3F5
50 #define WINDOW_BASE(w) (0x250 + ((w) << 2))
51 #define WINDOW_SIZE(w) (0x270 + ((w) << 2))
52 #define WINDOW_REMAP_HIGH(w) (0x290 + ((w) << 2))
53 #define WINDOW_BAR_ENABLE(chan) (0x240 + ((chan) << 2))
170 #define to_mv_sw_desc(addr_hw_desc) \
171 container_of(addr_hw_desc, struct mv_xor_desc_slot, hw_desc)
173 #define mv_hw_desc_slot_idx(hw_desc, idx) \
174 ((void *)(((unsigned long)hw_desc) + ((idx) << 5)))
176 #define MV_XOR_MIN_BYTE_COUNT (128)
177 #define XOR_MAX_BYTE_COUNT ((16 * 1024 * 1024) - 1)
178 #define MV_XOR_MAX_BYTE_COUNT XOR_MAX_BYTE_COUNT