From: Jayachandran C <jayachandranc@netlogicmicro.com>
To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 1/8] Netlogic XLR/XLS processor IDs.
Date: Fri, 22 Apr 2011 22:31:03 +0530 [thread overview]
Message-ID: <c706631699d2c9365010f8831c5ad071a1ba4a5e.1303487516.git.jayachandranc@netlogicmicro.com> (raw)
In-Reply-To: <cover.1303487516.git.jayachandranc@netlogicmicro.com>
Add Netlogic Microsystems company ID and processor IDs for XLR
and XLS processors for CPU probe. Add CPU_XLR to cpu_type_enum.
Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
---
arch/mips/include/asm/cpu.h | 27 ++++++++++++++++++++
arch/mips/kernel/cpu-probe.c | 55 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 8687753..34c0d3c 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -33,6 +33,7 @@
#define PRID_COMP_TOSHIBA 0x070000
#define PRID_COMP_LSI 0x080000
#define PRID_COMP_LEXRA 0x0b0000
+#define PRID_COMP_NETLOGIC 0x0c0000
#define PRID_COMP_CAVIUM 0x0d0000
#define PRID_COMP_INGENIC 0xd00000
@@ -142,6 +143,31 @@
#define PRID_IMP_JZRISC 0x0200
/*
+ * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC
+ */
+#define PRID_IMP_NETLOGIC_XLR732 0x0000
+#define PRID_IMP_NETLOGIC_XLR716 0x0200
+#define PRID_IMP_NETLOGIC_XLR532 0x0900
+#define PRID_IMP_NETLOGIC_XLR308 0x0600
+#define PRID_IMP_NETLOGIC_XLR532C 0x0800
+#define PRID_IMP_NETLOGIC_XLR516C 0x0a00
+#define PRID_IMP_NETLOGIC_XLR508C 0x0b00
+#define PRID_IMP_NETLOGIC_XLR308C 0x0f00
+#define PRID_IMP_NETLOGIC_XLS608 0x8000
+#define PRID_IMP_NETLOGIC_XLS408 0x8800
+#define PRID_IMP_NETLOGIC_XLS404 0x8c00
+#define PRID_IMP_NETLOGIC_XLS208 0x8e00
+#define PRID_IMP_NETLOGIC_XLS204 0x8f00
+#define PRID_IMP_NETLOGIC_XLS108 0xce00
+#define PRID_IMP_NETLOGIC_XLS104 0xcf00
+#define PRID_IMP_NETLOGIC_XLS616B 0x4000
+#define PRID_IMP_NETLOGIC_XLS608B 0x4a00
+#define PRID_IMP_NETLOGIC_XLS416B 0x4400
+#define PRID_IMP_NETLOGIC_XLS412B 0x4c00
+#define PRID_IMP_NETLOGIC_XLS408B 0x4e00
+#define PRID_IMP_NETLOGIC_XLS404B 0x4f00
+
+/*
* Definitions for 7:0 on legacy processors
*/
@@ -234,6 +260,7 @@ enum cpu_type_enum {
*/
CPU_5KC, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2,
CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, CPU_CAVIUM_OCTEON2,
+ CPU_XLR,
CPU_LAST
};
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index f65d4c8..130aa7a 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -988,6 +988,59 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
}
}
+static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
+{
+ decode_configs(c);
+
+ c->options = (MIPS_CPU_TLB |
+ MIPS_CPU_4KEX |
+ MIPS_CPU_COUNTER |
+ MIPS_CPU_DIVEC |
+ MIPS_CPU_WATCH |
+ MIPS_CPU_EJTAG |
+ MIPS_CPU_LLSC);
+
+ switch (c->processor_id & 0xff00) {
+ case PRID_IMP_NETLOGIC_XLR732:
+ case PRID_IMP_NETLOGIC_XLR716:
+ case PRID_IMP_NETLOGIC_XLR532:
+ case PRID_IMP_NETLOGIC_XLR308:
+ case PRID_IMP_NETLOGIC_XLR532C:
+ case PRID_IMP_NETLOGIC_XLR516C:
+ case PRID_IMP_NETLOGIC_XLR508C:
+ case PRID_IMP_NETLOGIC_XLR308C:
+ c->cputype = CPU_XLR;
+ __cpu_name[cpu] = "Netlogic XLR";
+ break;
+
+ case PRID_IMP_NETLOGIC_XLS608:
+ case PRID_IMP_NETLOGIC_XLS408:
+ case PRID_IMP_NETLOGIC_XLS404:
+ case PRID_IMP_NETLOGIC_XLS208:
+ case PRID_IMP_NETLOGIC_XLS204:
+ case PRID_IMP_NETLOGIC_XLS108:
+ case PRID_IMP_NETLOGIC_XLS104:
+ case PRID_IMP_NETLOGIC_XLS616B:
+ case PRID_IMP_NETLOGIC_XLS608B:
+ case PRID_IMP_NETLOGIC_XLS416B:
+ case PRID_IMP_NETLOGIC_XLS412B:
+ case PRID_IMP_NETLOGIC_XLS408B:
+ case PRID_IMP_NETLOGIC_XLS404B:
+ c->cputype = CPU_XLR;
+ __cpu_name[cpu] = "Netlogic XLS";
+ break;
+
+ default:
+ printk(KERN_INFO "Unknown Netlogic chip id [%02x]!\n",
+ c->processor_id);
+ c->cputype = CPU_XLR;
+ break;
+ }
+
+ c->isa_level = MIPS_CPU_ISA_M64R1;
+ c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1;
+}
+
#ifdef CONFIG_64BIT
/* For use by uaccess.h */
u64 __ua_limit;
@@ -1034,6 +1087,8 @@ __cpuinit void cpu_probe(void)
break;
case PRID_COMP_INGENIC:
cpu_probe_ingenic(c, cpu);
+ case PRID_COMP_NETLOGIC:
+ cpu_probe_netlogic(c, cpu);
break;
}
--
1.7.1
--
Jayachandran C.
jayachandranc@netlogicmicro.com (Netlogic Microsystems)
next prev parent reply other threads:[~2011-04-22 16:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 17:00 [PATCH 0/8] Support for Netlogic XLR/XLS processors Jayachandran C
2011-04-22 17:01 ` Jayachandran C [this message]
2011-04-22 17:01 ` [PATCH 2/8] mach-netlogic include directory and files Jayachandran C
2011-04-22 17:01 ` [PATCH 3/8] Cache support, TLB support, asm/module.h entry Jayachandran C
2011-04-22 17:01 ` [PATCH 4/8] Platform files for XLR/XLS processor support Jayachandran C
2011-04-22 17:02 ` [PATCH 5/8] Kconfig and Makefile update for Netlogic XLR/XLS Jayachandran C
2011-04-22 17:02 ` [PATCH 6/8] Add default configuration for XLR/XLS processors Jayachandran C
2011-04-22 17:02 ` [PATCH 7/8] USB support for XLS platforms Jayachandran C
2011-04-22 17:03 ` Manuel Lauss
2011-04-25 10:51 ` Jayachandran C.
2011-04-25 11:21 ` [PATCH 7/8, UPDATED] PCI support for XLR/XLS Jayachandran C.
2011-04-22 17:03 ` [PATCH 8/8] " Jayachandran C
2011-04-25 11:23 ` [PATCH 8/8, UPDATED] USB support for XLS platforms Jayachandran C.
2011-05-06 20:05 [PATCH 0/8] Support for Netlogic XLR/XLS processors Jayachandran C
2011-05-06 20:05 ` [PATCH 1/8] Netlogic XLR/XLS processor IDs Jayachandran C
2011-04-21 21:28 ` Jayachandran C
2011-05-11 6:20 ` Jayachandran C.
2011-05-11 16:52 ` Ralf Baechle
2011-05-11 16:53 ` Ralf Baechle
2011-05-11 17:01 ` Jayachandran C.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c706631699d2c9365010f8831c5ad071a1ba4a5e.1303487516.git.jayachandranc@netlogicmicro.com \
--to=jayachandranc@netlogicmicro.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.