MIPS: Add core files for MIPS SEAD-3 development platform.
PATCH v2 1/10 MIPS: Add core files for MIPS SEAD-3 development platform.
From: "Steven J. Hill" <[email protected]>
More information about the SEAD-3 platform can be found at
<http://www.mips.com/products/development-kits/mips-sead-3/>
on MTI's site. Currently, the M14K family of cores is what the SEAD-3 is utilised with.
--- .../include/asm/mach-sead3/cpu-feature-overrides.h | 72 ++++ arch/mips/include/asm/mach-sead3/irq.h | 9 + .../include/asm/mach-sead3/kernel-entry-init.h | 52 +++ arch/mips/include/asm/mach-sead3/war.h | 25 ++ arch/mips/include/asm/mips-boards/sead3int.h | 67 +++ arch/mips/mti-sead3/Makefile | 24 ++ arch/mips/mti-sead3/Platform | 7 + arch/mips/mti-sead3/leds-sead3.c | 133 ++++++ arch/mips/mti-sead3/sead3-cmdline.c | 59 +++ arch/mips/mti-sead3/sead3-console.c | 52 +++ arch/mips/mti-sead3/sead3-display.c | 90 ++++ arch/mips/mti-sead3/sead3-ehci.c | 52 +++ arch/mips/mti-sead3/sead3-i2c-dev.c | 38 ++ arch/mips/mti-sead3/sead3-i2c.c | 42 ++ arch/mips/mti-sead3/sead3-init.c | 244 +++++++++++ arch/mips/mti-sead3/sead3-int.c | 146 +++++++ arch/mips/mti-sead3/sead3-lcd.c | 55 +++ arch/mips/mti-sead3/sead3-leds.c | 91 ++++ arch/mips/mti-sead3/sead3-memory.c | 178 ++++++++ arch/mips/mti-sead3/sead3-mtd.c | 58 +++ arch/mips/mti-sead3/sead3-net.c | 56 +++ arch/mips/mti-sead3/sead3-pic32-bus.c | 112 +++++ arch/mips/mti-sead3/sead3-pic32-i2c-drv.c | 441 ++++++++++++++++++++ arch/mips/mti-sead3/sead3-platform.c | 49 +++ arch/mips/mti-sead3/sead3-reset.c | 64 +++ arch/mips/mti-sead3/sead3-setup.c | 49 +++ arch/mips/mti-sead3/sead3-smtc.c | 162 +++++++ arch/mips/mti-sead3/sead3-time.c | 145 +++++++ 28 files changed, 2572 insertions(+) create mode 100644 arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h create mode 100644 arch/mips/include/asm/mach-sead3/irq.h create mode 100644 arch/mips/include/asm/mach-sead3/kernel-entry-init.h create mode 100644 arch/mips/include/asm/mach-sead3/war.h create mode 100644 arch/mips/include/asm/mips-boards/sead3int.h create mode 100644 arch/mips/mti-sead3/Makefile create mode 100644 arch/mips/mti-sead3/Platform create mode 100644 arch/mips/mti-sead3/leds-sead3.c create mode 100644 arch/mips/mti-sead3/sead3-cmdline.c create mode 100644 arch/mips/mti-sead3/sead3-console.c create mode 100644 arch/mips/mti-sead3/sead3-display.c create mode 100644 arch/mips/mti-sead3/sead3-ehci.c create mode 100644 arch/mips/mti-sead3/sead3-i2c-dev.c create mode 100644 arch/mips/mti-sead3/sead3-i2c.c create mode 100644 arch/mips/mti-sead3/sead3-init.c create mode 100644 arch/mips/mti-sead3/sead3-int.c create mode 100644 arch/mips/mti-sead3/sead3-lcd.c create mode 100644 arch/mips/mti-sead3/sead3-leds.c create mode 100644 arch/mips/mti-sead3/sead3-memory.c create mode 100644 arch/mips/mti-sead3/sead3-mtd.c create mode 100644 arch/mips/mti-sead3/sead3-net.c create mode 100644 arch/mips/mti-sead3/sead3-pic32-bus.c create mode 100644 arch/mips/mti-sead3/sead3-pic32-i2c-drv.c create mode 100644 arch/mips/mti-sead3/sead3-platform.c create mode 100644 arch/mips/mti-sead3/sead3-reset.c create mode 100644 arch/mips/mti-sead3/sead3-setup.c create mode 100644 arch/mips/mti-sead3/sead3-smtc.c create mode 100644 arch/mips/mti-sead3/sead3-time.c
arch/mips/include/asm/mach-sead3/cpu-feature-overrides.h new file +72 -0
@@ -0,0 +1,72 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2003, 2004 Chris Dearman +* Copyright (C) 2005 Ralf Baechle ([email protected]) +*/ +#ifndef __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H +#define __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H + + +/* +* CPU feature overrides for MIPS boards +*/ +#ifdef CONFIG_CPU_MIPS32 +#define cpu_has_tlb 1 +#define cpu_has_4kex 1 +#define cpu_has_4k_cache 1 +/* #define cpu_has_fpu ? */ +/* #define cpu_has_32fpr ? */ +#define cpu_has_counter 1 +/* #define cpu_has_watch ? */ +#define cpu_has_divec 1 +#define cpu_has_vce 0 +/* #define cpu_has_cache_cdex_p ? */ +/* #define cpu_has_cache_cdex_s ? */ +/* #define cpu_has_prefetch ? */ +#define cpu_has_mcheck 1 +/* #define cpu_has_ejtag ? */ +#ifdef CONFIG_CPU_HAS_LLSC +#define cpu_has_llsc 1 +#else +#define cpu_has_llsc 0 +#endif +/* #define cpu_has_vtag_icache ? */ +/* #define cpu_has_dc_aliases ? */ +/* #define cpu_has_ic_fills_f_dc ? */ +#define cpu_has_nofpuex 0 +/* #define cpu_has_64bits ? */ +/* #define cpu_has_64bit_zero_reg ? */ +/* #define cpu_has_inclusive_pcaches ? */ +#define cpu_icache_snoops_remote_store 1 +#endif + +#ifdef CONFIG_CPU_MIPS64 +#define cpu_has_tlb 1 +#define cpu_has_4kex 1 +#define cpu_has_4k_cache 1 +/* #define cpu_has_fpu ? */ +/* #define cpu_has_32fpr ? */ +#define cpu_has_counter 1 +/* #define cpu_has_watch ? */ +#define cpu_has_divec 1 +#define cpu_has_vce 0 +/* #define cpu_has_cache_cdex_p ? */ +/* #define cpu_has_cache_cdex_s ? */ +/* #define cpu_has_prefetch ? */ +#define cpu_has_mcheck 1 +/* #define cpu_has_ejtag ? */ +#define cpu_has_llsc 1 +/* #define cpu_has_vtag_icache ? */ +/* #define cpu_has_dc_aliases ? */ +/* #define cpu_has_ic_fills_f_dc ? */ +#define cpu_has_nofpuex 0 +/* #define cpu_has_64bits ? */ +/* #define cpu_has_64bit_zero_reg ? */ +/* #define cpu_has_inclusive_pcaches ? */ +#define cpu_icache_snoops_remote_store 1 +#endif + +#endif /* __ASM_MACH_MIPS_CPU_FEATURE_OVERRIDES_H */
arch/mips/include/asm/mach-sead3/irq.h new file +9 -0
@@ -0,0 +1,9 @@ +#ifndef __ASM_MACH_MIPS_IRQ_H +#define __ASM_MACH_MIPS_IRQ_H + +#define NR_IRQS 256 + + +#include_next <irq.h> + +#endif /* __ASM_MACH_MIPS_IRQ_H */
arch/mips/include/asm/mach-sead3/kernel-entry-init.h new file +52 -0
52 lines not on this page · raw message
arch/mips/include/asm/mach-sead3/war.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2002, 2004, 2007 by Ralf Baechle <[email protected]> +*/ +#ifndef __ASM_MIPS_MACH_MIPS_WAR_H +#define __ASM_MIPS_MACH_MIPS_WAR_H + +#define R4600_V1_INDEX_ICACHEOP_WAR 0 +#define R4600_V1_HIT_CACHEOP_WAR 0 +#define R4600_V2_HIT_CACHEOP_WAR 0 +#define R5432_CP0_INTERRUPT_WAR 0 +#define BCM1250_M3_WAR 0 +#define SIBYTE_1956_WAR 0 +#define MIPS4K_ICACHE_REFILL_WAR 1 +#define MIPS_CACHE_SYNC_WAR 1 +#define TX49XX_ICACHE_INDEX_INV_WAR 0 +#define RM9000_CDEX_SMP_WAR 0 +#define ICACHE_REFILLS_WORKAROUND_WAR 1 +#define R10000_LLSC_WAR 0 +#define MIPS34K_MISSED_ITLB_WAR 0 + +#endif /* __ASM_MIPS_MACH_MIPS_WAR_H */
arch/mips/include/asm/mips-boards/sead3int.h new file +67 -0
67 lines not on this page · raw message
arch/mips/mti-sead3/Makefile new file +24 -0
@@ -0,0 +1,24 @@ +# +# Carsten Langgaard, [email protected] +# Copyright (C) 1999,2000 MIPS Technologies, Inc. All rights reserved. +# +# Copyright (C) 2008 Wind River Systems, Inc. +# written by Ralf Baechle <[email protected]> +# +obj-y := sead3-lcd.o sead3-cmdline.o \ + sead3-display.o sead3-init.o sead3-int.o \ + sead3-mtd.o sead3-net.o \ + sead3-memory.o sead3-platform.o \ + sead3-reset.o sead3-setup.o sead3-time.o + +obj-y += sead3-i2c-dev.o sead3-i2c.o \ + sead3-pic32-i2c-drv.o sead3-pic32-bus.o \ + leds-sead3.o sead3-leds.o + +obj-$(CONFIG_EARLY_PRINTK) += sead3-console.o +obj-$(CONFIG_USB_EHCI_HCD) += sead3-ehci.o + +# FIXME +obj-$(CONFIG_MIPS_MT_SMTC) += sead3-smtc.o + +EXTRA_CFLAGS += -Werror
arch/mips/mti-sead3/Platform new file +7 -0
@@ -0,0 +1,7 @@ +# +# MIPS Sead3 board +# +platform-$(CONFIG_MIPS_SEAD3) += mti-sead3/ +cflags-$(CONFIG_MIPS_SEAD3) += -I$(srctree)/arch/mips/include/asm/mach-sead3 +load-$(CONFIG_MIPS_SEAD3) += 0xffffffff80100000 +all-$(CONFIG_MIPS_SEAD3) := $(COMPRESSION_FNAME).srec
arch/mips/mti-sead3/leds-sead3.c new file +133 -0
133 lines not on this page · raw message
arch/mips/mti-sead3/sead3-cmdline.c new file +59 -0
59 lines not on this page · raw message
arch/mips/mti-sead3/sead3-console.c new file +52 -0
52 lines not on this page · raw message
arch/mips/mti-sead3/sead3-display.c new file +90 -0
90 lines not on this page · raw message
arch/mips/mti-sead3/sead3-ehci.c new file +52 -0
52 lines not on this page · raw message
arch/mips/mti-sead3/sead3-i2c-dev.c new file +38 -0
@@ -0,0 +1,38 @@ +#define DEBUG +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +*/ + +#include <linux/i2c.h> +#include <linux/init.h> +#include <linux/kernel.h> + +static struct i2c_board_info sead3_i2c_info2[]__initdata = { + { +I2C_BOARD_INFO ("adt7476" ,0x2c ), + .irq =0 , + }, + { +I2C_BOARD_INFO ("m41t80" ,0x68 ), + .irq =0 , + }, +}; + +static int __init sead3_i2c_init (void ) +{ +int err; + +pr_debug ("sead3_i2c_init\n" ); + + err =i2c_register_board_info (2 , sead3_i2c_info2, +ARRAY_SIZE (sead3_i2c_info2)); +if (err <0 ) +printk (KERN_ERR +"sead3-i2c-dev: cannot register board I2C devices\n" ); +return err; +} + +arch_initcall (sead3_i2c_init);
arch/mips/mti-sead3/sead3-i2c.c new file +42 -0
42 lines not on this page · raw message
arch/mips/mti-sead3/sead3-init.c new file +244 -0
244 lines not on this page · raw message
arch/mips/mti-sead3/sead3-int.c new file +146 -0
146 lines not on this page · raw message
arch/mips/mti-sead3/sead3-lcd.c new file +55 -0
55 lines not on this page · raw message
arch/mips/mti-sead3/sead3-leds.c new file +91 -0
91 lines not on this page · raw message
arch/mips/mti-sead3/sead3-memory.c new file +178 -0
178 lines not on this page · raw message
arch/mips/mti-sead3/sead3-mtd.c new file +58 -0
58 lines not on this page · raw message
arch/mips/mti-sead3/sead3-net.c new file +56 -0
56 lines not on this page · raw message
arch/mips/mti-sead3/sead3-pic32-bus.c new file +112 -0
112 lines not on this page · raw message
arch/mips/mti-sead3/sead3-pic32-i2c-drv.c new file +441 -0
441 lines not on this page · raw message
arch/mips/mti-sead3/sead3-platform.c new file +49 -0
49 lines not on this page · raw message
arch/mips/mti-sead3/sead3-reset.c new file +64 -0
64 lines not on this page · raw message
arch/mips/mti-sead3/sead3-setup.c new file +49 -0
49 lines not on this page · raw message
arch/mips/mti-sead3/sead3-smtc.c new file +162 -0
162 lines not on this page · raw message
arch/mips/mti-sead3/sead3-time.c new file +145 -0
145 lines not on this page · raw message
Signature · 1 line
1.7.9.6
PATCH v2 3/10 MIPS: Add support for the M14K core.
From: "Steven J. Hill" <[email protected]>
This patch depends on the 1074K core support patch being applied first.
--- arch/mips/include/asm/cpu.h | 5 +++-- arch/mips/kernel/cpu-probe.c | 8 +++++++- arch/mips/mm/c-r4k.c | 1 + arch/mips/mm/tlbex.c | 4 +++- arch/mips/oprofile/common.c | 1 + arch/mips/oprofile/op_model_mipsxx.c | 4 ++++ 6 files changed, 19 insertions(+), 4 deletions(-)
arch/mips/include/asm/cpu.h +3 -2
@@ -95,6 +95,7 @@#define PRID_IMP_74K 0x9700#define PRID_IMP_1004K 0x9900#define PRID_IMP_1074K 0x9a00 +#define PRID_IMP_14K 0x9c00/* * These are the PRID's for when 23:16 == PRID_COMP_SIBYTE
@@ -261,7 +262,7 @@ enum cpu_type_enum {*/ CPU_4KC ,CPU_4KEC ,CPU_4KSC ,CPU_24K ,CPU_34K ,CPU_1004K ,CPU_74K ,CPU_ALCHEMY ,CPU_PR4450 ,CPU_BMIPS32 ,CPU_BMIPS3300 ,CPU_BMIPS4350 , -CPU_BMIPS4380 ,CPU_BMIPS5000 ,CPU_JZRISC ,CPU_1074K , +CPU_BMIPS4380 ,CPU_BMIPS5000 ,CPU_JZRISC ,CPU_1074K ,CPU_14K ,/* * MIPS64 class processors
@@ -289,7 +290,7 @@ enum cpu_type_enum {#define MIPS_CPU_ISA_M64R2 0x00000100#define MIPS_CPU_ISA_32BIT (MIPS_CPU_ISA_I | MIPS_CPU_ISA_II | \ - MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M32R2 ) + MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M32R2)#define MIPS_CPU_ISA_64BIT (MIPS_CPU_ISA_III | MIPS_CPU_ISA_IV | \ MIPS_CPU_ISA_V | MIPS_CPU_ISA_M64R1 | MIPS_CPU_ISA_M64R2)
arch/mips/kernel/cpu-probe.c +7 -1
@@ -4,7 +4,7 @@* Copyright (C) xxxx the Anonymous * Copyright (C) 1994 - 2006 Ralf Baechle * Copyright (C) 2003, 2004 Maciej W. Rozycki -* Copyright (C) 2001, 2004 MIPS Inc. +* Copyright (C) 2001, 2004, 2011 MIPS Technologies, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License
@@ -22,6 +22,7 @@#include <asm/cpu.h> #include <asm/fpu.h> #include <asm/mipsregs.h> +#include <asm/system.h> #include <asm/watch.h> #include <asm/elf.h> #include <asm/spram.h>
@@ -199,6 +200,7 @@ void __init check_wait(void) cpu_wait = rm7k_wait_irqoff;break ; +case CPU_14K :case CPU_24K :case CPU_34K :case CPU_1004K :
@@ -832,6 +834,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) c->cputype =CPU_74K ; __cpu_name[cpu] ="MIPS 74Kc" ;break ; +case PRID_IMP_14K : + c->cputype =CPU_14K ; + __cpu_name[cpu] ="MIPS 14Kc" ; +break ;case PRID_IMP_1004K : c->cputype =CPU_1004K ; __cpu_name[cpu] ="MIPS 1004Kc" ;
arch/mips/mm/c-r4k.c +1 -0
@@ -1073,6 +1073,7 @@ static void __cpuinit probe_pcache(void)/* fall through */ bypass1074: ; +case CPU_14K :case CPU_24K :case CPU_34K :case CPU_1004K :
arch/mips/mm/tlbex.c +3 -1
@@ -8,7 +8,8 @@* Copyright (C) 2004, 2005, 2006, 2008 Thiemo Seufer * Copyright (C) 2005, 2007, 2008, 2009 Maciej W. Rozycki * Copyright (C) 2006 Ralf Baechle ([email protected]) -* Copyright (C) 2008, 2009 Cavium Networks, Inc. +* Copyright (C) 2008, 2009 Cavium Networks, Inc. +* Copyright (C) 2011 MIPS Technologies, Inc. * * ... and the days got worse and worse and now you see * I've gone completly out of my mind.
@@ -494,6 +495,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,case CPU_R14000 :case CPU_4KC :case CPU_4KEC : +case CPU_14K :case CPU_SB1 :case CPU_SB1A :case CPU_4KSC :
arch/mips/oprofile/common.c +1 -0
@@ -78,6 +78,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)switch (current_cpu_type ()) {case CPU_5KC : +case CPU_14K :case CPU_20KC :case CPU_24K :case CPU_25KF :
arch/mips/oprofile/op_model_mipsxx.c +4 -0
@@ -317,6 +317,10 @@ static int __init mipsxx_init(void) op_model_mipsxx_ops.num_counters = counters;switch (current_cpu_type ()) { +case CPU_14K : + op_model_mipsxx_ops.cpu_type ="mips/14K" ; +break ; +case CPU_20KC : op_model_mipsxx_ops.cpu_type ="mips/20K" ;break ;
Signature · 1 line
1.7.9.6
PATCH v2 6/10 MIPS: Code formatting fixes.
In reply to Steven J. HillFrom: "Steven J. Hill" <[email protected]>
--- arch/mips/kernel/cpu-probe.c | 54 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 27 deletions(-)
arch/mips/kernel/cpu-probe.c +27 -27
@@ -343,7 +343,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R2000" ; c->isa_level =MIPS_CPU_ISA_I ; c->options =MIPS_CPU_TLB |MIPS_CPU_3K_CACHE | -MIPS_CPU_NOFPUEX ; +MIPS_CPU_NOFPUEX ;if (__cpu_has_fpu ()) c->options |=MIPS_CPU_FPU ; c->tlbsize =64 ;
@@ -364,7 +364,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) } c->isa_level =MIPS_CPU_ISA_I ; c->options =MIPS_CPU_TLB |MIPS_CPU_3K_CACHE | -MIPS_CPU_NOFPUEX ; +MIPS_CPU_NOFPUEX ;if (__cpu_has_fpu ()) c->options |=MIPS_CPU_FPU ; c->tlbsize =64 ;
@@ -390,8 +390,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) c->isa_level =MIPS_CPU_ISA_III ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_WATCH |MIPS_CPU_VCE | -MIPS_CPU_LLSC ; +MIPS_CPU_WATCH |MIPS_CPU_VCE | +MIPS_CPU_LLSC ; c->tlbsize =48 ;break ;case PRID_IMP_VR41XX :
@@ -437,7 +437,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R4300" ; c->isa_level =MIPS_CPU_ISA_III ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =32 ;break ;case PRID_IMP_R4600 :
@@ -449,7 +449,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) c->tlbsize =48 ;break ;#if 0 -case PRID_IMP_R4650 : +case PRID_IMP_R4650 :/* * This processor doesn't have an MMU, so it's not * "real easy" to run Linux on it. It is left purely
@@ -458,9 +458,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)*/ c->cputype =CPU_R4650 ; __cpu_name[cpu] ="R4650" ; - c->isa_level =MIPS_CPU_ISA_III ; + c->isa_level =MIPS_CPU_ISA_III ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_LLSC ; - c->tlbsize =48 ; + c->tlbsize =48 ;break ;#endif case PRID_IMP_TX39 :
@@ -491,7 +491,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R4700" ; c->isa_level =MIPS_CPU_ISA_III ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =48 ;break ;case PRID_IMP_TX49 :
@@ -508,7 +508,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R5000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =48 ;break ;case PRID_IMP_R5432 :
@@ -516,7 +516,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R5432" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_WATCH |MIPS_CPU_LLSC ; +MIPS_CPU_WATCH |MIPS_CPU_LLSC ; c->tlbsize =48 ;break ;case PRID_IMP_R5500 :
@@ -524,7 +524,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R5500" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_WATCH |MIPS_CPU_LLSC ; +MIPS_CPU_WATCH |MIPS_CPU_LLSC ; c->tlbsize =48 ;break ;case PRID_IMP_NEVADA :
@@ -532,7 +532,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="Nevada" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_DIVEC |MIPS_CPU_LLSC ; +MIPS_CPU_DIVEC |MIPS_CPU_LLSC ; c->tlbsize =48 ;break ;case PRID_IMP_R6000 :
@@ -540,7 +540,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R6000" ; c->isa_level =MIPS_CPU_ISA_II ; c->options =MIPS_CPU_TLB |MIPS_CPU_FPU | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =32 ;break ;case PRID_IMP_R6000A :
@@ -548,7 +548,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R6000A" ; c->isa_level =MIPS_CPU_ISA_II ; c->options =MIPS_CPU_TLB |MIPS_CPU_FPU | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =32 ;break ;case PRID_IMP_RM7000 :
@@ -556,7 +556,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="RM7000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ;/* * Undocumented RM7000: Bit 29 in the info register of * the RM7000 v2.0 indicates if the TLB has 48 or 64
@@ -572,7 +572,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="RM9000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =R4K_OPTS |MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ;/* * Bit 29 in the info register of the RM9000 * indicates if the TLB has 48 or 64 entries.
@@ -587,8 +587,8 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="RM8000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =MIPS_CPU_TLB |MIPS_CPU_4KEX | -MIPS_CPU_FPU |MIPS_CPU_32FPR | -MIPS_CPU_LLSC ; +MIPS_CPU_FPU |MIPS_CPU_32FPR | +MIPS_CPU_LLSC ; c->tlbsize =384 ;/* has weird TLB: 3-way x 128 */ break ;case PRID_IMP_R10000 :
@@ -596,9 +596,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R10000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =MIPS_CPU_TLB |MIPS_CPU_4K_CACHE |MIPS_CPU_4KEX | -MIPS_CPU_FPU |MIPS_CPU_32FPR | +MIPS_CPU_FPU |MIPS_CPU_32FPR |MIPS_CPU_COUNTER |MIPS_CPU_WATCH | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =64 ;break ;case PRID_IMP_R12000 :
@@ -606,9 +606,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R12000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =MIPS_CPU_TLB |MIPS_CPU_4K_CACHE |MIPS_CPU_4KEX | -MIPS_CPU_FPU |MIPS_CPU_32FPR | +MIPS_CPU_FPU |MIPS_CPU_32FPR |MIPS_CPU_COUNTER |MIPS_CPU_WATCH | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =64 ;break ;case PRID_IMP_R14000 :
@@ -616,9 +616,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) __cpu_name[cpu] ="R14000" ; c->isa_level =MIPS_CPU_ISA_IV ; c->options =MIPS_CPU_TLB |MIPS_CPU_4K_CACHE |MIPS_CPU_4KEX | -MIPS_CPU_FPU |MIPS_CPU_32FPR | +MIPS_CPU_FPU |MIPS_CPU_32FPR |MIPS_CPU_COUNTER |MIPS_CPU_WATCH | -MIPS_CPU_LLSC ; +MIPS_CPU_LLSC ; c->tlbsize =64 ;break ;case PRID_IMP_LOONGSON2 :
@@ -742,7 +742,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)if (config3 &MIPS_CONF3_VEIC ) c->options |=MIPS_CPU_VEIC ;if (config3 &MIPS_CONF3_MT ) - c->ases |=MIPS_ASE_MIPSMT ; + c->ases |=MIPS_ASE_MIPSMT ;if (config3 &MIPS_CONF3_ULRI ) c->options |=MIPS_CPU_ULRI ;
@@ -770,7 +770,7 @@ static void __cpuinit decode_configs(struct cpuinfo_mips *c)/* MIPS32 or MIPS64 compliant CPU. */ c->options =MIPS_CPU_4KEX |MIPS_CPU_4K_CACHE |MIPS_CPU_COUNTER | -MIPS_CPU_DIVEC |MIPS_CPU_LLSC |MIPS_CPU_MCHECK ; +MIPS_CPU_DIVEC |MIPS_CPU_LLSC |MIPS_CPU_MCHECK ; c->scache.flags =MIPS_CACHE_NOT_PRESENT ;
Signature · 1 line
1.7.9.6
Re: [PATCH v2,03/10] MIPS: Add support for the M14K core.
In reply to Steven J. Hillarch/mips/include/asm/cpu.h line 98
Quoted 9 lines · Steven J. Hill
arch/mips/include/asm/cpu.h +1
-0@@ -95,6 +95,7 @@#define PRID_IMP_74K 0x9700#define PRID_IMP_1004K 0x9900#define PRID_IMP_1074K 0x9a00 +#define PRID_IMP_14K 0x9c00
Here and all over this change -- shouldn't this be spelled M14K rather
than 14K just as for M4K vs 4K? I think pretending the M14K is a 14K will cause us unnecessary hassle if an actual 14K is ever made (there's some functional pattern in how the M4K compares to the 4K and then how the transition from the M4K to the M14K has been made; if the 4K RTL is ever ported to microMIPS support one might expect it to be called the 14K, so let's keep the name space clean).
Or actually this should even be PRID_IMP_M14KC (and likewise elsewhere
throughout) as the M14K has a different PRId -> 0x9b00. Let's keep the naming correct.
Maciej