diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-09-19 17:40:09 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-01-22 14:18:54 -0500 |
commit | dd5732850e3dad3c578cf1523e7d3581cf5a815f (patch) | |
tree | b8c33c50c7e8b2c986aaa5a815e705c40b949836 /arch/mips | |
parent | 3a705ab1841270a9a7a04b18c9150f49d5da1978 (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')
-rw-r--r-- | arch/mips/bcm47xx/prom.c | 31 | ||||
-rw-r--r-- | arch/mips/bcm47xx/setup.c | 2 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-bcm47xx/bcm47xx.h | 2 |
3 files changed, 13 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 | ||
38 | static int cfe_cons_handle; | 38 | static int cfe_cons_handle; |
39 | 39 | ||
40 | static u16 get_chip_id(void) | 40 | static 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 | ||
55 | const char *get_system_type(void) | 42 | const 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 | ||
68 | void prom_putchar(char c) | 55 | void prom_putchar(char c) |
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c index 1f30571968e7..de08ba95ebac 100644 --- a/arch/mips/bcm47xx/setup.c +++ b/arch/mips/bcm47xx/setup.c | |||
@@ -210,12 +210,14 @@ void __init plat_mem_setup(void) | |||
210 | #ifdef CONFIG_BCM47XX_BCMA | 210 | #ifdef CONFIG_BCM47XX_BCMA |
211 | bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; | 211 | bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; |
212 | bcm47xx_register_bcma(); | 212 | bcm47xx_register_bcma(); |
213 | bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id); | ||
213 | #endif | 214 | #endif |
214 | } else { | 215 | } else { |
215 | printk(KERN_INFO "bcm47xx: using ssb bus\n"); | 216 | printk(KERN_INFO "bcm47xx: using ssb bus\n"); |
216 | #ifdef CONFIG_BCM47XX_SSB | 217 | #ifdef CONFIG_BCM47XX_SSB |
217 | bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB; | 218 | bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB; |
218 | bcm47xx_register_ssb(); | 219 | bcm47xx_register_ssb(); |
220 | bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id); | ||
219 | #endif | 221 | #endif |
220 | } | 222 | } |
221 | 223 | ||
diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h index cc7563ba1cbf..7527c1d33d02 100644 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h | |||
@@ -56,4 +56,6 @@ void bcm47xx_fill_bcma_boardinfo(struct bcma_boardinfo *boardinfo, | |||
56 | const char *prefix); | 56 | const char *prefix); |
57 | #endif | 57 | #endif |
58 | 58 | ||
59 | void bcm47xx_set_system_type(u16 chip_id); | ||
60 | |||
59 | #endif /* __ASM_BCM47XX_H */ | 61 | #endif /* __ASM_BCM47XX_H */ |