summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/cpu.c
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@verdurent.com>2010-09-01 22:49:13 +0300
committerNicolas Pitre <nicolas.pitre@linaro.org>2010-10-01 22:26:38 -0400
commit33d7c5c1c808ea47d85630ac2dd98490d7df0ff4 (patch)
treea2f309098df9e509963e18f6aca9692251fb141b /arch/arm/mach-mx5/cpu.c
parentc62d0f2ac18d38265ccf0e821e6afee60a0c89b5 (diff)
downloadop-kernel-dev-33d7c5c1c808ea47d85630ac2dd98490d7df0ff4.zip
op-kernel-dev-33d7c5c1c808ea47d85630ac2dd98490d7df0ff4.tar.gz
ARM: mxc: turn off HWCAP_NEON for older versions of imx51 silicon
Versions of silicon older than TO3 have broken NEON implementation. Turn off NEON in such cases. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Tested-by: Dave Martin <dave.martin@linaro.org> Tested-by: Jason Hui <jason.hui@linaro.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/mach-mx5/cpu.c')
-rw-r--r--arch/arm/mach-mx5/cpu.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c
index 2d37785..eaacb6e 100644
--- a/arch/arm/mach-mx5/cpu.c
+++ b/arch/arm/mach-mx5/cpu.c
@@ -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;
OpenPOWER on IntegriCloud