From: Tony Lindgren Date: Tue, 11 Oct 2005 17:34:14 +0000 (+0300) Subject: ARM: OMAP: Synced with mainline X-Git-Tag: v2.6.15-omap2~155 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=09b555784d53c7c75d1ea2493c878c1d96f2a00a;p=linux-2.6-omap-h63xx.git ARM: OMAP: Synced with mainline Synced with mainline --- diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index a2bf5588e27..c9a03981b78 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c @@ -17,7 +17,23 @@ #ifdef CONFIG_CPU_CACHE_VIPT -static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr); +#define ALIAS_FLUSH_START 0xffff4000 + +#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) + +static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) +{ + unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); + + set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); + flush_tlb_kernel_page(to); + + asm( "mcrr p15, 0, %1, %0, c14\n" + " mcrr p15, 0, %1, %0, c5\n" + : + : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES) + : "cc"); +} void flush_cache_mm(struct mm_struct *mm) { @@ -69,24 +85,6 @@ void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsig if (cache_is_vipt_aliasing()) flush_pfn_alias(pfn, user_addr); } - -#define ALIAS_FLUSH_START 0xffff4000 - -#define TOP_PTE(x) pte_offset_kernel(top_pmd, x) - -static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) -{ - unsigned long to = ALIAS_FLUSH_START + (CACHE_COLOUR(vaddr) << PAGE_SHIFT); - - set_pte(TOP_PTE(to), pfn_pte(pfn, PAGE_KERNEL)); - flush_tlb_kernel_page(to); - - asm( "mcrr p15, 0, %1, %0, c14\n" - " mcrr p15, 0, %1, %0, c5\n" - : - : "r" (to), "r" (to + PAGE_SIZE - L1_CACHE_BYTES) - : "cc"); -} #else #define flush_pfn_alias(pfn,vaddr) do { } while (0) #endif diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 76f9ed47730..d31144f5c9f 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1038,7 +1038,9 @@ static int __init omap_init_dma(void) dma_chan_count = 16; } else dma_chan_count = 9; - } else { + } else if (cpu_is_omap24xx()) + dma_chan_count = 32; + else { dma_chan_count = 0; return 0; }