+void omap_set_dma_constant_fill(int lch, u32 color)
+{
+ u16 w;
+
+#ifdef CONFIG_DEBUG_KERNEL
+ if (omap_dma_in_1510_mode) {
+ printk(KERN_ERR "OMAP DMA constant fill not available in 1510 mode.");
+ BUG();
+ return;
+ }
+#endif
+ w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03;
+ w |= 0x01;
+ omap_writew(w, OMAP_DMA_CCR2(lch));
+
+ omap_writew((u16)color, OMAP_DMA_COLOR_L(lch));
+ omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch));
+
+ w = omap_readw(OMAP_DMA_LCH_CTRL(lch)) & ~0x0f;
+ w |= 1; /* Channel type G */
+ omap_writew(w, OMAP_DMA_LCH_CTRL(lch));
+}
+
+void omap_set_dma_transparent_copy(int lch, u32 color)
+{
+ u16 w;
+
+#ifdef CONFIG_DEBUG_KERNEL
+ if (omap_dma_in_1510_mode) {
+ printk(KERN_ERR "OMAP DMA transparent copy not available in 1510 mode.");
+ BUG();
+ }
+#endif
+ w = omap_readw(OMAP_DMA_CCR2(lch)) & ~0x03;
+ w |= 0x02;
+ omap_writew(w, OMAP_DMA_CCR2(lch));
+
+ omap_writew((u16)color, OMAP_DMA_COLOR_L(lch));
+ omap_writew((u16)(color >> 16), OMAP_DMA_COLOR_U(lch));
+
+ w = omap_readw(OMAP_DMA_LCH_CTRL(lch)) & ~0x0f;
+ w |= 1; /* Channel type G */
+ omap_writew(w, OMAP_DMA_LCH_CTRL(lch));
+}