summaryrefslogtreecommitdiff
path: root/arch/blackfin/include/asm/processor.h
diff options
context:
space:
mode:
authorRobin Getz <rgetz@blackfin.uclinux.org>2008-10-10 14:21:45 +0400
committerBryan Wu <cooloney@kernel.org>2008-10-10 14:21:45 +0400
commite482cad241c0b7108cbc94959307a73d19ba17d5 (patch)
tree7cde7e1af828d74d55ec059d1955c5129b89a892 /arch/blackfin/include/asm/processor.h
parent6d0b8c993dc0a26fe7a9ee8b839d1964bd0debd4 (diff)
downloadlinux-e482cad241c0b7108cbc94959307a73d19ba17d5.tar.xz
Blackfin arch: print out error/warning if you are running on the incorrect CPU type
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/include/asm/processor.h')
-rw-r--r--arch/blackfin/include/asm/processor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/processor.h b/arch/blackfin/include/asm/processor.h
index 6f3995b119d8..e3e9b41fa8db 100644
--- a/arch/blackfin/include/asm/processor.h
+++ b/arch/blackfin/include/asm/processor.h
@@ -134,6 +134,12 @@ static inline uint32_t __pure bfin_revid(void)
return revid;
}
+static inline uint16_t __pure bfin_cpuid(void)
+{
+ return (bfin_read_CHIPID() & CHIPID_FAMILY) >> 12;
+
+}
+
static inline uint32_t __pure bfin_compiled_revid(void)
{
#if defined(CONFIG_BF_REV_0_0)