diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/include/asm/mach-sibyte/war.h | 6 | ||||
-rw-r--r-- | arch/mips/sibyte/sb1250/setup.c | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/arch/mips/include/asm/mach-sibyte/war.h b/arch/mips/include/asm/mach-sibyte/war.h index 7950ef4f032c..743385d7b5f2 100644 --- a/arch/mips/include/asm/mach-sibyte/war.h +++ b/arch/mips/include/asm/mach-sibyte/war.h | |||
@@ -16,7 +16,11 @@ | |||
16 | #if defined(CONFIG_SB1_PASS_1_WORKAROUNDS) || \ | 16 | #if defined(CONFIG_SB1_PASS_1_WORKAROUNDS) || \ |
17 | defined(CONFIG_SB1_PASS_2_WORKAROUNDS) | 17 | defined(CONFIG_SB1_PASS_2_WORKAROUNDS) |
18 | 18 | ||
19 | #define BCM1250_M3_WAR 1 | 19 | #ifndef __ASSEMBLY__ |
20 | extern int sb1250_m3_workaround_needed(void); | ||
21 | #endif | ||
22 | |||
23 | #define BCM1250_M3_WAR sb1250_m3_workaround_needed() | ||
20 | #define SIBYTE_1956_WAR 1 | 24 | #define SIBYTE_1956_WAR 1 |
21 | 25 | ||
22 | #else | 26 | #else |
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c index 0444da1e23c2..92da3155ce07 100644 --- a/arch/mips/sibyte/sb1250/setup.c +++ b/arch/mips/sibyte/sb1250/setup.c | |||
@@ -87,6 +87,21 @@ static int __init setup_bcm1250(void) | |||
87 | return ret; | 87 | return ret; |
88 | } | 88 | } |
89 | 89 | ||
90 | int sb1250_m3_workaround_needed(void) | ||
91 | { | ||
92 | switch (soc_type) { | ||
93 | case K_SYS_SOC_TYPE_BCM1250: | ||
94 | case K_SYS_SOC_TYPE_BCM1250_ALT: | ||
95 | case K_SYS_SOC_TYPE_BCM1250_ALT2: | ||
96 | case K_SYS_SOC_TYPE_BCM1125: | ||
97 | case K_SYS_SOC_TYPE_BCM1125H: | ||
98 | return soc_pass < K_SYS_REVISION_BCM1250_C0; | ||
99 | |||
100 | default: | ||
101 | return 0; | ||
102 | } | ||
103 | } | ||
104 | |||
90 | static int __init setup_bcm112x(void) | 105 | static int __init setup_bcm112x(void) |
91 | { | 106 | { |
92 | int ret = 0; | 107 | int ret = 0; |