Skip to content

Commit 0de663e

Browse files
mbizonfreeboxralfbaechle
authored andcommitted
MIPS: BCM63xx: Add Broadcom 63xx CPU definitions.
Todo: Nothing ever detects CPU_BCM6338 but the code tests for it anyway. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 512254b commit 0de663e

3 files changed

Lines changed: 34 additions & 0 deletions

File tree

‎arch/mips/include/asm/cpu.h‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@
113113

114114
#define PRID_IMP_BCM4710 0x4000
115115
#define PRID_IMP_BCM3302 0x9000
116+
#define PRID_IMP_BCM6338 0x9000
117+
#define PRID_IMP_BCM6345 0x8000
118+
#define PRID_IMP_BCM6348 0x9100
119+
#define PRID_IMP_BCM4350 0xA000
120+
#define PRID_REV_BCM6358 0x0010
121+
#define PRID_REV_BCM6368 0x0030
116122

117123
/*
118124
* These are the PRID's for when 23:16 == PRID_COMP_CAVIUM
@@ -210,6 +216,7 @@ enum cpu_type_enum {
210216
*/
211217
CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K,
212218
CPU_ALCHEMY, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
219+
CPU_BCM6338, CPU_BCM6345, CPU_BCM6348, CPU_BCM6358,
213220

214221
/*
215222
* MIPS64 class processors

‎arch/mips/kernel/cpu-probe.c‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ void __init check_wait(void)
156156
case CPU_25KF:
157157
case CPU_PR4450:
158158
case CPU_BCM3302:
159+
case CPU_BCM6338:
160+
case CPU_BCM6348:
161+
case CPU_BCM6358:
159162
case CPU_CAVIUM_OCTEON:
160163
cpu_wait = r4k_wait;
161164
break;
@@ -854,13 +857,33 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
854857
decode_configs(c);
855858
switch (c->processor_id & 0xff00) {
856859
case PRID_IMP_BCM3302:
860+
/* same as PRID_IMP_BCM6338 */
857861
c->cputype = CPU_BCM3302;
858862
__cpu_name[cpu] = "Broadcom BCM3302";
859863
break;
860864
case PRID_IMP_BCM4710:
861865
c->cputype = CPU_BCM4710;
862866
__cpu_name[cpu] = "Broadcom BCM4710";
863867
break;
868+
case PRID_IMP_BCM6345:
869+
c->cputype = CPU_BCM6345;
870+
__cpu_name[cpu] = "Broadcom BCM6345";
871+
break;
872+
case PRID_IMP_BCM6348:
873+
c->cputype = CPU_BCM6348;
874+
__cpu_name[cpu] = "Broadcom BCM6348";
875+
break;
876+
case PRID_IMP_BCM4350:
877+
switch (c->processor_id & 0xf0) {
878+
case PRID_REV_BCM6358:
879+
c->cputype = CPU_BCM6358;
880+
__cpu_name[cpu] = "Broadcom BCM6358";
881+
break;
882+
default:
883+
c->cputype = CPU_UNKNOWN;
884+
break;
885+
}
886+
break;
864887
}
865888
}
866889

‎arch/mips/mm/tlbex.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,10 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
321321
case CPU_BCM3302:
322322
case CPU_BCM4710:
323323
case CPU_LOONGSON2:
324+
case CPU_BCM6338:
325+
case CPU_BCM6345:
326+
case CPU_BCM6348:
327+
case CPU_BCM6358:
324328
case CPU_R5500:
325329
if (m4kc_tlbp_war())
326330
uasm_i_nop(p);

0 commit comments

Comments
 (0)