diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-10-29 11:54:49 -0400 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-20 09:58:56 -0500 |
commit | 60d151f38799d5e15845ee04b73cbf3839f1b06c (patch) | |
tree | e360fb470a5ba59e6a5363d964b355d3fdae5456 /drivers/dma/mv_xor.h | |
parent | a6b4a9d2c1063ffc52ca94b6c1b24f9b6d5b79c5 (diff) |
dma: mv_xor: allow channels to be registered directly from the main device
Extend the XOR engine driver (currently called "mv_xor_shared") so
that XOR channels can be passed in the platform_data structure, and be
registered from there.
This will allow the users of the driver to be converted to the single
platform_driver variant of the mv_xor driver.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/dma/mv_xor.h')
-rw-r--r-- | drivers/dma/mv_xor.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index a0641aebbdef..686575f6b9f5 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define USE_TIMER | 26 | #define USE_TIMER |
27 | #define MV_XOR_SLOT_SIZE 64 | 27 | #define MV_XOR_SLOT_SIZE 64 |
28 | #define MV_XOR_THRESHOLD 1 | 28 | #define MV_XOR_THRESHOLD 1 |
29 | #define MV_XOR_MAX_CHANNELS 2 | ||
29 | 30 | ||
30 | #define XOR_OPERATION_MODE_XOR 0 | 31 | #define XOR_OPERATION_MODE_XOR 0 |
31 | #define XOR_OPERATION_MODE_MEMCPY 2 | 32 | #define XOR_OPERATION_MODE_MEMCPY 2 |
@@ -53,9 +54,10 @@ | |||
53 | #define WINDOW_BAR_ENABLE(chan) (0x240 + ((chan) << 2)) | 54 | #define WINDOW_BAR_ENABLE(chan) (0x240 + ((chan) << 2)) |
54 | 55 | ||
55 | struct mv_xor_shared_private { | 56 | struct mv_xor_shared_private { |
56 | void __iomem *xor_base; | 57 | void __iomem *xor_base; |
57 | void __iomem *xor_high_base; | 58 | void __iomem *xor_high_base; |
58 | struct clk *clk; | 59 | struct clk *clk; |
60 | struct mv_xor_device *channels[MV_XOR_MAX_CHANNELS]; | ||
59 | }; | 61 | }; |
60 | 62 | ||
61 | 63 | ||