Commit 1e3ce2b8545390a2aee8dbfcd49ca4161b636000

Authored by Jean-Christophe PLAGNIOL-VILLARD
Committed by Nicolas Ferre
1 parent 1441bd325b

ARN: at91: introduce SOC_AT91xxx define to allow to compile SoC core support

We can now compile all SoC core support together and DT boards.
We still can not compile together the non DT board.
So We keep the ARCH_AT91xxx for the non DT board and for backward defconfig
compatibility. This will enable the plaform_device ressources.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Showing 7 changed files with 101 additions and 62 deletions Side-by-side Diff

arch/arm/configs/at91rm9200_defconfig
... ... @@ -14,6 +14,7 @@
14 14 # CONFIG_BLK_DEV_BSG is not set
15 15 # CONFIG_IOSCHED_CFQ is not set
16 16 CONFIG_ARCH_AT91=y
  17 +CONFIG_ARCH_AT91RM9200=y
17 18 CONFIG_MACH_ONEARM=y
18 19 CONFIG_ARCH_AT91RM9200DK=y
19 20 CONFIG_MACH_AT91RM9200EK=y
arch/arm/mach-at91/Kconfig
... ... @@ -24,68 +24,66 @@
24 24  
25 25 menu "Atmel AT91 System-on-Chip"
26 26  
27   -choice
28   - prompt "Atmel AT91 Processor"
  27 +comment "Atmel AT91 Processor"
29 28  
30   -config ARCH_AT91RM9200
  29 +config SOC_AT91SAM9
  30 + bool
  31 + select CPU_ARM926T
  32 + select AT91_SAM9_TIME
  33 + select AT91_SAM9_SMC
  34 +
  35 +config SOC_AT91RM9200
31 36 bool "AT91RM9200"
32 37 select CPU_ARM920T
33 38 select GENERIC_CLOCKEVENTS
34 39 select HAVE_AT91_DBGU0
35 40  
36   -config ARCH_AT91SAM9260
37   - bool "AT91SAM9260 or AT91SAM9XE"
  41 +config SOC_AT91SAM9260
  42 + bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
38 43 select SOC_AT91SAM9
39 44 select HAVE_AT91_DBGU0
40 45 select HAVE_NET_MACB
  46 + help
  47 + Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
  48 + or AT91SAM9G20 SoC.
41 49  
42   -config ARCH_AT91SAM9261
43   - bool "AT91SAM9261"
  50 +config SOC_AT91SAM9261
  51 + bool "AT91SAM9261 or AT91SAM9G10"
44 52 select SOC_AT91SAM9
45   - select HAVE_FB_ATMEL
46 53 select HAVE_AT91_DBGU0
47   -
48   -config ARCH_AT91SAM9G10
49   - bool "AT91SAM9G10"
50   - select SOC_AT91SAM9
51   - select HAVE_AT91_DBGU0
52 54 select HAVE_FB_ATMEL
  55 + help
  56 + Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
53 57  
54   -config ARCH_AT91SAM9263
  58 +config SOC_AT91SAM9263
55 59 bool "AT91SAM9263"
56 60 select SOC_AT91SAM9
  61 + select HAVE_AT91_DBGU1
57 62 select HAVE_FB_ATMEL
58 63 select HAVE_NET_MACB
59   - select HAVE_AT91_DBGU1
60 64  
61   -config ARCH_AT91SAM9RL
  65 +config SOC_AT91SAM9RL
62 66 bool "AT91SAM9RL"
63 67 select SOC_AT91SAM9
64   - select HAVE_FB_ATMEL
65 68 select HAVE_AT91_DBGU0
  69 + select HAVE_FB_ATMEL
66 70  
67   -config ARCH_AT91SAM9G20
68   - bool "AT91SAM9G20"
69   - select SOC_AT91SAM9
70   - select HAVE_AT91_DBGU0
71   - select HAVE_NET_MACB
72   -
73   -config ARCH_AT91SAM9G45
  71 +config SOC_AT91SAM9G45
74 72 bool "AT91SAM9G45 or AT91SAM9M10 families"
75 73 select SOC_AT91SAM9
  74 + select HAVE_AT91_DBGU1
76 75 select HAVE_FB_ATMEL
77 76 select HAVE_NET_MACB
78   - select HAVE_AT91_DBGU1
79 77 help
80 78 Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
81 79 This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
82 80  
83   -config ARCH_AT91SAM9X5
  81 +config SOC_AT91SAM9X5
84 82 bool "AT91SAM9x5 family"
85 83 select SOC_AT91SAM9
  84 + select HAVE_AT91_DBGU0
