Here is the updated patch.

From: Santosh Shilimkar <[EMAIL PROTECTED]>

Added helper APIs in the arch/arm/plat-omap/dma.c.Declaration was already
present in arch/arm/plat-omap/include/mach/dma.h. 
APIs are 1) omap_set_dma_src_endian_type
           2) omap_set_dma_dst_endian_type
           3) omap_get_dma_index
Signed-off-by: Santosh Shilimkar <[EMAIL PROTECTED]>
---
--- omapkernel.orig/arch/arm/plat-omap/dma.c    2008-11-25 20:02:37.000000000 
+0530
+++ omapkernel/arch/arm/plat-omap/dma.c 2008-11-25 20:10:07.505112358 +0530
@@ -594,6 +594,24 @@ void omap_set_dma_dest_burst_mode(int lc
 }
 EXPORT_SYMBOL(omap_set_dma_dest_burst_mode);
 
+void omap_set_dma_src_endian_type(int lch, enum end_type etype)
+{
+       u32 csdp;
+       csdp = dma_read(CSDP(lch));
+       csdp |= ((etype & 0x1) << 21);
+       dma_write(csdp, CSDP(lch));
+}
+EXPORT_SYMBOL(omap_set_dma_src_endian_type);
+
+void omap_set_dma_dst_endian_type(int lch, enum end_type etype)
+{
+       u32 csdp;
+        csdp = dma_read(CSDP(lch));
+        csdp |= ((etype & 0x1) << 19);
+        dma_write(csdp, CSDP(lch));
+}
+EXPORT_SYMBOL(omap_set_dma_dst_endian_type);
+
 static inline void omap_enable_channel_irq(int lch)
 {
        u32 status;
@@ -1017,6 +1035,26 @@ int omap_set_dma_callback(int lch,
 }
 EXPORT_SYMBOL(omap_set_dma_callback);
 
+/**
+ * @brief omap_get_dma_index : Get the element and frame number
+ * of the current logical channel
+ *
+ * @param lch : Logical channel number
+ * @param ei : Element index
+ * @param fi : Frame index
+ *
+ * @return  : Success
+ */
+int omap_get_dma_index(int lch, int *ei, int *fi)
+{
+       if ((!ei) || (!fi))
+               return -EPERM;
+       *ei = dma_read(CCEN(lch));
+       *fi = dma_read(CCFN(lch));
+       return 0;
+}
+EXPORT_SYMBOL(omap_get_dma_index);
+
 /*
  * Returns current physical source address for the given DMA channel.
  * If the channel is running the caller must disable interrupts prior calling


Regards
Santosh Shilimkar--
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

Reply via email to