aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-blackfin/processor.h')
-rw-r--r--include/asm-blackfin/processor.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h
index 1c0040724612..6f3995b119d8 100644
--- a/include/asm-blackfin/processor.h
+++ b/include/asm-blackfin/processor.h
@@ -112,7 +112,26 @@ unsigned long get_wchan(struct task_struct *p);
112static inline uint32_t __pure bfin_revid(void) 112static inline uint32_t __pure bfin_revid(void)
113{ 113{
114 /* stored in the upper 4 bits */ 114 /* stored in the upper 4 bits */
115 return bfin_read_CHIPID() >> 28; 115 uint32_t revid = bfin_read_CHIPID() >> 28;
116
117#ifdef CONFIG_BF52x
118 /* ANOMALY_05000357
119 * Incorrect Revision Number in DSPID Register
120 */
121 if (revid == 0)
122 switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) {
123 case 0x0010:
124 revid = 0;
125 break;
126 case 0x2796:
127 revid = 1;
128 break;
129 default:
130 revid = 0xFFFF;
131 break;
132 }
133#endif
134 return revid;
116} 135}
117 136
118static inline uint32_t __pure bfin_compiled_revid(void) 137static inline uint32_t __pure bfin_compiled_revid(void)