aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm47xx/prom.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-09-19 17:40:09 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-01-22 14:18:54 -0500
commitdd5732850e3dad3c578cf1523e7d3581cf5a815f (patch)
treeb8c33c50c7e8b2c986aaa5a815e705c40b949836 /arch/mips/bcm47xx/prom.c
parent3a705ab1841270a9a7a04b18c9150f49d5da1978 (diff)
MIPS: BCM47XX: only print SoC name in system type in cpuinfo
Recently the output of "system type" in /proc/cpuinfo was changed to Broadcom BCM4730 (Some sample board), but it is better to just print the SoC name in the "system type" entry. The board name will be added in the machine entry later. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/5865/
Diffstat (limited to 'arch/mips/bcm47xx/prom.c')
-rw-r--r--arch/mips/bcm47xx/prom.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index 5cba318bc1cd..53b9a3fbc8f5 100644
--- a/arch/mips/bcm47xx/prom.c
+++ b/arch/mips/bcm47xx/prom.c
@@ -37,32 +37,19 @@
37 37
38static int cfe_cons_handle; 38static int cfe_cons_handle;
39 39
40static u16 get_chip_id(void) 40static char bcm47xx_system_type[20] = "Broadcom BCM47XX";
41{
42 switch (bcm47xx_bus_type) {
43#ifdef CONFIG_BCM47XX_SSB
44 case BCM47XX_BUS_TYPE_SSB:
45 return bcm47xx_bus.ssb.chip_id;
46#endif
47#ifdef CONFIG_BCM47XX_BCMA
48 case BCM47XX_BUS_TYPE_BCMA:
49 return bcm47xx_bus.bcma.bus.chipinfo.id;
50#endif
51 }
52 return 0;
53}
54 41
55const char *get_system_type(void) 42const char *get_system_type(void)
56{ 43{
57 static char buf[50]; 44 return bcm47xx_system_type;
58 u16 chip_id = get_chip_id(); 45}
59
60 snprintf(buf, sizeof(buf),
61 (chip_id > 0x9999) ? "Broadcom BCM%d (%s)" :
62 "Broadcom BCM%04X (%s)",
63 chip_id, bcm47xx_board_get_name());
64 46
65 return buf; 47__init void bcm47xx_set_system_type(u16 chip_id)
48{
49 snprintf(bcm47xx_system_type, sizeof(bcm47xx_system_type),
50 (chip_id > 0x9999) ? "Broadcom BCM%d" :
51 "Broadcom BCM%04X",
52 chip_id);
66} 53}
67 54
68void prom_putchar(char c) 55void prom_putchar(char c)