提交 92fcdc9d 编写于 作者: S Sascha Hauer

ARM i.MX51: return gracefully on different socs

Code called from an initcall can be maybe called for
machines it's not intended for. So check for valid
machines and return gracefully if an incompatible machine
is found.
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
上级 8bffb77e
...@@ -79,6 +79,9 @@ EXPORT_SYMBOL(mx51_revision); ...@@ -79,6 +79,9 @@ EXPORT_SYMBOL(mx51_revision);
*/ */
static int __init mx51_neon_fixup(void) static int __init mx51_neon_fixup(void)
{ {
if (!cpu_is_mx51())
return 0;
if (mx51_revision() < MX51_CHIP_REV_3_0 && (elf_hwcap & HWCAP_NEON)) { if (mx51_revision() < MX51_CHIP_REV_3_0 && (elf_hwcap & HWCAP_NEON)) {
elf_hwcap &= ~HWCAP_NEON; elf_hwcap &= ~HWCAP_NEON;
pr_info("Turning off NEON support, detected broken NEON implementation\n"); pr_info("Turning off NEON support, detected broken NEON implementation\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册