1 commit 88aaea30099c1562c4b4015d965c22df29034a74
2 Author: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Thu Sep 19 22:01:53 2013 +0200
5 MIPS: BCM47XX: only print SoC name in system type in cpuinfo
7 Recently the output of "system type" in /proc/cpuinfo was changed to
8 Broadcom BCM4730 (Some sample board), but it is better to just print
9 the SoC name in the "system type" entry. The board name will be added
10 in the machine entry later.
12 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 --- a/arch/mips/bcm47xx/prom.c
15 +++ b/arch/mips/bcm47xx/prom.c
18 static int cfe_cons_handle;
20 -static u16 get_chip_id(void)
22 - switch (bcm47xx_bus_type) {
23 -#ifdef CONFIG_BCM47XX_SSB
24 - case BCM47XX_BUS_TYPE_SSB:
25 - return bcm47xx_bus.ssb.chip_id;
27 -#ifdef CONFIG_BCM47XX_BCMA
28 - case BCM47XX_BUS_TYPE_BCMA:
29 - return bcm47xx_bus.bcma.bus.chipinfo.id;
34 +static char bcm47xx_system_type[20] = "Broadcom BCM47XX";
36 const char *get_system_type(void)
38 - static char buf[50];
39 - u16 chip_id = get_chip_id();
41 - snprintf(buf, sizeof(buf),
42 - (chip_id > 0x9999) ? "Broadcom BCM%d (%s)" :
43 - "Broadcom BCM%04X (%s)",
44 - chip_id, bcm47xx_board_get_name());
45 + return bcm47xx_system_type;
49 +__init void bcm47xx_set_system_type(u16 chip_id)
51 + snprintf(bcm47xx_system_type, sizeof(bcm47xx_system_type),
52 + (chip_id > 0x9999) ? "Broadcom BCM%d" :
57 void prom_putchar(char c)
58 --- a/arch/mips/bcm47xx/setup.c
59 +++ b/arch/mips/bcm47xx/setup.c
60 @@ -210,12 +210,14 @@ void __init plat_mem_setup(void)
61 #ifdef CONFIG_BCM47XX_BCMA
62 bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
63 bcm47xx_register_bcma();
64 + bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
67 printk(KERN_INFO "bcm47xx: using ssb bus\n");
68 #ifdef CONFIG_BCM47XX_SSB
69 bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB;
70 bcm47xx_register_ssb();
71 + bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id);
75 --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
76 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
77 @@ -56,4 +56,6 @@ void bcm47xx_fill_bcma_boardinfo(struct
81 +void bcm47xx_set_system_type(u16 chip_id);
83 #endif /* __ASM_BCM47XX_H */