]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/mmu.c
ARM: OMAP: Add MMU TWL support for omap1
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / mmu.c
index 876952ef734b305a044cb8193ad3430f021a5ddd..66aa0d49b980f221b94fc58b790911a4ce1c9936 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/arch/arm/mach-omap2/mmu.c
+ * linux/arch/arm/mach-omap1/mmu.c
  *
  * Support for non-MPU OMAP1 MMUs.
  *
@@ -329,6 +329,14 @@ static void omap1_mmu_interrupt(struct omap_mmu *mmu)
        schedule_work(&mmu->irq_work);
 }
 
+static pgprot_t omap1_mmu_pte_get_attr(struct omap_mmu_tlb_entry *entry)
+{
+       /* 4KB AP position as default */
+       u32 attr = entry->ap >> 4;
+       attr <<= ((entry->pgsz == OMAP_MMU_CAM_PAGESIZE_1MB) ? 6:0);
+       return attr;
+}
+
 struct omap_mmu_ops omap1_mmu_ops = {
        .startup        = omap1_mmu_startup,
        .shutdown       = omap1_mmu_shutdown,
@@ -341,5 +349,6 @@ struct omap_mmu_ops omap1_mmu_ops = {
        .cam_ram_alloc  = omap1_mmu_cam_ram_alloc,
        .cam_ram_valid  = omap1_mmu_cam_ram_valid,
        .interrupt      = omap1_mmu_interrupt,
+       .pte_get_attr   = omap1_mmu_pte_get_attr,
 };
 EXPORT_SYMBOL_GPL(omap1_mmu_ops);