diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-11-23 10:06:25 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-01-18 13:30:21 -0500 |
commit | 487d70d0b8bd1c70d099a7526077ffefee412050 (patch) | |
tree | e8ea4a5830fa88dca0a903b6bdf1f14e3ee119eb /arch/mips/kernel/proc.c | |
parent | 0bec405e8ee390067e63265b3002aaac49d4eea8 (diff) |
MIPS: Add generic support for multiple machines within a single kernel
This patch adds a generic solution to support multiple machines based on
a given SoC within a single kernel image. It is implemented already for
several other architectures but MIPS has no generic support for that yet.
[Ralf: This competes with DT but DT is a much more complex solution and this
code has been used by OpenWRT for a long time so for now DT is a bad reason
to stop the merge but longer term this should be migrated to DT.]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: kaloz@openwrt.org
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Cliff Holden <Cliff.Holden@Atheros.com>
Patchwork: https://patchwork.linux-mips.org/patch/1814/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/proc.c')
-rw-r--r-- | arch/mips/kernel/proc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c index 26109c4d517..4195abb55e5 100644 --- a/arch/mips/kernel/proc.c +++ b/arch/mips/kernel/proc.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/cpu-features.h> | 12 | #include <asm/cpu-features.h> |
13 | #include <asm/mipsregs.h> | 13 | #include <asm/mipsregs.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/mips_machine.h> | ||
15 | 16 | ||
16 | unsigned int vced_count, vcei_count; | 17 | unsigned int vced_count, vcei_count; |
17 | 18 | ||
@@ -31,8 +32,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
31 | /* | 32 | /* |
32 | * For the first processor also print the system type | 33 | * For the first processor also print the system type |
33 | */ | 34 | */ |
34 | if (n == 0) | 35 | if (n == 0) { |
35 | seq_printf(m, "system type\t\t: %s\n", get_system_type()); | 36 | seq_printf(m, "system type\t\t: %s\n", get_system_type()); |
37 | if (mips_get_machine_name()) | ||
38 | seq_printf(m, "machine\t\t\t: %s\n", | ||
39 | mips_get_machine_name()); | ||
40 | } | ||
36 | 41 | ||
37 | seq_printf(m, "processor\t\t: %ld\n", n); | 42 | seq_printf(m, "processor\t\t: %ld\n", n); |
38 | sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", | 43 | sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", |