diff options
-rw-r--r-- | arch/blackfin/Kconfig | 6 | ||||
-rw-r--r-- | arch/blackfin/Makefile | 21 | ||||
-rw-r--r-- | arch/blackfin/kernel/setup.c | 18 | ||||
-rw-r--r-- | include/asm-blackfin/processor.h | 4 |
4 files changed, 45 insertions, 4 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 1fad8560c7af..d98bafcaca59 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -142,6 +142,12 @@ config BF_REV_0_5 | |||
142 | bool "0.5" | 142 | bool "0.5" |
143 | depends on (BF561 || BF533 || BF532 || BF531) | 143 | depends on (BF561 || BF533 || BF532 || BF531) |
144 | 144 | ||
145 | config BF_REV_ANY | ||
146 | bool "any" | ||
147 | |||
148 | config BF_REV_NONE | ||
149 | bool "none" | ||
150 | |||
145 | endchoice | 151 | endchoice |
146 | 152 | ||
147 | config BFIN_DUAL_CORE | 153 | config BFIN_DUAL_CORE |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 75e89c324756..6971a4418dfe 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
@@ -28,6 +28,27 @@ machine-$(CONFIG_BF561) := bf561 | |||
28 | MACHINE := $(machine-y) | 28 | MACHINE := $(machine-y) |
29 | export MACHINE | 29 | export MACHINE |
30 | 30 | ||
31 | cpu-$(CONFIG_BF531) := bf531 | ||
32 | cpu-$(CONFIG_BF532) := bf532 | ||
33 | cpu-$(CONFIG_BF533) := bf533 | ||
34 | cpu-$(CONFIG_BF534) := bf534 | ||
35 | cpu-$(CONFIG_BF536) := bf536 | ||
36 | cpu-$(CONFIG_BF537) := bf537 | ||
37 | cpu-$(CONFIG_BF548) := bf548 | ||
38 | cpu-$(CONFIG_BF549) := bf549 | ||
39 | cpu-$(CONFIG_BF561) := bf561 | ||
40 | |||
41 | rev-$(CONFIG_BF_REV_0_0) := 0.0 | ||
42 | rev-$(CONFIG_BF_REV_0_1) := 0.1 | ||
43 | rev-$(CONFIG_BF_REV_0_2) := 0.2 | ||
44 | rev-$(CONFIG_BF_REV_0_3) := 0.3 | ||
45 | rev-$(CONFIG_BF_REV_0_4) := 0.4 | ||
46 | rev-$(CONFIG_BF_REV_0_5) := 0.5 | ||
47 | rev-$(CONFIG_BF_REV_NONE) := none | ||
48 | rev-$(CONFIG_BF_REV_ANY) := any | ||
49 | |||
50 | CFLAGS += -mcpu=$(cpu-y)-$(rev-y) | ||
51 | AFLAGS += -mcpu=$(cpu-y)-$(rev-y) | ||
31 | 52 | ||
32 | head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o | 53 | head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o |
33 | 54 | ||
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 5b9b434c1ed9..83060f98d15d 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -307,10 +307,20 @@ void __init setup_arch(char **cmdline_p) | |||
307 | init_leds(); | 307 | init_leds(); |
308 | 308 | ||
309 | printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n"); | 309 | printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n"); |
310 | printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); | 310 | if (bfin_compiled_revid() == 0xffff) |
311 | if (bfin_revid() != bfin_compiled_revid()) | 311 | printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU); |
312 | printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", | 312 | else if (bfin_compiled_revid() == -1) |
313 | bfin_compiled_revid(), bfin_revid()); | 313 | printk(KERN_INFO "Compiled for ADSP-%s Rev none\n", CPU); |
314 | else | ||
315 | printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); | ||
316 | if (bfin_revid() != bfin_compiled_revid()) { | ||
317 | if (bfin_compiled_revid() == -1) | ||
318 | printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n", | ||
319 | bfin_revid()); | ||
320 | else if (bfin_compiled_revid() != 0xffff) | ||
321 | printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", | ||
322 | bfin_compiled_revid(), bfin_revid()); | ||
323 | } | ||
314 | if (bfin_revid() < SUPPORTED_REVID) | 324 | if (bfin_revid() < SUPPORTED_REVID) |
315 | printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", | 325 | printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", |
316 | CPU, bfin_revid()); | 326 | CPU, bfin_revid()); |
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h index aba2b30a8ed8..6bb3e0d4705d 100644 --- a/include/asm-blackfin/processor.h +++ b/include/asm-blackfin/processor.h | |||
@@ -124,6 +124,10 @@ static inline __attribute_pure__ uint32_t bfin_compiled_revid(void) | |||
124 | return 4; | 124 | return 4; |
125 | #elif defined(CONFIG_BF_REV_0_5) | 125 | #elif defined(CONFIG_BF_REV_0_5) |
126 | return 5; | 126 | return 5; |
127 | #elif defined(CONFIG_BF_REV_ANY) | ||
128 | return 0xffff; | ||
129 | #else | ||
130 | return -1; | ||
127 | #endif | 131 | #endif |
128 | } | 132 | } |
129 | 133 | ||