diff options
author | Richard Kuo <rkuo@codeaurora.org> | 2012-03-27 18:37:33 -0400 |
---|---|---|
committer | Richard Kuo <rkuo@codeaurora.org> | 2013-04-30 20:40:22 -0400 |
commit | 66b03dbfe605c2566cff55bde35372030aa4b3d0 (patch) | |
tree | 1e933ee8a5ad6b3c4c3e5f8184e9ea9069be2908 /arch/hexagon | |
parent | 8f5a0b9dffeb3cb94f2b0622b6fe0717512ef54b (diff) |
Hexagon: change arch version config to allow comparisons
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Diffstat (limited to 'arch/hexagon')
-rw-r--r-- | arch/hexagon/Kconfig | 18 | ||||
-rw-r--r-- | arch/hexagon/Makefile | 17 | ||||
-rw-r--r-- | arch/hexagon/include/asm/elf.h | 6 |
3 files changed, 10 insertions, 31 deletions
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index dd89a7245ac4..d90a495ab791 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig | |||
@@ -33,19 +33,6 @@ config HEXAGON | |||
33 | Qualcomm Hexagon is a processor architecture designed for high | 33 | Qualcomm Hexagon is a processor architecture designed for high |
34 | performance and low power across a wide variety of applications. | 34 | performance and low power across a wide variety of applications. |
35 | 35 | ||
36 | |||
37 | config HEXAGON_ARCH_V1 | ||
38 | bool | ||
39 | |||
40 | config HEXAGON_ARCH_V2 | ||
41 | bool | ||
42 | |||
43 | config HEXAGON_ARCH_V3 | ||
44 | bool | ||
45 | |||
46 | config HEXAGON_ARCH_V4 | ||
47 | bool | ||
48 | |||
49 | config HEXAGON_PHYS_OFFSET | 36 | config HEXAGON_PHYS_OFFSET |
50 | def_bool y | 37 | def_bool y |
51 | ---help--- | 38 | ---help--- |
@@ -109,12 +96,15 @@ choice | |||
109 | 96 | ||
110 | config HEXAGON_COMET | 97 | config HEXAGON_COMET |
111 | bool "Comet Board" | 98 | bool "Comet Board" |
112 | select HEXAGON_ARCH_V2 | ||
113 | ---help--- | 99 | ---help--- |
114 | Support for the Comet platform. | 100 | Support for the Comet platform. |
115 | 101 | ||
116 | endchoice | 102 | endchoice |
117 | 103 | ||
104 | config HEXAGON_ARCH_VERSION | ||
105 | int "Architecture version" | ||
106 | default 2 | ||
107 | |||
118 | config HEXAGON_VM | 108 | config HEXAGON_VM |
119 | def_bool y | 109 | def_bool y |
120 | 110 | ||
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile index d00d900b2566..207711a0fd0c 100644 --- a/arch/hexagon/Makefile +++ b/arch/hexagon/Makefile | |||
@@ -15,20 +15,9 @@ KBUILD_CFLAGS += -fno-short-enums | |||
15 | # LDFLAGS_MODULE += -shared | 15 | # LDFLAGS_MODULE += -shared |
16 | CFLAGS_MODULE += -mlong-calls | 16 | CFLAGS_MODULE += -mlong-calls |
17 | 17 | ||
18 | cflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) | 18 | cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) |
19 | cflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) | 19 | aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) |
20 | cflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) | 20 | ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION}) |
21 | cflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) | ||
22 | |||
23 | aflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) | ||
24 | aflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) | ||
25 | aflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) | ||
26 | aflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) | ||
27 | |||
28 | ldflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) | ||
29 | ldflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) | ||
30 | ldflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) | ||
31 | ldflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4) | ||
32 | 21 | ||
33 | KBUILD_CFLAGS += $(cflags-y) | 22 | KBUILD_CFLAGS += $(cflags-y) |
34 | KBUILD_AFLAGS += $(aflags-y) | 23 | KBUILD_AFLAGS += $(aflags-y) |
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index 1f14e082588e..83b8d0ea4cb8 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h | |||
@@ -168,15 +168,15 @@ do { \ | |||
168 | #define ELF_DATA ELFDATA2LSB | 168 | #define ELF_DATA ELFDATA2LSB |
169 | #define ELF_ARCH EM_HEXAGON | 169 | #define ELF_ARCH EM_HEXAGON |
170 | 170 | ||
171 | #ifdef CONFIG_HEXAGON_ARCH_V2 | 171 | #if CONFIG_HEXAGON_ARCH_VERSION == 2 |
172 | #define ELF_CORE_EFLAGS 0x1 | 172 | #define ELF_CORE_EFLAGS 0x1 |
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | #ifdef CONFIG_HEXAGON_ARCH_V3 | 175 | #if CONFIG_HEXAGON_ARCH_VERSION == 3 |
176 | #define ELF_CORE_EFLAGS 0x2 | 176 | #define ELF_CORE_EFLAGS 0x2 |
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | #ifdef CONFIG_HEXAGON_ARCH_V4 | 179 | #if CONFIG_HEXAGON_ARCH_VERSION == 4 |
180 | #define ELF_CORE_EFLAGS 0x3 | 180 | #define ELF_CORE_EFLAGS 0x3 |
181 | #endif | 181 | #endif |
182 | 182 | ||