diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/mips/au1000/common/cputable.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/mips/au1000/common/cputable.c')
-rw-r--r-- | arch/mips/au1000/common/cputable.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/mips/au1000/common/cputable.c b/arch/mips/au1000/common/cputable.c new file mode 100644 index 000000000000..f5521dfccfd6 --- /dev/null +++ b/arch/mips/au1000/common/cputable.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * arch/mips/au1000/common/cputable.c | ||
3 | * | ||
4 | * Copyright (C) 2004 Dan Malek (dan@embeddededge.com) | ||
5 | * Copied from PowerPC and updated for Alchemy Au1xxx processors. | ||
6 | * | ||
7 | * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * as published by the Free Software Foundation; either version | ||
12 | * 2 of the License, or (at your option) any later version. | ||
13 | */ | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/sched.h> | ||
16 | #include <linux/threads.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <asm/mach-au1x00/au1000.h> | ||
19 | |||
20 | struct cpu_spec* cur_cpu_spec[NR_CPUS]; | ||
21 | |||
22 | /* With some thought, we can probably use the mask to reduce the | ||
23 | * size of the table. | ||
24 | */ | ||
25 | struct cpu_spec cpu_specs[] = { | ||
26 | { 0xffffffff, 0x00030100, "Au1000 DA", 1, 0 }, | ||
27 | { 0xffffffff, 0x00030201, "Au1000 HA", 1, 0 }, | ||
28 | { 0xffffffff, 0x00030202, "Au1000 HB", 1, 0 }, | ||
29 | { 0xffffffff, 0x00030203, "Au1000 HC", 1, 1 }, | ||
30 | { 0xffffffff, 0x00030204, "Au1000 HD", 1, 1 }, | ||
31 | { 0xffffffff, 0x01030200, "Au1500 AB", 1, 1 }, | ||
32 | { 0xffffffff, 0x01030201, "Au1500 AC", 0, 1 }, | ||
33 | { 0xffffffff, 0x01030202, "Au1500 AD", 0, 1 }, | ||
34 | { 0xffffffff, 0x02030200, "Au1100 AB", 1, 1 }, | ||
35 | { 0xffffffff, 0x02030201, "Au1100 BA", 1, 1 }, | ||
36 | { 0xffffffff, 0x02030202, "Au1100 BC", 1, 1 }, | ||
37 | { 0xffffffff, 0x02030203, "Au1100 BD", 0, 1 }, | ||
38 | { 0xffffffff, 0x02030204, "Au1100 BE", 0, 1 }, | ||
39 | { 0xffffffff, 0x03030200, "Au1550 AA", 0, 1 }, | ||
40 | { 0xffffffff, 0x04030200, "Au1200 AA", 0, 1 }, | ||
41 | { 0x00000000, 0x00000000, "Unknown Au1xxx", 1, 0 }, | ||
42 | }; | ||
43 | |||
44 | void | ||
45 | set_cpuspec(void) | ||
46 | { | ||
47 | struct cpu_spec *sp; | ||
48 | u32 prid; | ||
49 | |||
50 | prid = read_c0_prid(); | ||
51 | sp = cpu_specs; | ||
52 | while ((prid & sp->prid_mask) != sp->prid_value) | ||
53 | sp++; | ||
54 | cur_cpu_spec[0] = sp; | ||
55 | } | ||