Blackfin arch: add new processor ADSP-BF52x arch/mach support
[safe/jmp/linux-2.6] / arch / blackfin / Makefile
1 #
2 # arch/blackfin/Makefile
3 #
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License.  See the file "COPYING" in the main directory of this archive
6 # for more details.
7 #
8
9
10 CROSS_COMPILE    ?= bfin-uclinux-
11 LDFLAGS_vmlinux  := -X
12 OBJCOPYFLAGS     := -O binary -R .note -R .comment -S
13 GZFLAGS          := -9
14
15 CFLAGS_MODULE    += -mlong-calls
16 KALLSYMS         += --symbol-prefix=_
17
18 KBUILD_DEFCONFIG := BF537-STAMP_defconfig
19
20 # setup the machine name and the machine dependent settings
21 machine-$(CONFIG_BF522) := bf527
22 machine-$(CONFIG_BF525) := bf527
23 machine-$(CONFIG_BF527) := bf527
24 machine-$(CONFIG_BF531) := bf533
25 machine-$(CONFIG_BF532) := bf533
26 machine-$(CONFIG_BF533) := bf533
27 machine-$(CONFIG_BF534) := bf537
28 machine-$(CONFIG_BF536) := bf537
29 machine-$(CONFIG_BF537) := bf537
30 machine-$(CONFIG_BF542) := bf548
31 machine-$(CONFIG_BF544) := bf548
32 machine-$(CONFIG_BF548) := bf548
33 machine-$(CONFIG_BF549) := bf548
34 machine-$(CONFIG_BF561) := bf561
35 MACHINE := $(machine-y)
36 export MACHINE
37
38 cpu-$(CONFIG_BF522) := bf522
39 cpu-$(CONFIG_BF525) := bf525
40 cpu-$(CONFIG_BF527) := bf527
41 cpu-$(CONFIG_BF531) := bf531
42 cpu-$(CONFIG_BF532) := bf532
43 cpu-$(CONFIG_BF533) := bf533
44 cpu-$(CONFIG_BF534) := bf534
45 cpu-$(CONFIG_BF536) := bf536
46 cpu-$(CONFIG_BF537) := bf537
47 cpu-$(CONFIG_BF542) := bf542
48 cpu-$(CONFIG_BF544) := bf544
49 cpu-$(CONFIG_BF548) := bf548
50 cpu-$(CONFIG_BF549) := bf549
51 cpu-$(CONFIG_BF561) := bf561
52
53 rev-$(CONFIG_BF_REV_0_0)  := 0.0
54 rev-$(CONFIG_BF_REV_0_1)  := 0.1
55 rev-$(CONFIG_BF_REV_0_2)  := 0.2
56 rev-$(CONFIG_BF_REV_0_3)  := 0.3
57 rev-$(CONFIG_BF_REV_0_4)  := 0.4
58 rev-$(CONFIG_BF_REV_0_5)  := 0.5
59 rev-$(CONFIG_BF_REV_NONE) := none
60 rev-$(CONFIG_BF_REV_ANY)  := any
61
62 KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
63 KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
64
65 head-y   := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
66
67 core-y   += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
68
69 # If we have a machine-specific directory, then include it in the build.
70 ifneq ($(machine-y),)
71 core-y   += arch/$(ARCH)/mach-$(MACHINE)/
72 core-y   += arch/$(ARCH)/mach-$(MACHINE)/boards/
73 endif
74
75 libs-y   += arch/$(ARCH)/lib/
76
77 drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
78
79
80
81 #       Update machine arch symlinks if something which affects
82 #       them changed.  We use .mach to indicate when they were updated
83 #       last, otherwise make uses the target directory mtime.
84
85 include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
86         @echo '  SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
87 ifneq ($(KBUILD_SRC),)
88         $(Q)mkdir -p include/asm-$(ARCH)
89         $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
90 else
91         $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
92 endif
93         @touch $@
94
95 CLEAN_FILES += \
96         include/asm-$(ARCH)/asm-offsets.h \
97         arch/$(ARCH)/kernel/asm-offsets.s \
98         include/asm-$(ARCH)/mach \
99         include/asm-$(ARCH)/.mach
100
101 archprepare: include/asm-blackfin/.mach
102 archclean:
103         $(Q)$(MAKE) $(clean)=$(boot)
104
105
106 all: vmImage
107 boot := arch/$(ARCH)/boot
108 BOOT_TARGETS = vmImage
109 .PHONY: $(BOOT_TARGETS)
110 $(BOOT_TARGETS): vmlinux
111         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
112 define archhelp
113   echo  '* vmImage         - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
114 endef