]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Synced with mainline
authorTony Lindgren <tony@atomide.com>
Tue, 11 Oct 2005 17:34:14 +0000 (20:34 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 11 Oct 2005 17:34:14 +0000 (20:34 +0300)
Synced with mainline

arch/arm/mm/flush.c
arch/arm/plat-omap/dma.c

index a2bf5588e276016ba2345b02e08d9b4b2fb88f47..c9a03981b785895a0d2379706e780847ccef1ed6 100644 (file)
 
 #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
index 76f9ed4773082c96f840bccf0ef422524fc8a736..d31144f5c9f40c35171f43c269fb7dcc1d390813 100644 (file)
@@ -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;
        }