OMAP: DMA: Add API for setting channel dest addr
Subsystems (2)
PATCH 1/1 OMAP: DMA: Add API for setting channel dest addr
The new API - omap_set_dma_dst_pos(int lch, int value) is added for setting channel destination address in CPC/CDAC register
--- arch/arm/plat-omap/dma.c | 17 +++++++++++++++++ arch/arm/plat-omap/include/plat/dma.h | 1 + 2 files changed, 18 insertions(+), 0 deletions(-)
arch/arm/plat-omap/dma.c +17 -0
@@ -1109,6 +1109,23 @@ dma_addr_t omap_get_dma_dst_pos(int lch) }EXPORT_SYMBOL (omap_get_dma_dst_pos); +/** +* omap_set_dma_dst_pos() - Set DMA channel destination address +* @arg1: lch DMA logical channel number +* @arg2: value Value to write into CDAC register +* +* Writes "value" into the register CPC/CDAC +*/ +void omap_set_dma_dst_pos (int lch,int value) +{ +if (cpu_is_omap15xx ()) +dma_write (CPC (lch), value); +else +dma_write (CDAC (lcd), value); + +} +EXPORT_SYMBOL (omap_set_dma_dst_pos); +int omap_get_dma_active_status (int lch) {return (dma_read (CCR (lch)) &OMAP_DMA_CCR_EN ) !=0 ;
arch/arm/plat-omap/include/plat/dma.h +1 -0
@@ -509,6 +509,7 @@ extern int omap_set_dma_callback(int lch, void *data);extern dma_addr_t omap_get_dma_src_pos (int lch);extern dma_addr_t omap_get_dma_dst_pos (int lch); +extern void omap_set_dma_dst_pos (int lch,int value);extern void omap_clear_dma (int lch);extern int omap_get_dma_active_status (int lch);extern int omap_dma_running (void );
Signature · 1 line
1.6.0.4
Manju,
Is this patch can build?
Quoted 32 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of G, Manjunath Kondaiah
Sent: Tuesday, March 02, 2010 3:46 PM
To: [email protected]
Cc: G, Manjunath Kondaiah; Tony Lindgren; S, Venkatraman; Raja, Govindraj
Subject: [PATCH] OMAP: DMA: Add API for setting channel dest addrThe new API -
omap_set_dma_dst_pos(int lch, int value)is added for setting channel destination address in CPC/CDAC registerCc Tony Lindgren <[email protected]>Cc S, Venkatraman <[email protected]>Signed-off-by Manjunatha GK <[email protected]>Signed-off-by Govindraj R <[email protected]>--- arch/arm/plat-omap/dma.c | 17 +++++++++++++++++ arch/arm/plat-omap/include/plat/dma.h | 1 + 2 files changed, 18 insertions(+), 0 deletions(-)arch/arm/plat-omap/dma.c +4
-0@@ -1109,6 +1109,23 @@ dma_addr_t omap_get_dma_dst_pos(int lch) }EXPORT_SYMBOL (omap_get_dma_dst_pos); +/** +* omap_set_dma_dst_pos() - Set DMA channel destination address +* @arg1: lch DMA logical channel number +* @arg2: value Value to write into CDAC register
arch/arm/plat-omap/dma.c dma_addr_t omap_get_dma_dst_pos(int lch) · line 1125
Quoted 10 lines
arch/arm/plat-omap/dma.c +9
-0+* +* Writes "value" into the register CPC/CDAC +*/ +void omap_set_dma_dst_pos (int lch,int value) +{ +if (cpu_is_omap15xx ()) +dma_write (CPC (lch), value); +else +dma_write (CDAC (lcd), value);
Should be "dma_write(CDAC(lch), value);"
Quoted 26 lines
arch/arm/plat-omap/dma.c +4
-0+ +} +EXPORT_SYMBOL (omap_set_dma_dst_pos); +int omap_get_dma_active_status (int lch) {arch/arm/plat-omap/dma.c +0
-0return (dma_read (CCR (lch)) &OMAP_DMA_CCR_EN ) !=0 ;arch/arm/plat-omap/include/plat/dma.h +1
-1@@ -509,6 +509,7 @@ extern int omap_set_dma_callback(int lch, void *data);extern dma_addr_t omap_get_dma_src_pos (int lch);extern dma_addr_t omap_get_dma_dst_pos (int lch); +extern void omap_set_dma_dst_pos (int lch,int value);extern void omap_clear_dma (int lch);extern int omap_get_dma_active_status (int lch);extern int omap_dma_running (void ); --1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Santosh,
Quoted 10 lines
-----Original Message-----
From: Shilimkar, Santosh
Sent: Tuesday, March 02, 2010 3:35 PM
To: G, Manjunath Kondaiah; [email protected]
Cc: Tony Lindgren; S, Venkatraman; Raja, Govindraj
Subject: RE: [PATCH] OMAP: DMA: Add API for setting channel dest addrManju,
Is this patch can build?
It looks like after generating patch, I did minor changes related to Description directly in the patch. While doing so, I goofed up lcd->lch.
Thanks for figuring it out.
-Manjunath