Skip to content

Commit

Permalink
MIPS: cpu-probe: Fix FPU detection on Ingenic JZ4760(B)
Browse files Browse the repository at this point in the history
[ Upstream commit fc52f92 ]

Ingenic JZ4760 and JZ4760B do have a FPU, but the config registers don't
report it. Force the FPU detection in case the processor ID match the
JZ4760(B) one.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
pcercuei authored and gregkh committed Jul 19, 2021
1 parent 8853d2c commit 181bc6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/mips/kernel/cpu-probe.c
Expand Up @@ -1840,6 +1840,11 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
*/
case PRID_COMP_INGENIC_D0:
c->isa_level &= ~MIPS_CPU_ISA_M32R2;

/* FPU is not properly detected on JZ4760(B). */
if (c->processor_id == 0x2ed0024f)
c->options |= MIPS_CPU_FPU;

fallthrough;

/*
Expand Down

0 comments on commit 181bc6b

Please sign in to comment.