86 85 select HAVE_FB_ATMEL
87 86 select HAVE_NET_MACB
88   - select HAVE_AT91_DBGU0
89 87 help
90 88 Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
91 89 This means that your SAM9 name finishes with a '5' (except if it is
92 90  
... ... @@ -93,8 +91,47 @@
93 91 This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35
94 92 and AT91SAM9X35.
95 93  
  94 +choice
  95 + prompt "Atmel AT91 Processor Devices for non DT boards"
  96 +
  97 +config ARCH_AT91_NONE
  98 + bool "None"
  99 +
  100 +config ARCH_AT91RM9200
  101 + bool "AT91RM9200"
  102 + select SOC_AT91RM9200
  103 +
  104 +config ARCH_AT91SAM9260
  105 + bool "AT91SAM9260 or AT91SAM9XE"
  106 + select SOC_AT91SAM9260
  107 +
  108 +config ARCH_AT91SAM9261
  109 + bool "AT91SAM9261"
  110 + select SOC_AT91SAM9261
  111 +
  112 +config ARCH_AT91SAM9G10
  113 + bool "AT91SAM9G10"
  114 + select SOC_AT91SAM9261
  115 +
  116 +config ARCH_AT91SAM9263
  117 + bool "AT91SAM9263"
  118 + select SOC_AT91SAM9263
  119 +
  120 +config ARCH_AT91SAM9RL
  121 + bool "AT91SAM9RL"
  122 + select SOC_AT91SAM9RL
  123 +
  124 +config ARCH_AT91SAM9G20
  125 + bool "AT91SAM9G20"
  126 + select SOC_AT91SAM9260
  127 +
  128 +config ARCH_AT91SAM9G45
  129 + bool "AT91SAM9G45"
  130 + select SOC_AT91SAM9G45
  131 +
96 132 config ARCH_AT91X40
97 133 bool "AT91x40"
  134 + depends on !MMU
98 135 select ARCH_USES_GETTIMEOFFSET
99 136  
100 137 endchoice
arch/arm/mach-at91/Makefile
... ... @@ -13,15 +13,22 @@
13 13 obj-$(CONFIG_SOC_AT91SAM9) += at91sam926x_time.o sam9_smc.o
14 14  
15 15 # CPU-specific support
16   -obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
17   -obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam9260_devices.o
18   -obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam9261_devices.o
19   -obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam9261_devices.o
20   -obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam9263_devices.o
21   -obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam9rl_devices.o
22   -obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam9260_devices.o
23   -obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam9g45_devices.o
24   -obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o
  16 +obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o
  17 +obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o
  18 +obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o
  19 +obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o
  20 +obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o
  21 +obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o
  22 +obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o
  23 +
  24 +obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200_devices.o
  25 +obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o
  26 +obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o
  27 +obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o
  28 +obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o
  29 +obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl_devices.o
  30 +obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o
  31 +obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o
25 32 obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
26 33  
27 34 # AT91RM9200 board-specific support
arch/arm/mach-at91/include/mach/cpu.h
... ... @@ -54,6 +54,7 @@
54 54 #define ARCH_REVISON_9200_BGA (0 << 0)
55 55 #define ARCH_REVISON_9200_PQFP (1 << 0)
56 56  
  57 +#ifndef __ASSEMBLY__
57 58 enum at91_soc_type {
58 59 /* 920T */
59 60 AT91_SOC_RM9200,
... ... @@ -106,7 +107,7 @@
106 107 return at91_soc_initdata.type != AT91_SOC_NONE;
107 108 }
108 109  
109   -#ifdef CONFIG_ARCH_AT91RM9200
  110 +#ifdef CONFIG_SOC_AT91RM9200
110 111 #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200)
111 112 #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)
112 113 #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP)
113 114  
114 115  
115 116  
116 117  
117 118  
118 119  
119 120  
120 121  
... ... @@ -116,45 +117,37 @@
116 117 #define cpu_is_at91rm9200_pqfp() (0)
117 118 #endif
118 119  
119   -#ifdef CONFIG_ARCH_AT91SAM9260
  120 +#ifdef CONFIG_SOC_AT91SAM9260
120 121 #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)
121 122 #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260)
  123 +#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
122 124 #else
123 125 #define cpu_is_at91sam9xe() (0)
124 126 #define cpu_is_at91sam9260() (0)
125   -#endif
126   -
127   -#ifdef CONFIG_ARCH_AT91SAM9G20
128   -#define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20)
129   -#else
130 127 #define cpu_is_at91sam9g20() (0)
131 128 #endif
132 129  
133   -#ifdef CONFIG_ARCH_AT91SAM9261
  130 +#ifdef CONFIG_SOC_AT91SAM9261
134 131 #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261)
135   -#else
136   -#define cpu_is_at91sam9261() (0)
137   -#endif
138   -
139   -#ifdef CONFIG_ARCH_AT91SAM9G10
140 132 #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10)
141 133 #else
  134 +#define cpu_is_at91sam9261() (0)
142 135 #define cpu_is_at91sam9g10() (0)
143 136 #endif
144 137  
145   -#ifdef CONFIG_ARCH_AT91SAM9263
  138 +#ifdef CONFIG_SOC_AT91SAM9263
146 139 #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263)
147 140 #else
148 141 #define cpu_is_at91sam9263() (0)
149 142 #endif
150 143  
151   -#ifdef CONFIG_ARCH_AT91SAM9RL
  144 +#ifdef CONFIG_SOC_AT91SAM9RL
152 145 #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL)
153 146 #else
154 147 #define cpu_is_at91sam9rl() (0)
155 148 #endif
156 149  
157   -#ifdef CONFIG_ARCH_AT91SAM9G45
  150 +#ifdef CONFIG_SOC_AT91SAM9G45
158 151 #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45)
159 152 #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)
160 153 #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10)
... ... @@ -168,7 +161,7 @@
168 161 #define cpu_is_at91sam9m11() (0)
169 162 #endif
170 163  
171   -#ifdef CONFIG_ARCH_AT91SAM9X5
  164 +#ifdef CONFIG_SOC_AT91SAM9X5
172 165 #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5)
173 166 #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)
174 167 #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35)
... ... @@ -189,6 +182,7 @@
189 182 * definitions may reduce clutter in common drivers.
190 183 */
191 184 #define cpu_is_at32ap7000() (0)
  185 +#endif /* __ASSEMBLY__ */
192 186  
193 187 #endif /* __MACH_CPU_H__ */
arch/arm/mach-at91/pm.h
... ... @@ -70,7 +70,7 @@
70 70 at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
71 71 }
72 72  
73   -#ifdef CONFIG_ARCH_AT91SAM9263
  73 +#ifdef CONFIG_SOC_AT91SAM9263
