diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-17 00:16:19 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-06-17 00:29:25 +0200 |
commit | e671472c3f8bbbb4b5eaa94c283d0ade6cd50f5e (patch) | |
tree | fdcc26b996401532ba9fab765763ba2dc13d8628 /firmware/target/arm/imx233/dma-imx233.h | |
parent | bdc572b8a1bfc9fedb4a2158626647a801c3f177 (diff) | |
download | rockbox-e671472c3f8bbbb4b5eaa94c283d0ade6cd50f5e.tar.gz rockbox-e671472c3f8bbbb4b5eaa94c283d0ade6cd50f5e.zip |
imx233: fix dma for stmp3600 and stmp3700, improve support
Add finer granularity to start command: now commands can be
prepared, schedule and semaphore increased independently.
Change-Id: Ib1ed1f20f4b46dc61b6dbab6ddec8b54e3d832b9
Diffstat (limited to 'firmware/target/arm/imx233/dma-imx233.h')
-rw-r--r-- | firmware/target/arm/imx233/dma-imx233.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/dma-imx233.h b/firmware/target/arm/imx233/dma-imx233.h index 692b8dc16d..a64b8a64d1 100644 --- a/firmware/target/arm/imx233/dma-imx233.h +++ b/firmware/target/arm/imx233/dma-imx233.h | |||
@@ -37,8 +37,12 @@ | |||
37 | #define APB_IS_APBX_CHANNEL(x) ((x) & 0x10) | 37 | #define APB_IS_APBX_CHANNEL(x) ((x) & 0x10) |
38 | #define APB_GET_DMA_CHANNEL(x) ((x) & 0xf) | 38 | #define APB_GET_DMA_CHANNEL(x) ((x) & 0xf) |
39 | 39 | ||
40 | #if IMX233_SUBTARGET >= 3700 | ||
40 | // NOTE: although undocumented, the iMX233 channel 0 is actually the LCDIF one | 41 | // NOTE: although undocumented, the iMX233 channel 0 is actually the LCDIF one |
41 | #define APB_LCDIF APBH_DMA_CHANNEL(0) | 42 | #define APB_LCDIF APBH_DMA_CHANNEL(0) |
43 | #else | ||
44 | #define APB_LCDIF APBX_DMA_CHANNEL(4) | ||
45 | #endif | ||
42 | 46 | ||
43 | #define APB_SSP(ssp) APBH_DMA_CHANNEL(ssp) | 47 | #define APB_SSP(ssp) APBH_DMA_CHANNEL(ssp) |
44 | #define APB_GPMI(dev) APBH_DMA_CHANNEL(4 + (dev)) | 48 | #define APB_GPMI(dev) APBH_DMA_CHANNEL(4 + (dev)) |
@@ -151,6 +155,10 @@ void imx233_dma_enable_channel_interrupt(unsigned chan, bool enable); | |||
151 | void imx233_dma_clear_channel_interrupt(unsigned chan); | 155 | void imx233_dma_clear_channel_interrupt(unsigned chan); |
152 | bool imx233_dma_is_channel_error_irq(unsigned chan); | 156 | bool imx233_dma_is_channel_error_irq(unsigned chan); |
153 | /* assume no command is in progress */ | 157 | /* assume no command is in progress */ |
158 | void imx233_dma_prepare_command(unsigned chan, struct apb_dma_command_t *cmd); | ||
159 | void imx233_dma_set_next_command(unsigned chan, struct apb_dma_command_t *cmd); | ||
160 | void imx233_dma_inc_sema(unsigned chan, unsigned amount); | ||
161 | /* wrapper around prepare_command, set_next_command, inc_sema(1) */ | ||
154 | void imx233_dma_start_command(unsigned chan, struct apb_dma_command_t *cmd); | 162 | void imx233_dma_start_command(unsigned chan, struct apb_dma_command_t *cmd); |
155 | /* return value of the semaphore */ | 163 | /* return value of the semaphore */ |
156 | int imx233_dma_wait_completion(unsigned chan, unsigned tmo); | 164 | int imx233_dma_wait_completion(unsigned chan, unsigned tmo); |