Skip to content

Commit 6605428

Browse files
KanjiMonsterralfbaechle
authored andcommitted
MIPS: BCM63XX: fix revision ID width
The REVID is only 8 bit wide. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/5007/ Acked-by: John Crispin <blogic@openwrt.org>
1 parent 8a398d7 commit 6605428

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎arch/mips/bcm63xx/cpu.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const int *bcm63xx_irqs;
2525
EXPORT_SYMBOL(bcm63xx_irqs);
2626

2727
static u16 bcm63xx_cpu_id;
28-
static u16 bcm63xx_cpu_rev;
28+
static u8 bcm63xx_cpu_rev;
2929
static unsigned int bcm63xx_cpu_freq;
3030
static unsigned int bcm63xx_memory_size;
3131

@@ -87,7 +87,7 @@ u16 __bcm63xx_get_cpu_id(void)
8787

8888
EXPORT_SYMBOL(__bcm63xx_get_cpu_id);
8989

90-
u16 bcm63xx_get_cpu_rev(void)
90+
u8 bcm63xx_get_cpu_rev(void)
9191
{
9292
return bcm63xx_cpu_rev;
9393
}

‎arch/mips/bcm63xx/setup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static void __bcm63xx_machine_reboot(char *p)
126126
const char *get_system_type(void)
127127
{
128128
static char buf[128];
129-
snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%04X)",
129+
snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%02X)",
130130
board_get_name(),
131131
bcm63xx_get_cpu_id(), bcm63xx_get_cpu_rev());
132132
return buf;

‎arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
void __init bcm63xx_cpu_init(void);
2020
u16 __bcm63xx_get_cpu_id(void);
21-
u16 bcm63xx_get_cpu_rev(void);
21+
u8 bcm63xx_get_cpu_rev(void);
2222
unsigned int bcm63xx_get_cpu_freq(void);
2323

2424
#ifdef CONFIG_BCM63XX_CPU_6328

‎arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define REV_CHIPID_SHIFT 16
1111
#define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT)
1212
#define REV_REVID_SHIFT 0
13-
#define REV_REVID_MASK (0xffff << REV_REVID_SHIFT)
13+
#define REV_REVID_MASK (0xff << REV_REVID_SHIFT)
1414

1515
/* Clock Control register */
1616
#define PERF_CKCTL_REG 0x4

0 commit comments

Comments
 (0)