]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: Move all the silicon rev handling to one place
authorMike Frysinger <vapier.adi@gmail.com>
Thu, 9 Oct 2008 09:32:28 +0000 (17:32 +0800)
committerBryan Wu <cooloney@kernel.org>
Thu, 9 Oct 2008 09:32:28 +0000 (17:32 +0800)
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>
arch/blackfin/Kconfig
arch/blackfin/kernel/setup.c
arch/blackfin/mach-bf527/include/mach/bf527.h
arch/blackfin/mach-bf533/include/mach/bf533.h
arch/blackfin/mach-bf537/include/mach/bf537.h
arch/blackfin/mach-bf548/include/mach/bf548.h
arch/blackfin/mach-bf561/include/mach/bf561.h

index 10c97efbd91f97706cd0d922652287dcf6f9a074..8102c79aaa94044369612ab3a8dc3bb6e33aa807 100644 (file)
@@ -166,6 +166,19 @@ config BF561
 
 endchoice
 
+config BF_REV_MIN
+       int
+       default 0 if (BF52x || BF54x)
+       default 2 if (BF537 || BF536 || BF534)
+       default 3 if (BF561 ||BF533 || BF532 || BF531)
+
+config BF_REV_MAX
+       int
+       default 2 if (BF52x || BF54x)
+       default 3 if (BF537 || BF536 || BF534)
+       default 5 if (BF561)
+       default 6 if (BF533 || BF532 || BF531)
+
 choice
        prompt "Silicon Rev"
        default BF_REV_0_1 if (BF52x || BF54x)
index e9054e0b4555bd20af143ab3d20950f679f380a2..4267523912bd05761bd54db2becb23c833a9eaa2 100644 (file)
@@ -821,9 +821,10 @@ void __init setup_arch(char **cmdline_p)
                        printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n",
                               bfin_compiled_revid(), bfin_revid());
        }
-       if (bfin_revid() < SUPPORTED_REVID)
+       if (bfin_revid() <= CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX)
                printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n",
                       CPU, bfin_revid());
+
        printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n");
 
        printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n",
index 056eb4b9cd25fcb0f8adb61d43ca3eae34fbd7e6..330041fde546bd07d71aeae2d55e4e3f2b69eb7a 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef __MACH_BF527_H__
 #define __MACH_BF527_H__
 
-#define SUPPORTED_REVID 2
-
 #define OFFSET_(x) ((x) & 0x0000FFFF)
 
 /*some misc defines*/
index 12a4169319916ae58cecedcebea0f6f783e08438..949801112303707531065273b81a2fb62ad43a6c 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef __MACH_BF533_H__
 #define __MACH_BF533_H__
 
-#define SUPPORTED_REVID 2
-
 #define OFFSET_(x) ((x) & 0x0000FFFF)
 
 /*some misc defines*/
index cfe2a221112ef12ec97a8fbda0790310e55cb016..7a047e04e383ba25102ca76b8d87a648e2d1498d 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef __MACH_BF537_H__
 #define __MACH_BF537_H__
 
-#define SUPPORTED_REVID 2
-
 /* Masks for generic ERROR IRQ demultiplexing used in int-priority-sc.c */
 
 #define SPI_ERR_MASK (TXCOL | RBSY | MODF | TXE)       /* SPI_STAT */
index e748588e8930c2976d270bc03f8e88d1ff969551..14f8a7b845448182351bb72d10682d08edbaa63a 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef __MACH_BF548_H__
 #define __MACH_BF548_H__
 
-#define SUPPORTED_REVID 0
-
 #define OFFSET_(x) ((x) & 0x0000FFFF)
 
 /*some misc defines*/
index 3ef9e5f36136d09f3f385142589b8b92b7301e93..7787caad3555fba14e8d669997cbca607758e7e9 100644 (file)
@@ -30,8 +30,6 @@
 #ifndef __MACH_BF561_H__
 #define __MACH_BF561_H__
 
-#define SUPPORTED_REVID                0x3
-
 #define OFFSET_(x) ((x) & 0x0000FFFF)
 
 /*some misc defines*/