diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-07-19 16:56:53 +0800 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-07-19 16:56:53 +0800 |
commit | 0138da6101fa3cdfea7f470d014c2f13cc03e7a9 (patch) | |
tree | af0a5095f7f2eaf535f395f5c22289206f59d92f /include/asm-blackfin | |
parent | cc2e16bd35f6d78f559467358259e7d7264d4e96 (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.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h index 1c004072461..6f3995b119d 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); static inline uint32_t __pure bfin_revid(void) { /* stored in the upper 4 bits */ - return bfin_read_CHIPID() >> 28; + uint32_t revid = bfin_read_CHIPID() >> 28; + +#ifdef CONFIG_BF52x + /* ANOMALY_05000357 + * Incorrect Revision Number in DSPID Register + */ + if (revid == 0) + switch (bfin_read16(_BOOTROM_GET_DXE_ADDRESS_TWI)) { + case 0x0010: + revid = 0; + break; + case 0x2796: + revid = 1; + break; + default: + revid = 0xFFFF; + break; + } +#endif + return revid; } static inline uint32_t __pure bfin_compiled_revid(void) |