diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-01-15 16:58:13 -0500 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2015-02-02 05:01:26 -0500 |
commit | 2b019a43cc70d35c3af97c8d673b2b4581f98297 (patch) | |
tree | 518e6b303ebae42a65eed0edf3c5af1fdfa427de /arch/arm | |
parent | 7d7ffd7bae4c15400e0cf8ef61ce4679a4472409 (diff) |
ARM: at91: merge all SOC_AT91SAM9xxx
Only use SOC_AT91SAM9 for all the at91sam9 SoCs. It removes all the empty
at91sam9xxx.c SoC files. It also removes the useless at91_init_soc affectation
procedure and its "init" function pointer.
Only the SoC detection and display are kept for the at91sam9:
at91_soc_is_enabled() and at91_boot_soc.map_io() function calls are also
removed.
It enables HAVE_AT91_SMD and HAVE_AT91_UTMI for all the sam9 SoCs but this only
represents 96 bytes of uncompressed kernel code.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
[nicolas.ferre@atmel.com: different organization of the patches]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/configs/at91_dt_defconfig | 10 | ||||
-rw-r--r-- | arch/arm/mach-at91/Kconfig | 92 | ||||
-rw-r--r-- | arch/arm/mach-at91/Makefile | 7 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9n12.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9x5.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/cpu.h | 52 | ||||
-rw-r--r-- | arch/arm/mach-at91/setup.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-at91/soc.h | 36 |
13 files changed, 41 insertions, 339 deletions
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index a67375f24b21..f2670f638e97 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -15,15 +15,7 @@ CONFIG_MODULE_UNLOAD=y | |||
15 | # CONFIG_IOSCHED_CFQ is not set | 15 | # CONFIG_IOSCHED_CFQ is not set |
16 | CONFIG_ARCH_AT91=y | 16 | CONFIG_ARCH_AT91=y |
17 | CONFIG_SOC_AT91RM9200=y | 17 | CONFIG_SOC_AT91RM9200=y |
18 | CONFIG_SOC_AT91SAM9260=y | 18 | CONFIG_SOC_AT91SAM9=y |
19 | CONFIG_SOC_AT91SAM9261=y | ||
20 | CONFIG_SOC_AT91SAM9263=y | ||
21 | CONFIG_SOC_AT91SAM9RL=y | ||
22 | CONFIG_SOC_AT91SAM9G45=y | ||
23 | CONFIG_SOC_AT91SAM9X5=y | ||
24 | CONFIG_SOC_AT91SAM9N12=y | ||
25 | CONFIG_MACH_AT91RM9200_DT=y | ||
26 | CONFIG_MACH_AT91SAM9_DT=y | ||
27 | CONFIG_AT91_TIMER_HZ=128 | 19 | CONFIG_AT91_TIMER_HZ=128 |
28 | CONFIG_AEABI=y | 20 | CONFIG_AEABI=y |
29 | CONFIG_UACCESS_WITH_MEMCPY=y | 21 | CONFIG_UACCESS_WITH_MEMCPY=y |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index c6956b863b9d..c6740e359a44 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -16,15 +16,6 @@ config HAVE_AT91_SMD | |||
16 | config HAVE_AT91_H32MX | 16 | config HAVE_AT91_H32MX |
17 | bool | 17 | bool |
18 | 18 | ||
19 | config SOC_AT91SAM9 | ||
20 | bool | ||
21 | select ATMEL_AIC_IRQ | ||
22 | select COMMON_CLK_AT91 | ||
23 | select CPU_ARM926T | ||
24 | select GENERIC_CLOCKEVENTS | ||
25 | select MEMORY | ||
26 | select ATMEL_SDRAMC | ||
27 | |||
28 | config SOC_SAMA5 | 19 | config SOC_SAMA5 |
29 | bool | 20 | bool |
30 | select ATMEL_AIC5_IRQ | 21 | select ATMEL_AIC5_IRQ |
@@ -92,67 +83,36 @@ config SOC_AT91RM9200 | |||
92 | select GENERIC_CLOCKEVENTS | 83 | select GENERIC_CLOCKEVENTS |
93 | select HAVE_AT91_USB_CLK | 84 | select HAVE_AT91_USB_CLK |
94 | 85 | ||
95 | config SOC_AT91SAM9260 | 86 | config SOC_AT91SAM9 |
96 | bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20" | 87 | bool "AT91SAM9" |
97 | select SOC_AT91SAM9 | 88 | select ATMEL_AIC_IRQ |
98 | select HAVE_AT91_USB_CLK | 89 | select ATMEL_SDRAMC |
99 | help | 90 | select COMMON_CLK_AT91 |
100 | Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE | 91 | select CPU_ARM926T |
101 | or AT91SAM9G20 SoC. | 92 | select GENERIC_CLOCKEVENTS |
102 | |||
103 | config SOC_AT91SAM9261 | ||
104 | bool "AT91SAM9261 or AT91SAM9G10" | ||
105 | select HAVE_FB_ATMEL | ||
106 | select SOC_AT91SAM9 | ||
107 | select HAVE_AT91_USB_CLK | ||
108 | help | ||
109 | Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC. | ||
110 | |||
111 | config SOC_AT91SAM9263 | ||
112 | bool "AT91SAM9263" | ||
113 | select HAVE_FB_ATMEL | ||
114 | select SOC_AT91SAM9 | ||
115 | select HAVE_AT91_USB_CLK | ||
116 | |||
117 | config SOC_AT91SAM9RL | ||
118 | bool "AT91SAM9RL" | ||
119 | select HAVE_FB_ATMEL | ||
120 | select SOC_AT91SAM9 | ||
121 | select HAVE_AT91_UTMI | ||
122 | |||
123 | config SOC_AT91SAM9G45 | ||
124 | bool "AT91SAM9G45 or AT91SAM9M10 families" | ||
125 | select HAVE_FB_ATMEL | ||
126 | select SOC_AT91SAM9 | ||
127 | select HAVE_AT91_UTMI | ||
128 | select HAVE_AT91_USB_CLK | ||
129 | help | ||
130 | Select this if you are using one of Atmel's AT91SAM9G45 family SoC. | ||
131 | This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11. | ||
132 | |||
133 | config SOC_AT91SAM9X5 | ||
134 | bool "AT91SAM9x5 family" | ||
135 | select HAVE_FB_ATMEL | ||
136 | select SOC_AT91SAM9 | ||
137 | select HAVE_AT91_UTMI | ||
138 | select HAVE_AT91_SMD | 93 | select HAVE_AT91_SMD |
139 | select HAVE_AT91_USB_CLK | 94 | select HAVE_AT91_USB_CLK |
140 | help | 95 | select HAVE_AT91_UTMI |
141 | Select this if you are using one of Atmel's AT91SAM9x5 family SoC. | ||
142 | This means that your SAM9 name finishes with a '5' (except if it is | ||
143 | AT91SAM9G45!). | ||
144 | This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35 | ||
145 | and AT91SAM9X35. | ||
146 | |||
147 | config SOC_AT91SAM9N12 | ||
148 | bool "AT91SAM9N12 family" | ||
149 | select HAVE_FB_ATMEL | 96 | select HAVE_FB_ATMEL |
150 | select SOC_AT91SAM9 | 97 | select MEMORY |
151 | select HAVE_AT91_USB_CLK | ||
152 | help | 98 | help |
153 | Select this if you are using Atmel's AT91SAM9N12 SoC. | 99 | Select this if you are using one of those Atmel SoC: |
154 | 100 | AT91SAM9260 | |
155 | # ---------------------------------------------------------- | 101 | AT91SAM9261 |
102 | AT91SAM9263 | ||
103 | AT91SAM9G15 | ||
104 | AT91SAM9G20 | ||
105 | AT91SAM9G25 | ||
106 | AT91SAM9G35 | ||
107 | AT91SAM9G45 | ||
108 | AT91SAM9G46 | ||
109 | AT91SAM9M10 | ||
110 | AT91SAM9M11 | ||
111 | AT91SAM9N12 | ||
112 | AT91SAM9RL | ||
113 | AT91SAM9X25 | ||
114 | AT91SAM9X35 | ||
115 | AT91SAM9XE | ||
156 | endif # SOC_SAM_V4_V5 | 116 | endif # SOC_SAM_V4_V5 |
157 | 117 | ||
158 | comment "AT91 Feature Selections" | 118 | comment "AT91 Feature Selections" |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 8ef7d9a2e855..ad7fc5834188 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -8,13 +8,6 @@ obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o | |||
8 | 8 | ||
9 | # CPU-specific support | 9 | # CPU-specific support |
10 | obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o | 10 | obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o |
11 | obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o | ||
12 | obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o | ||
13 | obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o | ||
14 | obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o | ||
15 | obj-$(CONFIG_SOC_AT91SAM9N12) += at91sam9n12.o | ||
16 | obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o | ||
17 | obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o | ||
18 | obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o | 11 | obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o |
19 | obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o | 12 | obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o |
20 | 13 | ||
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c deleted file mode 100644 index 37b7ce4c6a3b..000000000000 --- a/arch/arm/mach-at91/at91sam9260.c +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at91sam9260.c | ||
3 | * | ||
4 | * Copyright (C) 2006 SAN People | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <asm/system_misc.h> | ||
14 | #include <mach/cpu.h> | ||
15 | #include <mach/at91_dbgu.h> | ||
16 | #include <mach/hardware.h> | ||
17 | |||
18 | #include "soc.h" | ||
19 | #include "generic.h" | ||
20 | |||
21 | /* -------------------------------------------------------------------- | ||
22 | * AT91SAM9260 processor initialization | ||
23 | * -------------------------------------------------------------------- */ | ||
24 | |||
25 | AT91_SOC_START(at91sam9260) | ||
26 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c deleted file mode 100644 index aebbf76b6038..000000000000 --- a/arch/arm/mach-at91/at91sam9261.c +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at91sam9261.c | ||
3 | * | ||
4 | * Copyright (C) 2005 SAN People | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <asm/system_misc.h> | ||
14 | #include <mach/cpu.h> | ||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | #include "soc.h" | ||
18 | #include "generic.h" | ||
19 | |||
20 | /* -------------------------------------------------------------------- | ||
21 | * AT91SAM9261 processor initialization | ||
22 | * -------------------------------------------------------------------- */ | ||
23 | |||
24 | AT91_SOC_START(at91sam9261) | ||
25 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c deleted file mode 100644 index dca29457d9cc..000000000000 --- a/arch/arm/mach-at91/at91sam9263.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at91sam9263.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Atmel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <asm/system_misc.h> | ||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | #include "soc.h" | ||
17 | #include "generic.h" | ||
18 | |||
19 | /* -------------------------------------------------------------------- | ||
20 | * AT91SAM9263 processor initialization | ||
21 | * -------------------------------------------------------------------- */ | ||
22 | |||
23 | AT91_SOC_START(at91sam9263) | ||
24 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c deleted file mode 100644 index 4957a9ef748a..000000000000 --- a/arch/arm/mach-at91/at91sam9g45.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Chip-specific setup code for the AT91SAM9G45 family | ||
3 | * | ||
4 | * Copyright (C) 2009 Atmel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <asm/system_misc.h> | ||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | #include "soc.h" | ||
17 | #include "generic.h" | ||
18 | |||
19 | /* -------------------------------------------------------------------- | ||
20 | * AT91SAM9G45 processor initialization | ||
21 | * -------------------------------------------------------------------- */ | ||
22 | |||
23 | AT91_SOC_START(at91sam9g45) | ||
24 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c deleted file mode 100644 index b5ea69a3eaf6..000000000000 --- a/arch/arm/mach-at91/at91sam9n12.c +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * SoC specific setup code for the AT91SAM9N12 | ||
3 | * | ||
4 | * Copyright (C) 2012 Atmel Corporation. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #include <asm/system_misc.h> | ||
10 | #include <mach/hardware.h> | ||
11 | |||
12 | #include "soc.h" | ||
13 | #include "generic.h" | ||
14 | |||
15 | /* -------------------------------------------------------------------- | ||
16 | * AT91SAM9N12 processor initialization | ||
17 | * -------------------------------------------------------------------- */ | ||
18 | |||
19 | AT91_SOC_START(at91sam9n12) | ||
20 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c deleted file mode 100644 index 6cb40e4ec20f..000000000000 --- a/arch/arm/mach-at91/at91sam9rl.c +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/at91sam9rl.c | ||
3 | * | ||
4 | * Copyright (C) 2005 SAN People | ||
5 | * Copyright (C) 2007 Atmel Corporation | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file COPYING in the main directory of this archive for | ||
9 | * more details. | ||
10 | */ | ||
11 | |||
12 | #include <asm/system_misc.h> | ||
13 | #include <mach/cpu.h> | ||
14 | #include <mach/at91_dbgu.h> | ||
15 | #include <mach/hardware.h> | ||
16 | |||
17 | #include "soc.h" | ||
18 | #include "generic.h" | ||
19 | |||
20 | /* -------------------------------------------------------------------- | ||
21 | * AT91SAM9RL processor initialization | ||
22 | * -------------------------------------------------------------------- */ | ||
23 | |||
24 | AT91_SOC_START(at91sam9rl) | ||
25 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c deleted file mode 100644 index 7b60a529db01..000000000000 --- a/arch/arm/mach-at91/at91sam9x5.c +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * Chip-specific setup code for the AT91SAM9x5 family | ||
3 | * | ||
4 | * Copyright (C) 2010-2012 Atmel Corporation. | ||
5 | * | ||
6 | * Licensed under GPLv2 or later. | ||
7 | */ | ||
8 | |||
9 | #include <asm/system_misc.h> | ||
10 | #include <mach/hardware.h> | ||
11 | |||
12 | #include "soc.h" | ||
13 | #include "generic.h" | ||
14 | |||
15 | /* -------------------------------------------------------------------- | ||
16 | * AT91SAM9x5 processor initialization | ||
17 | * -------------------------------------------------------------------- */ | ||
18 | |||
19 | AT91_SOC_START(at91sam9x5) | ||
20 | AT91_SOC_END | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 61914fb35f5d..ce7c80a44983 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -152,69 +152,45 @@ static inline int at91_soc_is_detected(void) | |||
152 | #define cpu_is_at91rm9200_pqfp() (0) | 152 | #define cpu_is_at91rm9200_pqfp() (0) |
153 | #endif | 153 | #endif |
154 | 154 | ||
155 | #ifdef CONFIG_SOC_AT91SAM9260 | 155 | #ifdef CONFIG_SOC_AT91SAM9 |
156 | #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) | 156 | #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) |
157 | #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) | 157 | #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) |
158 | #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) | 158 | #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) |
159 | #else | ||
160 | #define cpu_is_at91sam9xe() (0) | ||
161 | #define cpu_is_at91sam9260() (0) | ||
162 | #define cpu_is_at91sam9g20() (0) | ||
163 | #endif | ||
164 | |||
165 | #ifdef CONFIG_SOC_AT91SAM9261 | ||
166 | #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) | 159 | #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) |
167 | #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) | 160 | #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) |
168 | #else | ||
169 | #define cpu_is_at91sam9261() (0) | ||
170 | #define cpu_is_at91sam9g10() (0) | ||
171 | #endif | ||
172 | |||
173 | #ifdef CONFIG_SOC_AT91SAM9263 | ||
174 | #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) | 161 | #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) |
175 | #else | ||
176 | #define cpu_is_at91sam9263() (0) | ||
177 | #endif | ||
178 | |||
179 | #ifdef CONFIG_SOC_AT91SAM9RL | ||
180 | #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) | 162 | #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) |
181 | #else | ||
182 | #define cpu_is_at91sam9rl() (0) | ||
183 | #endif | ||
184 | |||
185 | #ifdef CONFIG_SOC_AT91SAM9G45 | ||
186 | #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) | 163 | #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) |
187 | #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) | 164 | #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) |
188 | #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) | 165 | #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) |
189 | #define cpu_is_at91sam9g46() (at91_soc_initdata.subtype == AT91_SOC_SAM9G46) | 166 | #define cpu_is_at91sam9g46() (at91_soc_initdata.subtype == AT91_SOC_SAM9G46) |
190 | #define cpu_is_at91sam9m11() (at91_soc_initdata.subtype == AT91_SOC_SAM9M11) | 167 | #define cpu_is_at91sam9m11() (at91_soc_initdata.subtype == AT91_SOC_SAM9M11) |
191 | #else | ||
192 | #define cpu_is_at91sam9g45() (0) | ||
193 | #define cpu_is_at91sam9g45es() (0) | ||
194 | #define cpu_is_at91sam9m10() (0) | ||
195 | #define cpu_is_at91sam9g46() (0) | ||
196 | #define cpu_is_at91sam9m11() (0) | ||
197 | #endif | ||
198 | |||
199 | #ifdef CONFIG_SOC_AT91SAM9X5 | ||
200 | #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) | 168 | #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) |
201 | #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) | 169 | #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) |
202 | #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) | 170 | #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) |
203 | #define cpu_is_at91sam9x35() (at91_soc_initdata.subtype == AT91_SOC_SAM9X35) | 171 | #define cpu_is_at91sam9x35() (at91_soc_initdata.subtype == AT91_SOC_SAM9X35) |
204 | #define cpu_is_at91sam9g25() (at91_soc_initdata.subtype == AT91_SOC_SAM9G25) | 172 | #define cpu_is_at91sam9g25() (at91_soc_initdata.subtype == AT91_SOC_SAM9G25) |
205 | #define cpu_is_at91sam9x25() (at91_soc_initdata.subtype == AT91_SOC_SAM9X25) | 173 | #define cpu_is_at91sam9x25() (at91_soc_initdata.subtype == AT91_SOC_SAM9X25) |
174 | #define cpu_is_at91sam9n12() (at91_soc_initdata.type == AT91_SOC_SAM9N12) | ||
206 | #else | 175 | #else |
176 | #define cpu_is_at91sam9xe() (0) | ||
177 | #define cpu_is_at91sam9260() (0) | ||
178 | #define cpu_is_at91sam9g20() (0) | ||
179 | #define cpu_is_at91sam9261() (0) | ||
180 | #define cpu_is_at91sam9g10() (0) | ||
181 | #define cpu_is_at91sam9263() (0) | ||
182 | #define cpu_is_at91sam9rl() (0) | ||
183 | #define cpu_is_at91sam9g45() (0) | ||
184 | #define cpu_is_at91sam9g45es() (0) | ||
185 | #define cpu_is_at91sam9m10() (0) | ||
186 | #define cpu_is_at91sam9g46() (0) | ||
187 | #define cpu_is_at91sam9m11() (0) | ||
207 | #define cpu_is_at91sam9x5() (0) | 188 | #define cpu_is_at91sam9x5() (0) |
208 | #define cpu_is_at91sam9g15() (0) | 189 | #define cpu_is_at91sam9g15() (0) |
209 | #define cpu_is_at91sam9g35() (0) | 190 | #define cpu_is_at91sam9g35() (0) |
210 | #define cpu_is_at91sam9x35() (0) | 191 | #define cpu_is_at91sam9x35() (0) |
211 | #define cpu_is_at91sam9g25() (0) | 192 | #define cpu_is_at91sam9g25() (0) |
212 | #define cpu_is_at91sam9x25() (0) | 193 | #define cpu_is_at91sam9x25() (0) |
213 | #endif | ||
214 | |||
215 | #ifdef CONFIG_SOC_AT91SAM9N12 | ||
216 | #define cpu_is_at91sam9n12() (at91_soc_initdata.type == AT91_SOC_SAM9N12) | ||
217 | #else | ||
218 | #define cpu_is_at91sam9n12() (0) | 194 | #define cpu_is_at91sam9n12() (0) |
219 | #endif | 195 | #endif |
220 | 196 | ||
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c index 4c184285d38f..41abd1708496 100644 --- a/arch/arm/mach-at91/setup.c +++ b/arch/arm/mach-at91/setup.c | |||
@@ -66,48 +66,40 @@ static void __init soc_detect(u32 dbgu_base) | |||
66 | case ARCH_ID_AT91SAM9260: | 66 | case ARCH_ID_AT91SAM9260: |
67 | at91_soc_initdata.type = AT91_SOC_SAM9260; | 67 | at91_soc_initdata.type = AT91_SOC_SAM9260; |
68 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; | 68 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; |
69 | at91_boot_soc = at91sam9260_soc; | ||
70 | break; | 69 | break; |
71 | 70 | ||
72 | case ARCH_ID_AT91SAM9261: | 71 | case ARCH_ID_AT91SAM9261: |
73 | at91_soc_initdata.type = AT91_SOC_SAM9261; | 72 | at91_soc_initdata.type = AT91_SOC_SAM9261; |
74 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; | 73 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; |
75 | at91_boot_soc = at91sam9261_soc; | ||
76 | break; | 74 | break; |
77 | 75 | ||
78 | case ARCH_ID_AT91SAM9263: | 76 | case ARCH_ID_AT91SAM9263: |
79 | at91_soc_initdata.type = AT91_SOC_SAM9263; | 77 | at91_soc_initdata.type = AT91_SOC_SAM9263; |
80 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; | 78 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; |
81 | at91_boot_soc = at91sam9263_soc; | ||
82 | break; | 79 | break; |
83 | 80 | ||
84 | case ARCH_ID_AT91SAM9G20: | 81 | case ARCH_ID_AT91SAM9G20: |
85 | at91_soc_initdata.type = AT91_SOC_SAM9G20; | 82 | at91_soc_initdata.type = AT91_SOC_SAM9G20; |
86 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; | 83 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; |
87 | at91_boot_soc = at91sam9260_soc; | ||
88 | break; | 84 | break; |
89 | 85 | ||
90 | case ARCH_ID_AT91SAM9G45: | 86 | case ARCH_ID_AT91SAM9G45: |
91 | at91_soc_initdata.type = AT91_SOC_SAM9G45; | 87 | at91_soc_initdata.type = AT91_SOC_SAM9G45; |
92 | if (cidr == ARCH_ID_AT91SAM9G45ES) | 88 | if (cidr == ARCH_ID_AT91SAM9G45ES) |
93 | at91_soc_initdata.subtype = AT91_SOC_SAM9G45ES; | 89 | at91_soc_initdata.subtype = AT91_SOC_SAM9G45ES; |
94 | at91_boot_soc = at91sam9g45_soc; | ||
95 | break; | 90 | break; |
96 | 91 | ||
97 | case ARCH_ID_AT91SAM9RL64: | 92 | case ARCH_ID_AT91SAM9RL64: |
98 | at91_soc_initdata.type = AT91_SOC_SAM9RL; | 93 | at91_soc_initdata.type = AT91_SOC_SAM9RL; |
99 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; | 94 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; |
100 | at91_boot_soc = at91sam9rl_soc; | ||
101 | break; | 95 | break; |
102 | 96 | ||
103 | case ARCH_ID_AT91SAM9X5: | 97 | case ARCH_ID_AT91SAM9X5: |
104 | at91_soc_initdata.type = AT91_SOC_SAM9X5; | 98 | at91_soc_initdata.type = AT91_SOC_SAM9X5; |
105 | at91_boot_soc = at91sam9x5_soc; | ||
106 | break; | 99 | break; |
107 | 100 | ||
108 | case ARCH_ID_AT91SAM9N12: | 101 | case ARCH_ID_AT91SAM9N12: |
109 | at91_soc_initdata.type = AT91_SOC_SAM9N12; | 102 | at91_soc_initdata.type = AT91_SOC_SAM9N12; |
110 | at91_boot_soc = at91sam9n12_soc; | ||
111 | break; | 103 | break; |
112 | 104 | ||
113 | case ARCH_ID_SAMA5: | 105 | case ARCH_ID_SAMA5: |
@@ -123,13 +115,11 @@ static void __init soc_detect(u32 dbgu_base) | |||
123 | if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { | 115 | if ((socid & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) { |
124 | at91_soc_initdata.type = AT91_SOC_SAM9G10; | 116 | at91_soc_initdata.type = AT91_SOC_SAM9G10; |
125 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; | 117 | at91_soc_initdata.subtype = AT91_SOC_SUBTYPE_NONE; |
126 | at91_boot_soc = at91sam9261_soc; | ||
127 | } | 118 | } |
128 | /* at91sam9xe */ | 119 | /* at91sam9xe */ |
129 | else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) { | 120 | else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) { |
130 | at91_soc_initdata.type = AT91_SOC_SAM9260; | 121 | at91_soc_initdata.type = AT91_SOC_SAM9260; |
131 | at91_soc_initdata.subtype = AT91_SOC_SAM9XE; | 122 | at91_soc_initdata.subtype = AT91_SOC_SAM9XE; |
132 | at91_boot_soc = at91sam9260_soc; | ||
133 | } | 123 | } |
134 | 124 | ||
135 | if (!at91_soc_is_detected()) | 125 | if (!at91_soc_is_detected()) |
@@ -318,12 +308,6 @@ void __init at91_map_io(void) | |||
318 | if (at91_soc_initdata.subtype != AT91_SOC_SUBTYPE_NONE) | 308 | if (at91_soc_initdata.subtype != AT91_SOC_SUBTYPE_NONE) |
319 | pr_info("Detected soc subtype: %s\n", | 309 | pr_info("Detected soc subtype: %s\n", |
320 | at91_get_soc_subtype(&at91_soc_initdata)); | 310 | at91_get_soc_subtype(&at91_soc_initdata)); |
321 | |||
322 | if (!at91_soc_is_enabled()) | ||
323 | panic(pr_fmt("Soc not enabled")); | ||
324 | |||
325 | if (at91_boot_soc.map_io) | ||
326 | at91_boot_soc.map_io(); | ||
327 | } | 311 | } |
328 | 312 | ||
329 | void __init at91_alt_map_io(void) | 313 | void __init at91_alt_map_io(void) |
@@ -401,7 +385,4 @@ static void at91_dt_ramc(void) | |||
401 | void __init at91_dt_initialize(void) | 385 | void __init at91_dt_initialize(void) |
402 | { | 386 | { |
403 | at91_dt_ramc(); | 387 | at91_dt_ramc(); |
404 | |||
405 | if (at91_boot_soc.init) | ||
406 | at91_boot_soc.init(); | ||
407 | } | 388 | } |
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h index ae6c0b2f1146..0593dcceb287 100644 --- a/arch/arm/mach-at91/soc.h +++ b/arch/arm/mach-at91/soc.h | |||
@@ -7,18 +7,10 @@ | |||
7 | struct at91_init_soc { | 7 | struct at91_init_soc { |
8 | int builtin; | 8 | int builtin; |
9 | void (*map_io)(void); | 9 | void (*map_io)(void); |
10 | void (*init)(void); | ||
11 | }; | 10 | }; |
12 | 11 | ||
13 | extern struct at91_init_soc at91_boot_soc; | 12 | extern struct at91_init_soc at91_boot_soc; |
14 | extern struct at91_init_soc at91rm9200_soc; | 13 | extern struct at91_init_soc at91rm9200_soc; |
15 | extern struct at91_init_soc at91sam9260_soc; | ||
16 | extern struct at91_init_soc at91sam9261_soc; | ||
17 | extern struct at91_init_soc at91sam9263_soc; | ||
18 | extern struct at91_init_soc at91sam9g45_soc; | ||
19 | extern struct at91_init_soc at91sam9rl_soc; | ||
20 | extern struct at91_init_soc at91sam9x5_soc; | ||
21 | extern struct at91_init_soc at91sam9n12_soc; | ||
22 | extern struct at91_init_soc sama5d3_soc; | 14 | extern struct at91_init_soc sama5d3_soc; |
23 | extern struct at91_init_soc sama5d4_soc; | 15 | extern struct at91_init_soc sama5d4_soc; |
24 | 16 | ||
@@ -40,34 +32,6 @@ static inline int at91_soc_is_enabled(void) | |||
40 | #define at91rm9200_soc at91_boot_soc | 32 | #define at91rm9200_soc at91_boot_soc |
41 | #endif | 33 | #endif |
42 | 34 | ||
43 | #if !defined(CONFIG_SOC_AT91SAM9260) | ||
44 | #define at91sam9260_soc at91_boot_soc | ||
45 | #endif | ||
46 | |||
47 | #if !defined(CONFIG_SOC_AT91SAM9261) | ||
48 | #define at91sam9261_soc at91_boot_soc | ||
49 | #endif | ||
50 | |||
51 | #if !defined(CONFIG_SOC_AT91SAM9263) | ||
52 | #define at91sam9263_soc at91_boot_soc | ||
53 | #endif | ||
54 | |||
55 | #if !defined(CONFIG_SOC_AT91SAM9G45) | ||
56 | #define at91sam9g45_soc at91_boot_soc | ||
57 | #endif | ||
58 | |||
59 | #if !defined(CONFIG_SOC_AT91SAM9RL) | ||
60 | #define at91sam9rl_soc at91_boot_soc | ||
61 | #endif | ||
62 | |||
63 | #if !defined(CONFIG_SOC_AT91SAM9X5) | ||
64 | #define at91sam9x5_soc at91_boot_soc | ||
65 | #endif | ||
66 | |||
67 | #if !defined(CONFIG_SOC_AT91SAM9N12) | ||
68 | #define at91sam9n12_soc at91_boot_soc | ||
69 | #endif | ||
70 | |||
71 | #if !defined(CONFIG_SOC_SAMA5D3) | 35 | #if !defined(CONFIG_SOC_SAMA5D3) |
72 | #define sama5d3_soc at91_boot_soc | 36 | #define sama5d3_soc at91_boot_soc |
73 | #endif | 37 | #endif |