diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-06-01 03:25:42 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-06-22 04:16:42 -0400 |
commit | 8235703e103579bdcedadcaf63bc1896f82b191b (patch) | |
tree | eb3a6ca225399f2a52381a07abcb23a33ea24261 /arch/arc/include | |
parent | ba5afadb114d09ce52a0d6886a0eab4fcb679501 (diff) |
ARC: Use kconfig helper IS_ENABLED() to get rid of defines.h
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/cache.h | 2 | ||||
-rw-r--r-- | arch/arc/include/asm/defines.h | 56 | ||||
-rw-r--r-- | arch/arc/include/asm/mmu.h | 8 | ||||
-rw-r--r-- | arch/arc/include/asm/tlb-mmu1.h | 5 |
4 files changed, 13 insertions, 58 deletions
diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h index d5555fe4742a..2fe8e41a551c 100644 --- a/arch/arc/include/asm/cache.h +++ b/arch/arc/include/asm/cache.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __ARC_ASM_CACHE_H | 9 | #ifndef __ARC_ASM_CACHE_H |
10 | #define __ARC_ASM_CACHE_H | 10 | #define __ARC_ASM_CACHE_H |
11 | 11 | ||
12 | #include <asm/mmu.h> /* some of cache registers depend on MMU ver */ | ||
13 | |||
12 | /* In case $$ not config, setup a dummy number for rest of kernel */ | 14 | /* In case $$ not config, setup a dummy number for rest of kernel */ |
13 | #ifndef CONFIG_ARC_CACHE_LINE_SHIFT | 15 | #ifndef CONFIG_ARC_CACHE_LINE_SHIFT |
14 | #define L1_CACHE_SHIFT 6 | 16 | #define L1_CACHE_SHIFT 6 |
diff --git a/arch/arc/include/asm/defines.h b/arch/arc/include/asm/defines.h deleted file mode 100644 index 6097bb439cc5..000000000000 --- a/arch/arc/include/asm/defines.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ARC_ASM_DEFINES_H__ | ||
10 | #define __ARC_ASM_DEFINES_H__ | ||
11 | |||
12 | #if defined(CONFIG_ARC_MMU_V1) | ||
13 | #define CONFIG_ARC_MMU_VER 1 | ||
14 | #elif defined(CONFIG_ARC_MMU_V2) | ||
15 | #define CONFIG_ARC_MMU_VER 2 | ||
16 | #elif defined(CONFIG_ARC_MMU_V3) | ||
17 | #define CONFIG_ARC_MMU_VER 3 | ||
18 | #endif | ||
19 | |||
20 | #ifdef CONFIG_ARC_HAS_LLSC | ||
21 | #define __CONFIG_ARC_HAS_LLSC_VAL 1 | ||
22 | #else | ||
23 | #define __CONFIG_ARC_HAS_LLSC_VAL 0 | ||
24 | #endif | ||
25 | |||
26 | #ifdef CONFIG_ARC_HAS_SWAPE | ||
27 | #define __CONFIG_ARC_HAS_SWAPE_VAL 1 | ||
28 | #else | ||
29 | #define __CONFIG_ARC_HAS_SWAPE_VAL 0 | ||
30 | #endif | ||
31 | |||
32 | #ifdef CONFIG_ARC_HAS_RTSC | ||
33 | #define __CONFIG_ARC_HAS_RTSC_VAL 1 | ||
34 | #else | ||
35 | #define __CONFIG_ARC_HAS_RTSC_VAL 0 | ||
36 | #endif | ||
37 | |||
38 | #ifdef CONFIG_ARC_MMU_SASID | ||
39 | #define __CONFIG_ARC_MMU_SASID_VAL 1 | ||
40 | #else | ||
41 | #define __CONFIG_ARC_MMU_SASID_VAL 0 | ||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_ARC_HAS_ICACHE | ||
45 | #define __CONFIG_ARC_HAS_ICACHE 1 | ||
46 | #else | ||
47 | #define __CONFIG_ARC_HAS_ICACHE 0 | ||
48 | #endif | ||
49 | |||
50 | #ifdef CONFIG_ARC_HAS_DCACHE | ||
51 | #define __CONFIG_ARC_HAS_DCACHE 1 | ||
52 | #else | ||
53 | #define __CONFIG_ARC_HAS_DCACHE 0 | ||
54 | #endif | ||
55 | |||
56 | #endif /* __ARC_ASM_DEFINES_H__ */ | ||
diff --git a/arch/arc/include/asm/mmu.h b/arch/arc/include/asm/mmu.h index 56b02320f1a9..33548f975cd2 100644 --- a/arch/arc/include/asm/mmu.h +++ b/arch/arc/include/asm/mmu.h | |||
@@ -9,6 +9,14 @@ | |||
9 | #ifndef _ASM_ARC_MMU_H | 9 | #ifndef _ASM_ARC_MMU_H |
10 | #define _ASM_ARC_MMU_H | 10 | #define _ASM_ARC_MMU_H |
11 | 11 | ||
12 | #if defined(CONFIG_ARC_MMU_V1) | ||
13 | #define CONFIG_ARC_MMU_VER 1 | ||
14 | #elif defined(CONFIG_ARC_MMU_V2) | ||
15 | #define CONFIG_ARC_MMU_VER 2 | ||
16 | #elif defined(CONFIG_ARC_MMU_V3) | ||
17 | #define CONFIG_ARC_MMU_VER 3 | ||
18 | #endif | ||
19 | |||
12 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
13 | 21 | ||
14 | typedef struct { | 22 | typedef struct { |
diff --git a/arch/arc/include/asm/tlb-mmu1.h b/arch/arc/include/asm/tlb-mmu1.h index a5ff961b1efc..351ae6568d0a 100644 --- a/arch/arc/include/asm/tlb-mmu1.h +++ b/arch/arc/include/asm/tlb-mmu1.h | |||
@@ -9,10 +9,11 @@ | |||
9 | #ifndef __ASM_TLB_MMU_V1_H__ | 9 | #ifndef __ASM_TLB_MMU_V1_H__ |
10 | #define __ASM_TLB_MMU_V1_H__ | 10 | #define __ASM_TLB_MMU_V1_H__ |
11 | 11 | ||
12 | #if defined(__ASSEMBLY__) && defined(CONFIG_ARC_MMU_VER == 1) | 12 | #include <asm/mmu.h> |
13 | |||
14 | #include <asm/tlb.h> | 13 | #include <asm/tlb.h> |
15 | 14 | ||
15 | #if defined(__ASSEMBLY__) && (CONFIG_ARC_MMU_VER == 1) | ||
16 | |||
16 | .macro TLB_WRITE_HEURISTICS | 17 | .macro TLB_WRITE_HEURISTICS |
17 | 18 | ||
18 | #define JH_HACK1 | 19 | #define JH_HACK1 |