Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[sfrench/cifs-2.6.git] / arch / arm / mach-mx5 / cpu.c
index 2d37785e3857d32575a5948f36574e4770a0b917..eaacb6e9b5d0b417d0b78d56a8ebb406cb8ee9cd 100644 (file)
@@ -70,6 +70,25 @@ int mx51_revision(void)
 }
 EXPORT_SYMBOL(mx51_revision);
 
+#ifdef CONFIG_NEON
+
+/*
+ * All versions of the silicon before Rev. 3 have broken NEON implementations.
+ * Dependent on link order - so the assumption is that vfp_init is called
+ * before us.
+ */
+static int __init mx51_neon_fixup(void)
+{
+       if (mx51_revision() < MX51_CHIP_REV_3_0 && (elf_hwcap & HWCAP_NEON)) {
+               elf_hwcap &= ~HWCAP_NEON;
+               pr_info("Turning off NEON support, detected broken NEON implementation\n");
+       }
+       return 0;
+}
+
+late_initcall(mx51_neon_fixup);
+#endif
+
 static int __init post_cpu_init(void)
 {
        unsigned int reg;