aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-06-14 20:03:49 -0400
committerKukjin Kim <kgene.kim@samsung.com>2013-06-14 20:32:58 -0400
commit1f72e4045d42d8cfe81c9c7527429affeae7a2a2 (patch)
tree77d48d3ef7a2c18b637900b97032763d3b0b2d84 /arch
parentd238757954f0e0823b4e7dc83c3808f031f84d7d (diff)
ARM: EXYNOS: Remove legacy UART initialization code
This patch removes legacy UART initialization code that was used to set up UART platform devices when booting with ATAGS, which is not supported on Exynos any more. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-exynos/common.c17
-rw-r--r--arch/arm/plat-samsung/init.c8
2 files changed, 5 insertions, 20 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 488d9bd68d2c..598e4b89ddd8 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -69,7 +69,6 @@ static const char name_exynos5440[] = "EXYNOS5440";
69static void exynos4_map_io(void); 69static void exynos4_map_io(void);
70static void exynos5_map_io(void); 70static void exynos5_map_io(void);
71static void exynos5440_map_io(void); 71static void exynos5440_map_io(void);
72static void exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no);
73static int exynos_init(void); 72static int exynos_init(void);
74 73
75unsigned long xxti_f = 0, xusbxti_f = 0; 74unsigned long xxti_f = 0, xusbxti_f = 0;
@@ -79,21 +78,18 @@ static struct cpu_table cpu_ids[] __initdata = {
79 .idcode = EXYNOS4210_CPU_ID, 78 .idcode = EXYNOS4210_CPU_ID,
80 .idmask = EXYNOS4_CPU_MASK, 79 .idmask = EXYNOS4_CPU_MASK,
81 .map_io = exynos4_map_io, 80 .map_io = exynos4_map_io,
82 .init_uarts = exynos4_init_uarts,
83 .init = exynos_init, 81 .init = exynos_init,
84 .name = name_exynos4210, 82 .name = name_exynos4210,
85 }, { 83 }, {
86 .idcode = EXYNOS4212_CPU_ID, 84 .idcode = EXYNOS4212_CPU_ID,
87 .idmask = EXYNOS4_CPU_MASK, 85 .idmask = EXYNOS4_CPU_MASK,
88 .map_io = exynos4_map_io, 86 .map_io = exynos4_map_io,
89 .init_uarts = exynos4_init_uarts,
90 .init = exynos_init, 87 .init = exynos_init,
91 .name = name_exynos4212, 88 .name = name_exynos4212,
92 }, { 89 }, {
93 .idcode = EXYNOS4412_CPU_ID, 90 .idcode = EXYNOS4412_CPU_ID,
94 .idmask = EXYNOS4_CPU_MASK, 91 .idmask = EXYNOS4_CPU_MASK,
95 .map_io = exynos4_map_io, 92 .map_io = exynos4_map_io,
96 .init_uarts = exynos4_init_uarts,
97 .init = exynos_init, 93 .init = exynos_init,
98 .name = name_exynos4412, 94 .name = name_exynos4412,
99 }, { 95 }, {
@@ -602,16 +598,3 @@ static int __init exynos_init(void)
602 598
603 return device_register(&exynos4_dev); 599 return device_register(&exynos4_dev);
604} 600}
605
606/* uart registration process */
607
608static void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
609{
610 struct s3c2410_uartcfg *tcfg = cfg;
611 u32 ucnt;
612
613 for (ucnt = 0; ucnt < no; ucnt++, tcfg++)
614 tcfg->has_fracval = 1;
615
616 s3c24xx_init_uartdevs("exynos4210-uart", exynos4_uart_resources, cfg, no);
617}
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
index 79d10fca9090..3e5c4619caa5 100644
--- a/arch/arm/plat-samsung/init.c
+++ b/arch/arm/plat-samsung/init.c
@@ -87,7 +87,7 @@ void __init s3c24xx_init_clocks(int xtal)
87} 87}
88 88
89/* uart management */ 89/* uart management */
90 90#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
91static int nr_uarts __initdata = 0; 91static int nr_uarts __initdata = 0;
92 92
93static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; 93static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS];
@@ -134,11 +134,12 @@ void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
134 if (cpu == NULL) 134 if (cpu == NULL)
135 return; 135 return;
136 136
137 if (cpu->init_uarts == NULL) { 137 if (cpu->init_uarts == NULL && IS_ENABLED(CONFIG_SAMSUNG_ATAGS)) {
138 printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); 138 printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n");
139 } else 139 } else
140 (cpu->init_uarts)(cfg, no); 140 (cpu->init_uarts)(cfg, no);
141} 141}
142#endif
142 143
143static int __init s3c_arch_init(void) 144static int __init s3c_arch_init(void)
144{ 145{
@@ -152,8 +153,9 @@ static int __init s3c_arch_init(void)
152 ret = (cpu->init)(); 153 ret = (cpu->init)();
153 if (ret != 0) 154 if (ret != 0)
154 return ret; 155 return ret;
155 156#if IS_ENABLED(CONFIG_SAMSUNG_ATAGS)
156 ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); 157 ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts);
158#endif
157 return ret; 159 return ret;
158} 160}
159 161