diff options
author | Richard Purdie <richard@ted.(none)> | 2009-04-28 17:13:57 +0100 |
---|---|---|
committer | Richard Purdie <richard@ted.(none)> | 2009-04-28 17:13:57 +0100 |
commit | 6a6f5cc8206f35dba044f59ae59ed878c2f8fb94 (patch) | |
tree | d325b4fe4696551589573a1b43c19e82cc0cd0d1 /meta/packages/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch | |
parent | a8e1e028f85b4d6f37238b9cbb0bab19b5939b29 (diff) | |
parent | 0adc74b06210f1be01145a5977a36b83aca0aa68 (diff) | |
download | openembedded-core-6a6f5cc8206f35dba044f59ae59ed878c2f8fb94.tar.gz openembedded-core-6a6f5cc8206f35dba044f59ae59ed878c2f8fb94.tar.bz2 openembedded-core-6a6f5cc8206f35dba044f59ae59ed878c2f8fb94.zip |
Merge branch 'marcin/trunk' of git://git.pokylinux.org/poky-contrib
Diffstat (limited to 'meta/packages/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch')
-rw-r--r-- | meta/packages/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch b/meta/packages/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch new file mode 100644 index 0000000000..cc6663fa21 --- /dev/null +++ b/meta/packages/linux/linux-omap-2.6.29/dss2/0048-OMAP2-3-DMA-implement-trans-copy-and-const-fill.patch @@ -0,0 +1,123 @@ +From e34564db95627ad20e918b240c45e2bd5555f7e8 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen <tomi.valkeinen@nokia.com> +Date: Wed, 22 Apr 2009 10:06:08 +0300 +Subject: [PATCH] OMAP2/3: DMA: implement trans copy and const fill + +Implement transparent copy and constant fill features for OMAP2/3. + +Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> +--- + arch/arm/plat-omap/dma.c | 81 +++++++++++++++++++++------------ + arch/arm/plat-omap/include/mach/dma.h | 1 + + 2 files changed, 52 insertions(+), 30 deletions(-) + +diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c +index 3fd0e77..060ac71 100755 +--- a/arch/arm/plat-omap/dma.c ++++ b/arch/arm/plat-omap/dma.c +@@ -310,41 +310,62 @@ EXPORT_SYMBOL(omap_set_dma_transfer_params); + + void omap_set_dma_color_mode(int lch, enum omap_dma_color_mode mode, u32 color) + { +- u16 w; +- + BUG_ON(omap_dma_in_1510_mode()); + +- if (cpu_class_is_omap2()) { +- REVISIT_24XX(); +- return; +- } ++ if (cpu_class_is_omap1()) { ++ u16 w; + +- w = dma_read(CCR2(lch)); +- w &= ~0x03; ++ w = dma_read(CCR2(lch)); ++ w &= ~0x03; + +- switch (mode) { +- case OMAP_DMA_CONSTANT_FILL: +- w |= 0x01; +- break; +- case OMAP_DMA_TRANSPARENT_COPY: +- w |= 0x02; +- break; +- case OMAP_DMA_COLOR_DIS: +- break; +- default: +- BUG(); ++ switch (mode) { ++ case OMAP_DMA_CONSTANT_FILL: ++ w |= 0x01; ++ break; ++ case OMAP_DMA_TRANSPARENT_COPY: ++ w |= 0x02; ++ break; ++ case OMAP_DMA_COLOR_DIS: ++ break; ++ default: ++ BUG(); ++ } ++ dma_write(w, CCR2(lch)); ++ ++ w = dma_read(LCH_CTRL(lch)); ++ w &= ~0x0f; ++ /* Default is channel type 2D */ ++ if (mode) { ++ dma_write((u16)color, COLOR_L(lch)); ++ dma_write((u16)(color >> 16), COLOR_U(lch)); ++ w |= 1; /* Channel type G */ ++ } ++ dma_write(w, LCH_CTRL(lch)); + } +- dma_write(w, CCR2(lch)); + +- w = dma_read(LCH_CTRL(lch)); +- w &= ~0x0f; +- /* Default is channel type 2D */ +- if (mode) { +- dma_write((u16)color, COLOR_L(lch)); +- dma_write((u16)(color >> 16), COLOR_U(lch)); +- w |= 1; /* Channel type G */ ++ if (cpu_class_is_omap2()) { ++ u32 val; ++ ++ val = dma_read(CCR(lch)); ++ val &= ~((1 << 17) | (1 << 16)); ++ ++ switch (mode) { ++ case OMAP_DMA_CONSTANT_FILL: ++ val |= 1 << 16; ++ break; ++ case OMAP_DMA_TRANSPARENT_COPY: ++ val |= 1 << 17; ++ break; ++ case OMAP_DMA_COLOR_DIS: ++ break; ++ default: ++ BUG(); ++ } ++ dma_write(val, CCR(lch)); ++ ++ color &= 0xffffff; ++ dma_write(color, COLOR(lch)); + } +- dma_write(w, LCH_CTRL(lch)); + } + EXPORT_SYMBOL(omap_set_dma_color_mode); + +diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h +index 224b077..4e34f47 100644 +--- a/arch/arm/plat-omap/include/mach/dma.h ++++ b/arch/arm/plat-omap/include/mach/dma.h +@@ -144,6 +144,7 @@ + #define OMAP_DMA4_CSSA_U(n) 0 + #define OMAP_DMA4_CDSA_L(n) 0 + #define OMAP_DMA4_CDSA_U(n) 0 ++#define OMAP1_DMA_COLOR(n) 0 + + /*----------------------------------------------------------------------------*/ + +-- +1.5.6.5 + |