Patch: Fix lpae on exynos5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes lpae on exynos5 arm processors.  LPAE is needed for
virt on arm processors.

--- arch/arm/mach-exynos/mach-exynos5-dt.c    2013-09-02 16:46:10.000000000 -0400
+++ arch/arm/mach-exynos/mach-exynos5-dt.c    2013-10-23 10:35:37.891255087 -0400
@@ -14,7 +14,7 @@
 #include <linux/memblock.h>
 #include <linux/io.h>
 #include <linux/clocksource.h>
-
+#include <linux/dma-mapping.h>
 #include <asm/mach/arch.h>
 #include <mach/regs-pmu.h>
 
@@ -23,6 +23,26 @@
 
 #include "common.h"
 
+static u64 dma_mask64 = DMA_BIT_MASK(64); 
+
+static int exynos5250_platform_notifier(struct notifier_block *nb,
+          unsigned long event, void *__dev)
+{
+  struct device *dev = __dev;
+
+  if (event != BUS_NOTIFY_ADD_DEVICE)
+    return NOTIFY_DONE;
+
+  dev->dma_mask = &dma_mask64;
+  dev->coherent_dma_mask = DMA_BIT_MASK(64);
+
+  return NOTIFY_OK;
+}
+
+static struct notifier_block exynos5250_platform_nb = {
+  .notifier_call = exynos5250_platform_notifier,
+}; 
+
 static void __init exynos5_dt_machine_init(void)
 {
     struct device_node *i2c_np;
@@ -46,6 +66,9 @@
             }
         }
     }
+    
+    if (of_machine_is_compatible("samsung,exynos5250"))
+       bus_register_notifier(&platform_bus_type, &exynos5250_platform_nb);
 
     of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 } 		 	   		  
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/kernel





[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux