Also be less restrictive regarding Loongson 2, because these strings seem to be rather volatile: http://www.linux-mips.org/archives/linux-mips/2013-04/msg00179.html http://www.loongson.cn/dev/gitweb/?p=linux-loongson-all;a=history;f=arch/mip...
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at ---
Let's pretend I know what I am doing here... if I read the chinese data sheets correctly then Loongson-3B has moved to use SPI primarily for its firmware but there is always a chipset attached too... In any case I would rather not touch it yet. 3A OTOH seems to be more similar to Loongson-2 so this might actually work.
This patch applies w/o conflicts to r1565 and later.
processor_enable.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/processor_enable.c b/processor_enable.c index 1361dd5..92c6b18 100644 --- a/processor_enable.c +++ b/processor_enable.c @@ -58,8 +58,9 @@ static int is_loongson(void) while (*ptr && isspace((unsigned char)*ptr)) ptr++; fclose(cpuinfo); - return (strncmp(ptr, "ICT Loongson-2 V0.3", strlen("ICT Loongson-2 V0.3")) == 0) || - (strncmp(ptr, "Godson2 V0.3 FPU V0.1", strlen("Godson2 V0.3 FPU V0.1")) == 0); + return (strncmp(ptr, "ICT Loongson-2", strlen("ICT Loongson-2")) == 0) || + (strncmp(ptr, "Godson2 V0.3 FPU V0.1", strlen("Godson2 V0.3 FPU V0.1")) == 0) || + (strncmp(ptr, "ICT Loongson-3A", strlen("ICT Loongson-3A")) == 0); } fclose(cpuinfo); return 0;