aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-10-09 05:32:28 -0400
committerBryan Wu <cooloney@kernel.org>2008-10-09 05:32:28 -0400
commit0c0497c257c12c9ecb8825490a339bfce8a0532f (patch)
tree5ed9776845a63b56119b602237889e881a6dc856 /arch/blackfin
parent664d0403f96ff5f4fb43a4b3a54b5642589c57d2 (diff)
Blackfin arch: Move all the silicon rev handling to one place
Move all the silicon rev handling to one place (Kconfig) and make sure we warn if you are running on silicon that has not been tested on Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/Kconfig13
-rw-r--r--arch/blackfin/kernel/setup.c3
-rw-r--r--arch/blackfin/mach-bf527/include/mach/bf527.h2
-rw-r--r--arch/blackfin/mach-bf533/include/mach/bf533.h2
-rw-r--r--arch/blackfin/mach-bf537/include/mach/bf537.h2
-rw-r--r--arch/blackfin/mach-bf548/include/mach/bf548.h2
-rw-r--r--arch/blackfin/mach-bf561/include/mach/bf561.h2
7 files changed, 15 insertions, 11 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 10c97efbd91f..8102c79aaa94 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -166,6 +166,19 @@ config BF561
166 166
167endchoice 167endchoice
168 168
169config BF_REV_MIN
170 int
171 default 0 if (BF52x || BF54x)
172 default 2 if (BF537 || BF536 || BF534)
173 default 3 if (BF561 ||BF533 || BF532 || BF531)
174
175config BF_REV_MAX
176 int
177 default 2 if (BF52x || BF54x)
178 default 3 if (BF537 || BF536 || BF534)
179 default 5 if (BF561)
180 default 6 if (BF533 || BF532 || BF531)
181
169choice 182choice
170 prompt "Silicon Rev" 183 prompt "Silicon Rev"
171 default BF_REV_0_1 if (BF52x || BF54x) 184 default BF_REV_0_1 if (BF52x || BF54x)
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index e9054e0b4555..4267523912bd 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -821,9 +821,10 @@ void __init setup_arch(char **cmdline_p)
821 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", 821 printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n",
822 bfin_compiled_revid(), bfin_revid()); 822 bfin_compiled_revid(), bfin_revid());
823 } 823 }
824 if (bfin_revid() < SUPPORTED_REVID) 824 if (bfin_revid() <= CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX)
825 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", 825 printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n",
826 CPU, bfin_revid()); 826 CPU, bfin_revid());
827
827 printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); 828 printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
828 829
829 printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", 830 printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
diff --git a/arch/blackfin/mach-bf527/include/mach/bf527.h b/arch/blackfin/mach-bf527/include/mach/bf527.h
index 056eb4b9cd25..330041fde546 100644
--- a/arch/blackfin/mach-bf527/include/mach/bf527.h
+++ b/arch/blackfin/mach-bf527/include/mach/bf527.h
@@ -30,8 +30,6 @@
30#ifndef __MACH_BF527_H__ 30#ifndef __MACH_BF527_H__
31#define __MACH_BF527_H__ 31#define __MACH_BF527_H__
32 32
33#define SUPPORTED_REVID 2
34
35#define OFFSET_(x) ((x) & 0x0000FFFF) 33#define OFFSET_(x) ((x) & 0x0000FFFF)
36 34
37/*some misc defines*/ 35/*some misc defines*/
diff --git a/arch/blackfin/mach-bf533/include/mach/bf533.h b/arch/blackfin/mach-bf533/include/mach/bf533.h
index 12a416931991..949801112303 100644
--- a/arch/blackfin/mach-bf533/include/mach/bf533.h
+++ b/arch/blackfin/mach-bf533/include/mach/bf533.h
@@ -30,8 +30,6 @@
30#ifndef __MACH_BF533_H__ 30#ifndef __MACH_BF533_H__
31#define __MACH_BF533_H__ 31#define __MACH_BF533_H__
32 32
33#define SUPPORTED_REVID 2
34
35#define OFFSET_(x) ((x) & 0x0000FFFF) 33#define OFFSET_(x) ((x) & 0x0000FFFF)
36 34
37/*some misc defines*/ 35/*some misc defines*/
diff --git a/arch/blackfin/mach-bf537/include/mach/bf537.h b/arch/blackfin/mach-bf537/include/mach/bf537.h
index cfe2a221112e..7a047e04e383 100644
--- a/arch/blackfin/mach-bf537/include/mach/bf537.h
+++ b/arch/blackfin/mach-bf537/include/mach/bf537.h
@@ -30,8 +30,6 @@
30#ifndef __MACH_BF537_H__ 30#ifndef __MACH_BF537_H__
31#define __MACH_BF537_H__ 31#define __MACH_BF537_H__
32 32
33#define SUPPORTED_REVID 2
34
35/* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */ 33/* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */
36 34
37#define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */ 35#define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE) /* SPI_STAT */
diff --git a/arch/blackfin/mach-bf548/include/mach/bf548.h b/arch/blackfin/mach-bf548/include/mach/bf548.h
index e748588e8930..14f8a7b84544 100644
--- a/arch/blackfin/mach-bf548/include/mach/bf548.h
+++ b/arch/blackfin/mach-bf548/include/mach/bf548.h
@@ -30,8 +30,6 @@
30#ifndef __MACH_BF548_H__ 30#ifndef __MACH_BF548_H__
31#define __MACH_BF548_H__ 31#define __MACH_BF548_H__
32 32
33#define SUPPORTED_REVID 0
34
35#define OFFSET_(x) ((x) & 0x0000FFFF) 33#define OFFSET_(x) ((x) & 0x0000FFFF)
36 34
37/*some misc defines*/ 35/*some misc defines*/
diff --git a/arch/blackfin/mach-bf561/include/mach/bf561.h b/arch/blackfin/mach-bf561/include/mach/bf561.h
index 3ef9e5f36136..7787caad3555 100644
--- a/arch/blackfin/mach-bf561/include/mach/bf561.h
+++ b/arch/blackfin/mach-bf561/include/mach/bf561.h
@@ -30,8 +30,6 @@
30#ifndef __MACH_BF561_H__ 30#ifndef __MACH_BF561_H__
31#define __MACH_BF561_H__ 31#define __MACH_BF561_H__
32 32
33#define SUPPORTED_REVID 0x3
34
35#define OFFSET_(x) ((x) & 0x0000FFFF) 33#define OFFSET_(x) ((x) & 0x0000FFFF)
36 34
37/*some misc defines*/ 35/*some misc defines*/