From a58c4a79055393412f73487584ab97602be1a547 Mon Sep 17 00:00:00 2001 From: Amit Kucheria Date: Wed, 1 Sep 2010 22:49:13 +0300 Subject: [PATCH] --- yaml --- r: 212478 b: refs/heads/master c: 33d7c5c1c808ea47d85630ac2dd98490d7df0ff4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-mx5/cpu.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 87c13402ba7a..ea52c436d97e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c62d0f2ac18d38265ccf0e821e6afee60a0c89b5 +refs/heads/master: 33d7c5c1c808ea47d85630ac2dd98490d7df0ff4 diff --git a/trunk/arch/arm/mach-mx5/cpu.c b/trunk/arch/arm/mach-mx5/cpu.c index 2d37785e3857..eaacb6e9b5d0 100644 --- a/trunk/arch/arm/mach-mx5/cpu.c +++ b/trunk/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;