Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jean-Christophe PLAGNIOL-VILLARD and committed by
Nicolas Ferre
1e3ce2b8 1441bd32

+101 -62
+1
arch/arm/configs/at91rm9200_defconfig
··· 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
+64 -27
arch/arm/mach-at91/Kconfig
··· 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" 44 - select SOC_AT91SAM9 45 - select HAVE_FB_ATMEL 46 - select HAVE_AT91_DBGU0 47 - 48 - config ARCH_AT91SAM9G10 49 - bool "AT91SAM9G10" 50 + config SOC_AT91SAM9261 51 + bool "AT91SAM9261 or AT91SAM9G10" 50 52 select SOC_AT91SAM9 51 53 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 68 + select HAVE_AT91_DBGU0 64 69 select HAVE_FB_ATMEL 65 - select HAVE_AT91_DBGU0 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 ··· 91 93 This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35 92 94 and AT91SAM9X35. 93 95 96 + choice 97 + prompt "Atmel AT91 Processor Devices for non DT boards" 98 + 99 + config ARCH_AT91_NONE 100 + bool "None" 101 + 102 + config ARCH_AT91RM9200 103 + bool "AT91RM9200" 104 + select SOC_AT91RM9200 105 + 106 + config ARCH_AT91SAM9260 107 + bool "AT91SAM9260 or AT91SAM9XE" 108 + select SOC_AT91SAM9260 109 + 110 + config ARCH_AT91SAM9261 111 + bool "AT91SAM9261" 112 + select SOC_AT91SAM9261 113 + 114 + config ARCH_AT91SAM9G10 115 + bool "AT91SAM9G10" 116 + select SOC_AT91SAM9261 117 + 118 + config ARCH_AT91SAM9263 119 + bool "AT91SAM9263" 120 + select SOC_AT91SAM9263 121 + 122 + config ARCH_AT91SAM9RL 123 + bool "AT91SAM9RL" 124 + select SOC_AT91SAM9RL 125 + 126 + config ARCH_AT91SAM9G20 127 + bool "AT91SAM9G20" 128 + select SOC_AT91SAM9260 129 + 130 + config ARCH_AT91SAM9G45 131 + bool "AT91SAM9G45" 132 + select SOC_AT91SAM9G45 133 + 94 134 config ARCH_AT91X40 95 135 bool "AT91x40" 136 + depends on !MMU 96 137 select ARCH_USES_GETTIMEOFFSET 97 138 98 139 endchoice
+16 -9
arch/arm/mach-at91/Makefile
··· 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
+11 -17
arch/arm/mach-at91/include/mach/cpu.h
··· 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, ··· 107 106 return at91_soc_initdata.type != AT91_SOC_NONE; 108 107 } 109 108 110 - #ifdef CONFIG_ARCH_AT91RM9200 109 + #ifdef CONFIG_SOC_AT91RM9200 111 110 #define cpu_is_at91rm9200() (at91_soc_initdata.type == AT91_SOC_RM9200) 112 111 #define cpu_is_at91rm9200_bga() (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA) 113 112 #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP) ··· 117 116 #define cpu_is_at91rm9200_pqfp() (0) 118 117 #endif 119 118 120 - #ifdef CONFIG_ARCH_AT91SAM9260 119 + #ifdef CONFIG_SOC_AT91SAM9260 121 120 #define cpu_is_at91sam9xe() (at91_soc_initdata.subtype == AT91_SOC_SAM9XE) 122 121 #define cpu_is_at91sam9260() (at91_soc_initdata.type == AT91_SOC_SAM9260) 122 + #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) 123 123 #else 124 124 #define cpu_is_at91sam9xe() (0) 125 125 #define cpu_is_at91sam9260() (0) 126 - #endif 127 - 128 - #ifdef CONFIG_ARCH_AT91SAM9G20 129 - #define cpu_is_at91sam9g20() (at91_soc_initdata.type == AT91_SOC_SAM9G20) 130 - #else 131 126 #define cpu_is_at91sam9g20() (0) 132 127 #endif 133 128 134 - #ifdef CONFIG_ARCH_AT91SAM9261 129 + #ifdef CONFIG_SOC_AT91SAM9261 135 130 #define cpu_is_at91sam9261() (at91_soc_initdata.type == AT91_SOC_SAM9261) 136 - #else 137 - #define cpu_is_at91sam9261() (0) 138 - #endif 139 - 140 - #ifdef CONFIG_ARCH_AT91SAM9G10 141 131 #define cpu_is_at91sam9g10() (at91_soc_initdata.type == AT91_SOC_SAM9G10) 142 132 #else 133 + #define cpu_is_at91sam9261() (0) 143 134 #define cpu_is_at91sam9g10() (0) 144 135 #endif 145 136 146 - #ifdef CONFIG_ARCH_AT91SAM9263 137 + #ifdef CONFIG_SOC_AT91SAM9263 147 138 #define cpu_is_at91sam9263() (at91_soc_initdata.type == AT91_SOC_SAM9263) 148 139 #else 149 140 #define cpu_is_at91sam9263() (0) 150 141 #endif 151 142 152 - #ifdef CONFIG_ARCH_AT91SAM9RL 143 + #ifdef CONFIG_SOC_AT91SAM9RL 153 144 #define cpu_is_at91sam9rl() (at91_soc_initdata.type == AT91_SOC_SAM9RL) 154 145 #else 155 146 #define cpu_is_at91sam9rl() (0) 156 147 #endif 157 148 158 - #ifdef CONFIG_ARCH_AT91SAM9G45 149 + #ifdef CONFIG_SOC_AT91SAM9G45 159 150 #define cpu_is_at91sam9g45() (at91_soc_initdata.type == AT91_SOC_SAM9G45) 160 151 #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES) 161 152 #define cpu_is_at91sam9m10() (at91_soc_initdata.subtype == AT91_SOC_SAM9M10) ··· 161 168 #define cpu_is_at91sam9m11() (0) 162 169 #endif 163 170 164 - #ifdef CONFIG_ARCH_AT91SAM9X5 171 + #ifdef CONFIG_SOC_AT91SAM9X5 165 172 #define cpu_is_at91sam9x5() (at91_soc_initdata.type == AT91_SOC_SAM9X5) 166 173 #define cpu_is_at91sam9g15() (at91_soc_initdata.subtype == AT91_SOC_SAM9G15) 167 174 #define cpu_is_at91sam9g35() (at91_soc_initdata.subtype == AT91_SOC_SAM9G35) ··· 182 189 * definitions may reduce clutter in common drivers. 183 190 */ 184 191 #define cpu_is_at32ap7000() (0) 192 + #endif /* __ASSEMBLY__ */ 185 193 186 194 #endif /* __MACH_CPU_H__ */
+1 -1
arch/arm/mach-at91/pm.h
··· 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.
+1 -1
arch/arm/mach-at91/pm_slowclock.S
··· 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.
+7 -7
arch/arm/mach-at91/soc.h
··· 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