74 74 /*
75 75 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
76 76 * handle those cases both here and in the Suspend-To-RAM support.
arch/arm/mach-at91/pm_slowclock.S
... ... @@ -18,7 +18,7 @@
18 18 #include <mach/at91_ramc.h>
19 19  
20 20  
21   -#ifdef CONFIG_ARCH_AT91SAM9263
  21 +#ifdef CONFIG_SOC_AT91SAM9263
22 22 /*
23 23 * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
24 24 * handle those cases both here and in the Suspend-To-RAM support.
arch/arm/mach-at91/soc.h
... ... @@ -26,31 +26,31 @@
26 26 return at91_boot_soc.init != NULL;
27 27 }
28 28  
29   -#if !defined(CONFIG_ARCH_AT91RM9200)
  29 +#if !defined(CONFIG_SOC_AT91RM9200)
30 30 #define at91rm9200_soc at91_boot_soc
31 31 #endif
32 32  
33   -#if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20))
  33 +#if !defined(CONFIG_SOC_AT91SAM9260)
34 34 #define at91sam9260_soc at91_boot_soc
35 35 #endif
36 36  
37   -#if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10))
  37 +#if !defined(CONFIG_SOC_AT91SAM9261)
38 38 #define at91sam9261_soc at91_boot_soc
39 39 #endif
40 40  
41   -#if !defined(CONFIG_ARCH_AT91SAM9263)
  41 +#if !defined(CONFIG_SOC_AT91SAM9263)
42 42 #define at91sam9263_soc at91_boot_soc
43 43 #endif
44 44  
45   -#if !defined(CONFIG_ARCH_AT91SAM9G45)
  45 +#if !defined(CONFIG_SOC_AT91SAM9G45)
46 46 #define at91sam9g45_soc at91_boot_soc
47 47 #endif
48 48  
49   -#if !defined(CONFIG_ARCH_AT91SAM9RL)
  49 +#if !defined(CONFIG_SOC_AT91SAM9RL)
50 50 #define at91sam9rl_soc at91_boot_soc
51 51 #endif
52 52  
53   -#if !defined(CONFIG_ARCH_AT91SAM9X5)
  53 +#if !defined(CONFIG_SOC_AT91SAM9X5)
54 54 #define at91sam9x5_soc at91_boot_soc
55 55 #endif