aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c64xx/common.c4
-rw-r--r--arch/arm/mach-s3c64xx/cpuidle.c5
-rw-r--r--arch/arm/mach-s3c64xx/irq-pm.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c4
-rw-r--r--arch/arm/mach-s3c64xx/pl080.c4
-rw-r--r--arch/arm/mach-s3c64xx/pm.c4
-rw-r--r--arch/arm/mach-s3c64xx/s3c6400.c2
-rw-r--r--arch/arm/mach-s3c64xx/s3c6410.c2
-rw-r--r--arch/arm/plat-samsung/gpio-samsung.c11
-rw-r--r--arch/arm/plat-samsung/init.c5
10 files changed, 31 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index ddb30b8434c5..3dea4a4ef165 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -208,7 +208,7 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
208static __init int s3c64xx_dev_init(void) 208static __init int s3c64xx_dev_init(void)
209{ 209{
210 /* Not applicable when using DT. */ 210 /* Not applicable when using DT. */
211 if (of_have_populated_dt()) 211 if (of_have_populated_dt() || !soc_is_s3c64xx())
212 return 0; 212 return 0;
213 213
214 subsys_system_register(&s3c64xx_subsys, NULL); 214 subsys_system_register(&s3c64xx_subsys, NULL);
@@ -413,7 +413,7 @@ static int __init s3c64xx_init_irq_eint(void)
413 int irq; 413 int irq;
414 414
415 /* On DT-enabled systems EINTs are handled by pinctrl-s3c64xx driver. */ 415 /* On DT-enabled systems EINTs are handled by pinctrl-s3c64xx driver. */
416 if (of_have_populated_dt()) 416 if (of_have_populated_dt() || !soc_is_s3c64xx())
417 return -ENODEV; 417 return -ENODEV;
418 418
419 for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) { 419 for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) {
diff --git a/arch/arm/mach-s3c64xx/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c
index 93aa8cb70195..5322db51150e 100644
--- a/arch/arm/mach-s3c64xx/cpuidle.c
+++ b/arch/arm/mach-s3c64xx/cpuidle.c
@@ -18,6 +18,7 @@
18 18
19#include <asm/cpuidle.h> 19#include <asm/cpuidle.h>
20 20
21#include <plat/cpu.h>
21#include <mach/map.h> 22#include <mach/map.h>
22 23
23#include "regs-sys.h" 24#include "regs-sys.h"
@@ -57,6 +58,8 @@ static struct cpuidle_driver s3c64xx_cpuidle_driver = {
57 58
58static int __init s3c64xx_init_cpuidle(void) 59static int __init s3c64xx_init_cpuidle(void)
59{ 60{
60 return cpuidle_register(&s3c64xx_cpuidle_driver, NULL); 61 if (soc_is_s3c64xx())
62 return cpuidle_register(&s3c64xx_cpuidle_driver, NULL);
63 return 0;
61} 64}
62device_initcall(s3c64xx_init_cpuidle); 65device_initcall(s3c64xx_init_cpuidle);
diff --git a/arch/arm/mach-s3c64xx/irq-pm.c b/arch/arm/mach-s3c64xx/irq-pm.c
index ae4ea7601f60..0bbf1faaee42 100644
--- a/arch/arm/mach-s3c64xx/irq-pm.c
+++ b/arch/arm/mach-s3c64xx/irq-pm.c
@@ -113,7 +113,7 @@ static struct syscore_ops s3c64xx_irq_syscore_ops = {
113static __init int s3c64xx_syscore_init(void) 113static __init int s3c64xx_syscore_init(void)
114{ 114{
115 /* Appropriate drivers (pinctrl, uart) handle this when using DT. */ 115 /* Appropriate drivers (pinctrl, uart) handle this when using DT. */
116 if (of_have_populated_dt()) 116 if (of_have_populated_dt() || !soc_is_s3c64xx())
117 return 0; 117 return 0;
118 118
119 register_syscore_ops(&s3c64xx_irq_syscore_ops); 119 register_syscore_ops(&s3c64xx_irq_syscore_ops);
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index 9c00d83f7151..be21f06e6b3f 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -29,6 +29,7 @@
29 29
30#include <linux/platform_data/spi-s3c64xx.h> 30#include <linux/platform_data/spi-s3c64xx.h>
31 31
32#include <plat/cpu.h>
32#include "crag6410.h" 33#include "crag6410.h"
33 34
34static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = { 35static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
@@ -399,6 +400,9 @@ static struct i2c_driver wlf_gf_module_driver = {
399 400
400static int __init wlf_gf_module_register(void) 401static int __init wlf_gf_module_register(void)
401{ 402{
403 if (!soc_is_s3c64xx())
404 return 0;
405
402 return i2c_add_driver(&wlf_gf_module_driver); 406 return i2c_add_driver(&wlf_gf_module_driver);
403} 407}
404device_initcall(wlf_gf_module_register); 408device_initcall(wlf_gf_module_register);
diff --git a/arch/arm/mach-s3c64xx/pl080.c b/arch/arm/mach-s3c64xx/pl080.c
index 901a984bddc2..89c5a62830a7 100644
--- a/arch/arm/mach-s3c64xx/pl080.c
+++ b/arch/arm/mach-s3c64xx/pl080.c
@@ -14,6 +14,7 @@
14#include <linux/amba/pl08x.h> 14#include <linux/amba/pl08x.h>
15#include <linux/of.h> 15#include <linux/of.h>
16 16
17#include <plat/cpu.h>
17#include <mach/irqs.h> 18#include <mach/irqs.h>
18#include <mach/map.h> 19#include <mach/map.h>
19 20
@@ -230,6 +231,9 @@ static AMBA_AHB_DEVICE(s3c64xx_dma1, "dma-pl080s.1", 0,
230 231
231static int __init s3c64xx_pl080_init(void) 232static int __init s3c64xx_pl080_init(void)
232{ 233{
234 if (!soc_is_s3c64xx())
235 return 0;
236
233 /* Set all DMA configuration to be DMA, not SDMA */ 237 /* Set all DMA configuration to be DMA, not SDMA */
234 writel(0xffffff, S3C64XX_SDMA_SEL); 238 writel(0xffffff, S3C64XX_SDMA_SEL);
235 239
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index 75b14e756383..59d91b83b03d 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -22,6 +22,7 @@
22#include <mach/map.h> 22#include <mach/map.h>
23#include <mach/irqs.h> 23#include <mach/irqs.h>
24 24
25#include <plat/cpu.h>
25#include <plat/devs.h> 26#include <plat/devs.h>
26#include <plat/pm.h> 27#include <plat/pm.h>
27#include <plat/wakeup-mask.h> 28#include <plat/wakeup-mask.h>
@@ -332,6 +333,9 @@ int __init s3c64xx_pm_init(void)
332 333
333static __init int s3c64xx_pm_initcall(void) 334static __init int s3c64xx_pm_initcall(void)
334{ 335{
336 if (!soc_is_s3c64xx())
337 return 0;
338
335 pm_cpu_prep = s3c64xx_pm_prepare; 339 pm_cpu_prep = s3c64xx_pm_prepare;
336 pm_cpu_sleep = s3c64xx_cpu_suspend; 340 pm_cpu_sleep = s3c64xx_cpu_suspend;
337 341
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 33273abef669..5ea82accc773 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -81,7 +81,7 @@ static struct device s3c6400_dev = {
81static int __init s3c6400_core_init(void) 81static int __init s3c6400_core_init(void)
82{ 82{
83 /* Not applicable when using DT. */ 83 /* Not applicable when using DT. */
84 if (of_have_populated_dt()) 84 if (of_have_populated_dt() || soc_is_s3c64xx())
85 return 0; 85 return 0;
86 86
87 return subsys_system_register(&s3c6400_subsys, NULL); 87 return subsys_system_register(&s3c6400_subsys, NULL);
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index eadc48dee0e4..92bb927c4478 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -84,7 +84,7 @@ static struct device s3c6410_dev = {
84static int __init s3c6410_core_init(void) 84static int __init s3c6410_core_init(void)
85{ 85{
86 /* Not applicable when using DT. */ 86 /* Not applicable when using DT. */
87 if (of_have_populated_dt()) 87 if (of_have_populated_dt() || !soc_is_s3c64xx())
88 return 0; 88 return 0;
89 89
90 return subsys_system_register(&s3c6410_subsys, NULL); 90 return subsys_system_register(&s3c6410_subsys, NULL);
diff --git a/arch/arm/plat-samsung/gpio-samsung.c b/arch/arm/plat-samsung/gpio-samsung.c
index 7c288ba4dc87..37faa8eab78f 100644
--- a/arch/arm/plat-samsung/gpio-samsung.c
+++ b/arch/arm/plat-samsung/gpio-samsung.c
@@ -1176,14 +1176,16 @@ static __init int samsung_gpiolib_init(void)
1176 * interfaces. For legacy (non-DT) platforms this driver is used. 1176 * interfaces. For legacy (non-DT) platforms this driver is used.
1177 */ 1177 */
1178 if (of_have_populated_dt()) 1178 if (of_have_populated_dt())
1179 return -ENODEV; 1179 return 0;
1180
1181 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs));
1182 1180
1183 if (soc_is_s3c24xx()) { 1181 if (soc_is_s3c24xx()) {
1182 samsung_gpiolib_set_cfg(samsung_gpio_cfgs,
1183 ARRAY_SIZE(samsung_gpio_cfgs));
1184 s3c24xx_gpiolib_add_chips(s3c24xx_gpios, 1184 s3c24xx_gpiolib_add_chips(s3c24xx_gpios,
1185 ARRAY_SIZE(s3c24xx_gpios), S3C24XX_VA_GPIO); 1185 ARRAY_SIZE(s3c24xx_gpios), S3C24XX_VA_GPIO);
1186 } else if (soc_is_s3c64xx()) { 1186 } else if (soc_is_s3c64xx()) {
1187 samsung_gpiolib_set_cfg(samsung_gpio_cfgs,
1188 ARRAY_SIZE(samsung_gpio_cfgs));
1187 samsung_gpiolib_add_2bit_chips(s3c64xx_gpios_2bit, 1189 samsung_gpiolib_add_2bit_chips(s3c64xx_gpios_2bit,
1188 ARRAY_SIZE(s3c64xx_gpios_2bit), 1190 ARRAY_SIZE(s3c64xx_gpios_2bit),
1189 S3C64XX_VA_GPIO + 0xE0, 0x20); 1191 S3C64XX_VA_GPIO + 0xE0, 0x20);
@@ -1192,9 +1194,6 @@ static __init int samsung_gpiolib_init(void)
1192 S3C64XX_VA_GPIO); 1194 S3C64XX_VA_GPIO);
1193 samsung_gpiolib_add_4bit2_chips(s3c64xx_gpios_4bit2, 1195 samsung_gpiolib_add_4bit2_chips(s3c64xx_gpios_4bit2,
1194 ARRAY_SIZE(s3c64xx_gpios_4bit2)); 1196 ARRAY_SIZE(s3c64xx_gpios_4bit2));
1195 } else {
1196 WARN(1, "Unknown SoC in gpio-samsung, no GPIOs added\n");
1197 return -ENODEV;
1198 } 1197 }
1199 1198
1200 return 0; 1199 return 0;
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
index 11fbbc26e49f..3776f7e752f0 100644
--- a/arch/arm/plat-samsung/init.c
+++ b/arch/arm/plat-samsung/init.c
@@ -152,6 +152,11 @@ static int __init s3c_arch_init(void)
152{ 152{
153 int ret; 153 int ret;
154 154
155 /* init is only needed for ATAGS based platforms */
156 if (!IS_ENABLED(CONFIG_ATAGS) ||
157 (!soc_is_s3c24xx() && !soc_is_s3c64xx()))
158 return 0;
159
155 // do the correct init for cpu 160 // do the correct init for cpu
156 161
157 if (cpu == NULL) { 162 if (cpu == NULL) {