aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2008-07-19 04:56:53 -0400
committerBryan Wu <cooloney@kernel.org>2008-07-19 04:56:53 -0400
commit0138da6101fa3cdfea7f470d014c2f13cc03e7a9 (patch)
treeaf0a5095f7f2eaf535f395f5c22289206f59d92f /include/asm-blackfin
parentcc2e16bd35f6d78f559467358259e7d7264d4e96 (diff)
Blackfin arch: fix bug - detect 0.1 silicon revision BF527-EZKIT as 0.0 version
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'include/asm-blackfin')
-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)