diff options
author | Brian Swetland <swetland@google.com> | 2008-09-10 17:58:25 -0400 |
---|---|---|
committer | Brian Swetland <swetland@google.com> | 2008-10-22 05:41:00 -0400 |
commit | 8a0f6f17c43933a4768ab79b9ac3ad24cd3c2c3f (patch) | |
tree | 3768860bbca3d9bc25ddaab987aedd88a901d7fe /arch/arm/mach-msm/include | |
parent | 600f7cfebeef74a6ba961c507079e3629da5dd7a (diff) |
[ARM] msm: dma: various basic dma improvements and bugfixes
San:
- Propagate DM errors to the originator of the request.
- Implement msm_dmov_stop_cmd()
- Add return value to init code
- Modify msm_dmov_stop_cmd() to support ungraceful flushing
Arve:
- Disable datamover interrupt when not in use.
We turn off the interrrupt to allow power collapse from idle.
Signed-off-by: San Mehat <san@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'arch/arm/mach-msm/include')
-rw-r--r-- | arch/arm/mach-msm/include/mach/dma.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/arch/arm/mach-msm/include/mach/dma.h b/arch/arm/mach-msm/include/mach/dma.h index ad1c87f86d10..5ab5bdffab07 100644 --- a/arch/arm/mach-msm/include/mach/dma.h +++ b/arch/arm/mach-msm/include/mach/dma.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* arch/arm/mach-msm/include/mach/dma.h | 1 | /* linux/include/asm-arm/arch-msm/dma.h |
2 | * | 2 | * |
3 | * Copyright (C) 2007 Google, Inc. | 3 | * Copyright (C) 2007 Google, Inc. |
4 | * | 4 | * |
@@ -18,17 +18,21 @@ | |||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <mach/msm_iomap.h> | 19 | #include <mach/msm_iomap.h> |
20 | 20 | ||
21 | struct msm_dmov_errdata { | ||
22 | uint32_t flush[6]; | ||
23 | }; | ||
24 | |||
21 | struct msm_dmov_cmd { | 25 | struct msm_dmov_cmd { |
22 | struct list_head list; | 26 | struct list_head list; |
23 | unsigned int cmdptr; | 27 | unsigned int cmdptr; |
24 | void (*complete_func)(struct msm_dmov_cmd *cmd, unsigned int result); | 28 | void (*complete_func)(struct msm_dmov_cmd *cmd, |
25 | /* void (*user_result_func)(struct msm_dmov_cmd *cmd); */ | 29 | unsigned int result, |
30 | struct msm_dmov_errdata *err); | ||
26 | }; | 31 | }; |
27 | 32 | ||
28 | void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd); | 33 | void msm_dmov_enqueue_cmd(unsigned id, struct msm_dmov_cmd *cmd); |
29 | void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd); | 34 | void msm_dmov_stop_cmd(unsigned id, struct msm_dmov_cmd *cmd, int graceful); |
30 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr); | 35 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr); |
31 | /* int msm_dmov_exec_cmd_etc(unsigned id, unsigned int cmdptr, int timeout, int interruptible); */ | ||
32 | 36 | ||
33 | 37 | ||
34 | 38 | ||
@@ -122,6 +126,16 @@ typedef struct { | |||
122 | unsigned _reserved; | 126 | unsigned _reserved; |
123 | } dmov_sg; | 127 | } dmov_sg; |
124 | 128 | ||
129 | /* Box mode */ | ||
130 | typedef struct { | ||
131 | uint32_t cmd; | ||
132 | uint32_t src_row_addr; | ||
133 | uint32_t dst_row_addr; | ||
134 | uint32_t src_dst_len; | ||
135 | uint32_t num_rows; | ||
136 | uint32_t row_offset; | ||
137 | } dmov_box; | ||
138 | |||
125 | /* bits for the cmd field of the above structures */ | 139 | /* bits for the cmd field of the above structures */ |
126 | 140 | ||
127 | #define CMD_LC (1 << 31) /* last command */ | 141 | #define CMD_LC (1 << 31) /* last command */ |