Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
mv_xor.h File Reference
#include <linux/types.h>
#include <linux/io.h>
#include <linux/dmaengine.h>
#include <linux/interrupt.h>

Go to the source code of this file.

Data Structures

struct  mv_xor_shared_private
 
struct  mv_xor_device
 
struct  mv_xor_chan
 
struct  mv_xor_desc_slot
 
struct  mv_xor_desc
 

Macros

#define USE_TIMER
 
#define MV_XOR_SLOT_SIZE   64
 
#define MV_XOR_THRESHOLD   1
 
#define XOR_OPERATION_MODE_XOR   0
 
#define XOR_OPERATION_MODE_MEMCPY   2
 
#define XOR_OPERATION_MODE_MEMSET   4
 
#define XOR_CURR_DESC(chan)   (chan->mmr_base + 0x210 + (chan->idx * 4))
 
#define XOR_NEXT_DESC(chan)   (chan->mmr_base + 0x200 + (chan->idx * 4))
 
#define XOR_BYTE_COUNT(chan)   (chan->mmr_base + 0x220 + (chan->idx * 4))
 
#define XOR_DEST_POINTER(chan)   (chan->mmr_base + 0x2B0 + (chan->idx * 4))
 
#define XOR_BLOCK_SIZE(chan)   (chan->mmr_base + 0x2C0 + (chan->idx * 4))
 
#define XOR_INIT_VALUE_LOW(chan)   (chan->mmr_base + 0x2E0)
 
#define XOR_INIT_VALUE_HIGH(chan)   (chan->mmr_base + 0x2E4)
 
#define XOR_CONFIG(chan)   (chan->mmr_base + 0x10 + (chan->idx * 4))
 
#define XOR_ACTIVATION(chan)   (chan->mmr_base + 0x20 + (chan->idx * 4))
 
#define XOR_INTR_CAUSE(chan)   (chan->mmr_base + 0x30)
 
#define XOR_INTR_MASK(chan)   (chan->mmr_base + 0x40)
 
#define XOR_ERROR_CAUSE(chan)   (chan->mmr_base + 0x50)
 
#define XOR_ERROR_ADDR(chan)   (chan->mmr_base + 0x60)
 
#define XOR_INTR_MASK_VALUE   0x3F5
 
#define WINDOW_BASE(w)   (0x250 + ((w) << 2))
 
#define WINDOW_SIZE(w)   (0x270 + ((w) << 2))
 
#define WINDOW_REMAP_HIGH(w)   (0x290 + ((w) << 2))
 
#define WINDOW_BAR_ENABLE(chan)   (0x240 + ((chan) << 2))
 
#define to_mv_sw_desc(addr_hw_desc)   container_of(addr_hw_desc, struct mv_xor_desc_slot, hw_desc)
 
#define mv_hw_desc_slot_idx(hw_desc, idx)   ((void *)(((unsigned long)hw_desc) + ((idx) << 5)))
 
#define MV_XOR_MIN_BYTE_COUNT   (128)
 
#define XOR_MAX_BYTE_COUNT   ((16 * 1024 * 1024) - 1)
 
#define MV_XOR_MAX_BYTE_COUNT   XOR_MAX_BYTE_COUNT
 

Macro Definition Documentation

#define mv_hw_desc_slot_idx (   hw_desc,
  idx 
)    ((void *)(((unsigned long)hw_desc) + ((idx) << 5)))

Definition at line 173 of file mv_xor.h.

#define MV_XOR_MAX_BYTE_COUNT   XOR_MAX_BYTE_COUNT

Definition at line 178 of file mv_xor.h.

#define MV_XOR_MIN_BYTE_COUNT   (128)

Definition at line 176 of file mv_xor.h.

#define MV_XOR_SLOT_SIZE   64

Definition at line 27 of file mv_xor.h.

#define MV_XOR_THRESHOLD   1

Definition at line 28 of file mv_xor.h.

#define to_mv_sw_desc (   addr_hw_desc)    container_of(addr_hw_desc, struct mv_xor_desc_slot, hw_desc)

Definition at line 170 of file mv_xor.h.

#define USE_TIMER

Definition at line 26 of file mv_xor.h.

#define WINDOW_BAR_ENABLE (   chan)    (0x240 + ((chan) << 2))

Definition at line 53 of file mv_xor.h.

#define WINDOW_BASE (   w)    (0x250 + ((w) << 2))

Definition at line 50 of file mv_xor.h.

#define WINDOW_REMAP_HIGH (   w)    (0x290 + ((w) << 2))

Definition at line 52 of file mv_xor.h.

#define WINDOW_SIZE (   w)    (0x270 + ((w) << 2))

Definition at line 51 of file mv_xor.h.

#define XOR_ACTIVATION (   chan)    (chan->mmr_base + 0x20 + (chan->idx * 4))

Definition at line 43 of file mv_xor.h.

#define XOR_BLOCK_SIZE (   chan)    (chan->mmr_base + 0x2C0 + (chan->idx * 4))

Definition at line 38 of file mv_xor.h.

#define XOR_BYTE_COUNT (   chan)    (chan->mmr_base + 0x220 + (chan->idx * 4))

Definition at line 36 of file mv_xor.h.

#define XOR_CONFIG (   chan)    (chan->mmr_base + 0x10 + (chan->idx * 4))

Definition at line 42 of file mv_xor.h.

#define XOR_CURR_DESC (   chan)    (chan->mmr_base + 0x210 + (chan->idx * 4))

Definition at line 34 of file mv_xor.h.

#define XOR_DEST_POINTER (   chan)    (chan->mmr_base + 0x2B0 + (chan->idx * 4))

Definition at line 37 of file mv_xor.h.

#define XOR_ERROR_ADDR (   chan)    (chan->mmr_base + 0x60)

Definition at line 47 of file mv_xor.h.

#define XOR_ERROR_CAUSE (   chan)    (chan->mmr_base + 0x50)

Definition at line 46 of file mv_xor.h.

#define XOR_INIT_VALUE_HIGH (   chan)    (chan->mmr_base + 0x2E4)

Definition at line 40 of file mv_xor.h.

#define XOR_INIT_VALUE_LOW (   chan)    (chan->mmr_base + 0x2E0)

Definition at line 39 of file mv_xor.h.

#define XOR_INTR_CAUSE (   chan)    (chan->mmr_base + 0x30)

Definition at line 44 of file mv_xor.h.

#define XOR_INTR_MASK (   chan)    (chan->mmr_base + 0x40)

Definition at line 45 of file mv_xor.h.

#define XOR_INTR_MASK_VALUE   0x3F5

Definition at line 48 of file mv_xor.h.

#define XOR_MAX_BYTE_COUNT   ((16 * 1024 * 1024) - 1)

Definition at line 177 of file mv_xor.h.

#define XOR_NEXT_DESC (   chan)    (chan->mmr_base + 0x200 + (chan->idx * 4))

Definition at line 35 of file mv_xor.h.

#define XOR_OPERATION_MODE_MEMCPY   2

Definition at line 31 of file mv_xor.h.

#define XOR_OPERATION_MODE_MEMSET   4

Definition at line 32 of file mv_xor.h.

#define XOR_OPERATION_MODE_XOR   0

Definition at line 30 of file mv_xor.h.