Commit 6605428c authored by Jonas Gorski's avatar Jonas Gorski Committed by Ralf Baechle

MIPS: BCM63XX: fix revision ID width

The REVID is only 8 bit wide.
Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/5007/Acked-by: default avatarJohn Crispin <blogic@openwrt.org>
parent 8a398d75
...@@ -25,7 +25,7 @@ const int *bcm63xx_irqs; ...@@ -25,7 +25,7 @@ const int *bcm63xx_irqs;
EXPORT_SYMBOL(bcm63xx_irqs); EXPORT_SYMBOL(bcm63xx_irqs);
static u16 bcm63xx_cpu_id; static u16 bcm63xx_cpu_id;
static u16 bcm63xx_cpu_rev; static u8 bcm63xx_cpu_rev;
static unsigned int bcm63xx_cpu_freq; static unsigned int bcm63xx_cpu_freq;
static unsigned int bcm63xx_memory_size; static unsigned int bcm63xx_memory_size;
...@@ -87,7 +87,7 @@ u16 __bcm63xx_get_cpu_id(void) ...@@ -87,7 +87,7 @@ u16 __bcm63xx_get_cpu_id(void)
EXPORT_SYMBOL(__bcm63xx_get_cpu_id); EXPORT_SYMBOL(__bcm63xx_get_cpu_id);
u16 bcm63xx_get_cpu_rev(void) u8 bcm63xx_get_cpu_rev(void)
{ {
return bcm63xx_cpu_rev; return bcm63xx_cpu_rev;
} }
......
...@@ -126,7 +126,7 @@ static void __bcm63xx_machine_reboot(char *p) ...@@ -126,7 +126,7 @@ static void __bcm63xx_machine_reboot(char *p)
const char *get_system_type(void) const char *get_system_type(void)
{ {
static char buf[128]; static char buf[128];
snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%04X)", snprintf(buf, sizeof(buf), "bcm63xx/%s (0x%04x/0x%02X)",
board_get_name(), board_get_name(),
bcm63xx_get_cpu_id(), bcm63xx_get_cpu_rev()); bcm63xx_get_cpu_id(), bcm63xx_get_cpu_rev());
return buf; return buf;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
void __init bcm63xx_cpu_init(void); void __init bcm63xx_cpu_init(void);
u16 __bcm63xx_get_cpu_id(void); u16 __bcm63xx_get_cpu_id(void);
u16 bcm63xx_get_cpu_rev(void); u8 bcm63xx_get_cpu_rev(void);
unsigned int bcm63xx_get_cpu_freq(void); unsigned int bcm63xx_get_cpu_freq(void);
#ifdef CONFIG_BCM63XX_CPU_6328 #ifdef CONFIG_BCM63XX_CPU_6328
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define REV_CHIPID_SHIFT 16 #define REV_CHIPID_SHIFT 16
#define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT) #define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT)
#define REV_REVID_SHIFT 0 #define REV_REVID_SHIFT 0
#define REV_REVID_MASK (0xffff << REV_REVID_SHIFT) #define REV_REVID_MASK (0xff << REV_REVID_SHIFT)
/* Clock Control register */ /* Clock Control register */
#define PERF_CKCTL_REG 0x4 #define PERF_CKCTL_REG 0x4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment