From de3025f4e2bc063c274f561f9daf2b696910ad3b Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Mon, 25 Jun 2007 18:04:12 +0800 Subject: Blackfin arch: Add proper -mcpu option according to the cpu and silicon revision configuration Add silicon revision "any" and "none". Add proper -mcpu option according to the cpu and silicon revision configuration. Need update to use latest Blackfin cross compile toolchain. Signed-off-by: Jie Zhang Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 1fad856..d98bafc 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -142,6 +142,12 @@ config BF_REV_0_5 bool "0.5" depends on (BF561 || BF533 || BF532 || BF531) +config BF_REV_ANY + bool "any" + +config BF_REV_NONE + bool "none" + endchoice config BFIN_DUAL_CORE diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 75e89c3..6971a44 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile @@ -28,6 +28,27 @@ machine-$(CONFIG_BF561) := bf561 MACHINE := $(machine-y) export MACHINE +cpu-$(CONFIG_BF531) := bf531 +cpu-$(CONFIG_BF532) := bf532 +cpu-$(CONFIG_BF533) := bf533 +cpu-$(CONFIG_BF534) := bf534 +cpu-$(CONFIG_BF536) := bf536 +cpu-$(CONFIG_BF537) := bf537 +cpu-$(CONFIG_BF548) := bf548 +cpu-$(CONFIG_BF549) := bf549 +cpu-$(CONFIG_BF561) := bf561 + +rev-$(CONFIG_BF_REV_0_0) := 0.0 +rev-$(CONFIG_BF_REV_0_1) := 0.1 +rev-$(CONFIG_BF_REV_0_2) := 0.2 +rev-$(CONFIG_BF_REV_0_3) := 0.3 +rev-$(CONFIG_BF_REV_0_4) := 0.4 +rev-$(CONFIG_BF_REV_0_5) := 0.5 +rev-$(CONFIG_BF_REV_NONE) := none +rev-$(CONFIG_BF_REV_ANY) := any + +CFLAGS += -mcpu=$(cpu-y)-$(rev-y) +AFLAGS += -mcpu=$(cpu-y)-$(rev-y) head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 5b9b434..83060f9 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -307,10 +307,20 @@ void __init setup_arch(char **cmdline_p) init_leds(); printk(KERN_INFO "Blackfin support (C) 2004-2007 Analog Devices, Inc.\n"); - printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); - if (bfin_revid() != bfin_compiled_revid()) - printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", - bfin_compiled_revid(), bfin_revid()); + if (bfin_compiled_revid() == 0xffff) + printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU); + else if (bfin_compiled_revid() == -1) + printk(KERN_INFO "Compiled for ADSP-%s Rev none\n", CPU); + else + printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); + if (bfin_revid() != bfin_compiled_revid()) { + if (bfin_compiled_revid() == -1) + printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n", + bfin_revid()); + else if (bfin_compiled_revid() != 0xffff) + printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", + bfin_compiled_revid(), bfin_revid()); + } if (bfin_revid() < SUPPORTED_REVID) printk(KERN_ERR "Warning: Unsupported Chip Revision ADSP-%s Rev 0.%d detected\n", CPU, bfin_revid()); diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h index aba2b30..6bb3e0d 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) return 4; #elif defined(CONFIG_BF_REV_0_5) return 5; +#elif defined(CONFIG_BF_REV_ANY) + return 0xffff; +#else + return -1; #endif } -- cgit v0.10.2 From da1f95b4c41e09ef96869552db587452e0da46d6 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 25 Jun 2007 18:05:53 +0800 Subject: Blackfin arch: Fix up remaining printks with proper log levels Signed-off-by: Robin Getz Signed-off-by: Bryan Wu diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index aa660f3..56058b0 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -545,7 +545,8 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr) if (current->mm) { printk(KERN_EMERG "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" - "BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n", + KERN_EMERG "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" + KERN_EMERG "\n", (void*)current->mm->start_code, (void*)current->mm->end_code, (void*)current->mm->start_data, -- cgit v0.10.2 From 4a3207a3339955047aab1fd5d808f8050d50dd85 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 2 Jul 2007 13:49:15 +0800 Subject: Blackfin arch: update board defconfig files Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig index 90d58aa..1cf1ab2 100644 --- a/arch/blackfin/configs/BF533-EZKIT_defconfig +++ b/arch/blackfin/configs/BF533-EZKIT_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.21.3 +# Linux kernel version: 2.6.21.5 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -115,17 +115,26 @@ CONFIG_BF533=y # CONFIG_BF534 is not set # CONFIG_BF536 is not set # CONFIG_BF537 is not set +# CONFIG_BF542 is not set +# CONFIG_BF544 is not set +# CONFIG_BF548 is not set +# CONFIG_BF549 is not set # CONFIG_BF561 is not set +# CONFIG_BF_REV_0_0 is not set # CONFIG_BF_REV_0_2 is not set CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_0_4 is not set # CONFIG_BF_REV_0_5 is not set +# CONFIG_BF_REV_ANY is not set +# CONFIG_BF_REV_NONE is not set +CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y CONFIG_BFIN533_EZKIT=y # CONFIG_BFIN533_STAMP is not set # CONFIG_BFIN537_STAMP is not set # CONFIG_BFIN533_BLUETECHNIX_CM is not set # CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set # CONFIG_BFIN561_BLUETECHNIX_CM is not set # CONFIG_BFIN561_EZKIT is not set # CONFIG_BFIN561_TEPLA is not set @@ -634,6 +643,7 @@ CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_SMC91X=y +# CONFIG_SMSC911X is not set # # Ethernet (1000 Mbit) diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig index fee9189..64b7f1b 100644 --- a/arch/blackfin/configs/BF533-STAMP_defconfig +++ b/arch/blackfin/configs/BF533-STAMP_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.21.3 +# Linux kernel version: 2.6.21.5 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -115,17 +115,26 @@ CONFIG_BF533=y # CONFIG_BF534 is not set # CONFIG_BF536 is not set # CONFIG_BF537 is not set +# CONFIG_BF542 is not set +# CONFIG_BF544 is not set +# CONFIG_BF548 is not set +# CONFIG_BF549 is not set # CONFIG_BF561 is not set +# CONFIG_BF_REV_0_0 is not set # CONFIG_BF_REV_0_2 is not set CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_0_4 is not set # CONFIG_BF_REV_0_5 is not set +# CONFIG_BF_REV_ANY is not set +# CONFIG_BF_REV_NONE is not set +CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y # CONFIG_BFIN533_EZKIT is not set CONFIG_BFIN533_STAMP=y # CONFIG_BFIN537_STAMP is not set # CONFIG_BFIN533_BLUETECHNIX_CM is not set # CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set # CONFIG_BFIN561_BLUETECHNIX_CM is not set # CONFIG_BFIN561_EZKIT is not set # CONFIG_BFIN561_TEPLA is not set @@ -646,6 +655,7 @@ CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_SMC91X=y +# CONFIG_SMSC911X is not set # # Ethernet (1000 Mbit) @@ -986,9 +996,17 @@ CONFIG_SND_VERBOSE_PROCFS=y # # ALSA Blackfin devices # -# CONFIG_SND_BLACKFIN_AD1836 is not set -# CONFIG_SND_BLACKFIN_AD1981B is not set -# CONFIG_SND_BFIN_AD73311 is not set +CONFIG_SND_BLACKFIN_AD1836=m +CONFIG_SND_BLACKFIN_AD1836_TDM=y +# CONFIG_SND_BLACKFIN_AD1836_I2S is not set +CONFIG_SND_BLACKFIN_AD1836_MULSUB=y +# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set +CONFIG_SND_BLACKFIN_AD1981B=m +CONFIG_SND_BLACKFIN_SPORT=0 +CONFIG_SND_BLACKFIN_SPI_PFBIT=4 +CONFIG_SND_BFIN_AD73311=m +CONFIG_SND_BFIN_SPORT=0 +CONFIG_SND_BFIN_AD73311_SE=4 # # SoC audio support diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig index 37688bb..ccf09dc 100644 --- a/arch/blackfin/configs/BF537-STAMP_defconfig +++ b/arch/blackfin/configs/BF537-STAMP_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.21.3 +# Linux kernel version: 2.6.21.5 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -115,17 +115,26 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_BF534 is not set # CONFIG_BF536 is not set CONFIG_BF537=y +# CONFIG_BF542 is not set +# CONFIG_BF544 is not set +# CONFIG_BF548 is not set +# CONFIG_BF549 is not set # CONFIG_BF561 is not set +# CONFIG_BF_REV_0_0 is not set CONFIG_BF_REV_0_2=y # CONFIG_BF_REV_0_3 is not set # CONFIG_BF_REV_0_4 is not set # CONFIG_BF_REV_0_5 is not set +# CONFIG_BF_REV_ANY is not set +# CONFIG_BF_REV_NONE is not set +CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y # CONFIG_BFIN533_EZKIT is not set # CONFIG_BFIN533_STAMP is not set CONFIG_BFIN537_STAMP=y # CONFIG_BFIN533_BLUETECHNIX_CM is not set # CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set # CONFIG_BFIN561_BLUETECHNIX_CM is not set # CONFIG_BFIN561_EZKIT is not set # CONFIG_BFIN561_TEPLA is not set @@ -664,6 +673,7 @@ CONFIG_BFIN_MAC_USE_L1=y CONFIG_BFIN_TX_DESC_NUM=10 CONFIG_BFIN_RX_DESC_NUM=20 # CONFIG_BFIN_MAC_RMII is not set +# CONFIG_SMSC911X is not set # # Ethernet (1000 Mbit) @@ -1020,9 +1030,17 @@ CONFIG_SND_VERBOSE_PROCFS=y # # ALSA Blackfin devices # -# CONFIG_SND_BLACKFIN_AD1836 is not set -# CONFIG_SND_BLACKFIN_AD1981B is not set -# CONFIG_SND_BFIN_AD73311 is not set +CONFIG_SND_BLACKFIN_AD1836=m +CONFIG_SND_BLACKFIN_AD1836_TDM=y +# CONFIG_SND_BLACKFIN_AD1836_I2S is not set +CONFIG_SND_BLACKFIN_AD1836_MULSUB=y +# CONFIG_SND_BLACKFIN_AD1836_5P1 is not set +CONFIG_SND_BLACKFIN_AD1981B=m +CONFIG_SND_BLACKFIN_SPORT=0 +CONFIG_SND_BLACKFIN_SPI_PFBIT=4 +CONFIG_SND_BFIN_AD73311=m +CONFIG_SND_BFIN_SPORT=0 +CONFIG_SND_BFIN_AD73311_SE=4 # # SoC audio support diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig index fe4e67d..51c0b6f 100644 --- a/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.21.3 +# Linux kernel version: 2.6.21.5 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -115,17 +115,25 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_BF534 is not set # CONFIG_BF536 is not set # CONFIG_BF537 is not set +# CONFIG_BF542 is not set +# CONFIG_BF544 is not set +# CONFIG_BF548 is not set +# CONFIG_BF549 is not set CONFIG_BF561=y +# CONFIG_BF_REV_0_0 is not set # CONFIG_BF_REV_0_2 is not set CONFIG_BF_REV_0_3=y # CONFIG_BF_REV_0_4 is not set # CONFIG_BF_REV_0_5 is not set +# CONFIG_BF_REV_ANY is not set +# CONFIG_BF_REV_NONE is not set CONFIG_BFIN_DUAL_CORE=y # CONFIG_BFIN533_EZKIT is not set # CONFIG_BFIN533_STAMP is not set # CONFIG_BFIN537_STAMP is not set # CONFIG_BFIN533_BLUETECHNIX_CM is not set # CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set # CONFIG_BFIN561_BLUETECHNIX_CM is not set CONFIG_BFIN561_EZKIT=y # CONFIG_BFIN561_TEPLA is not set @@ -673,6 +681,7 @@ CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y CONFIG_MII=y CONFIG_SMC91X=y +# CONFIG_SMSC911X is not set # # Ethernet (1000 Mbit) @@ -801,7 +810,6 @@ CONFIG_WATCHDOG=y CONFIG_BFIN_WDT=y CONFIG_HW_RANDOM=y # CONFIG_GEN_RTC is not set -# CONFIG_BLACKFIN_DPMC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig index a783ff6..983ed18 100644 --- a/arch/blackfin/configs/PNAV-10_defconfig +++ b/arch/blackfin/configs/PNAV-10_defconfig @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.21.3 +# Linux kernel version: 2.6.21.5 # # CONFIG_MMU is not set # CONFIG_FPU is not set @@ -114,17 +114,26 @@ CONFIG_PREEMPT_VOLUNTARY=y # CONFIG_BF534 is not set # CONFIG_BF536 is not set CONFIG_BF537=y +# CONFIG_BF542 is not set +# CONFIG_BF544 is not set +# CONFIG_BF548 is not set +# CONFIG_BF549 is not set # CONFIG_BF561 is not set +# CONFIG_BF_REV_0_0 is not set CONFIG_BF_REV_0_2=y # CONFIG_BF_REV_0_3 is not set # CONFIG_BF_REV_0_4 is not set # CONFIG_BF_REV_0_5 is not set +# CONFIG_BF_REV_ANY is not set +# CONFIG_BF_REV_NONE is not set +CONFIG_BF53x=y CONFIG_BFIN_SINGLE_CORE=y # CONFIG_BFIN533_EZKIT is not set # CONFIG_BFIN533_STAMP is not set # CONFIG_BFIN537_STAMP is not set # CONFIG_BFIN533_BLUETECHNIX_CM is not set # CONFIG_BFIN537_BLUETECHNIX_CM is not set +# CONFIG_BFIN548_EZKIT is not set # CONFIG_BFIN561_BLUETECHNIX_CM is not set # CONFIG_BFIN561_EZKIT is not set # CONFIG_BFIN561_TEPLA is not set @@ -598,6 +607,7 @@ CONFIG_BFIN_MAC=y CONFIG_BFIN_TX_DESC_NUM=100 CONFIG_BFIN_RX_DESC_NUM=100 CONFIG_BFIN_MAC_RMII=y +# CONFIG_SMSC911X is not set # # Ethernet (1000 Mbit) @@ -746,7 +756,6 @@ CONFIG_CAN_BLACKFIN=m # CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y # CONFIG_GEN_RTC is not set -CONFIG_BLACKFIN_DPMC=y # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set -- cgit v0.10.2 From 7718457dc8fd98a9f61a5e42653161bac3904a65 Mon Sep 17 00:00:00 2001 From: Marco Roeland Date: Tue, 3 Jul 2007 08:25:50 +0800 Subject: Blackfin arch: remove zero-sized include/asm-blackfin/macros.h This file accidentally got truncated instead of deleted in commit df30b11. Signed-off-by: Marco Roeland Cc: Robert P. J. Day Cc: Jeff Garzik Cc: Jesper Juhl Cc: Alex Riesen Cc: Robin Getz Acked-by: Bryan Wu diff --git a/include/asm-blackfin/macros.h b/include/asm-blackfin/macros.h deleted file mode 100644 index e69de29..0000000 -- cgit v0.10.2