aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Kuo <rkuo@codeaurora.org>2012-03-27 18:37:33 -0400
committerRichard Kuo <rkuo@codeaurora.org>2013-04-30 20:40:22 -0400
commit66b03dbfe605c2566cff55bde35372030aa4b3d0 (patch)
tree1e933ee8a5ad6b3c4c3e5f8184e9ea9069be2908
parent8f5a0b9dffeb3cb94f2b0622b6fe0717512ef54b (diff)
Hexagon: change arch version config to allow comparisons
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
-rw-r--r--arch/hexagon/Kconfig18
-rw-r--r--arch/hexagon/Makefile17
-rw-r--r--arch/hexagon/include/asm/elf.h6
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
37config HEXAGON_ARCH_V1
38 bool
39
40config HEXAGON_ARCH_V2
41 bool
42
43config HEXAGON_ARCH_V3
44 bool
45
46config HEXAGON_ARCH_V4
47 bool
48
49config HEXAGON_PHYS_OFFSET 36config HEXAGON_PHYS_OFFSET
50 def_bool y 37 def_bool y
51 ---help--- 38 ---help---
@@ -109,12 +96,15 @@ choice
109 96
110config HEXAGON_COMET 97config 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
116endchoice 102endchoice
117 103
104config HEXAGON_ARCH_VERSION
105 int "Architecture version"
106 default 2
107
118config HEXAGON_VM 108config 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
16CFLAGS_MODULE += -mlong-calls 16CFLAGS_MODULE += -mlong-calls
17 17
18cflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1) 18cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
19cflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2) 19aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
20cflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3) 20ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
21cflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4)
22
23aflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1)
24aflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2)
25aflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3)
26aflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4)
27
28ldflags-$(CONFIG_HEXAGON_ARCH_V1) += $(call cc-option,-mv1)
29ldflags-$(CONFIG_HEXAGON_ARCH_V2) += $(call cc-option,-mv2)
30ldflags-$(CONFIG_HEXAGON_ARCH_V3) += $(call cc-option,-mv3)
31ldflags-$(CONFIG_HEXAGON_ARCH_V4) += $(call cc-option,-mv4)
32 21
33KBUILD_CFLAGS += $(cflags-y) 22KBUILD_CFLAGS += $(cflags-y)
34KBUILD_AFLAGS += $(aflags-y) 23KBUILD_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