aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2012-04-17 23:05:19 -0400
committerKukjin Kim <kgene.kim@samsung.com>2012-05-12 18:01:51 -0400
commitcfe370f876407735041f8e02ec31ffa922cd8e45 (patch)
treee10f139c8ebfa150aef35285c401cc2041f546d8 /arch/arm/plat-samsung
parent33bf33278fa608428c46d4fab58ae5bc3e3acfde (diff)
ARM: SAMSUNG: move platform device for s5p uart into plat-samsung
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/Kconfig6
-rw-r--r--arch/arm/plat-samsung/Makefile1
-rw-r--r--arch/arm/plat-samsung/s5p-dev-uart.c89
3 files changed, 96 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 1922413f2ee7..5ce6bc8ccf81 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -146,6 +146,12 @@ config S3C_GPIO_TRACK
146 Internal configuration option to enable the s3c specific gpio 146 Internal configuration option to enable the s3c specific gpio
147 chip tracking if the platform requires it. 147 chip tracking if the platform requires it.
148 148
149# uart options
150
151config S5P_DEV_UART
152 def_bool y
153 depends on (ARCH_S5P64X0 || ARCH_S5PC100 || ARCH_S5PV210)
154
149# ADC driver 155# ADC driver
150 156
151config S3C_ADC 157config S3C_ADC
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 6217c41e6260..b20047b5633e 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -36,6 +36,7 @@ obj-y += platformdata.o
36 36
37obj-y += devs.o 37obj-y += devs.o
38obj-y += dev-uart.o 38obj-y += dev-uart.o
39obj-$(CONFIG_S5P_DEV_UART) += s5p-dev-uart.o
39 40
40obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o 41obj-$(CONFIG_SAMSUNG_DEV_BACKLIGHT) += dev-backlight.o
41 42
diff --git a/arch/arm/plat-samsung/s5p-dev-uart.c b/arch/arm/plat-samsung/s5p-dev-uart.c
new file mode 100644
index 000000000000..cafa3deddcc1
--- /dev/null
+++ b/arch/arm/plat-samsung/s5p-dev-uart.c
@@ -0,0 +1,89 @@
1/*
2 * Copyright (c) 2009,2012 Samsung Electronics Co., Ltd.
3 * http://www.samsung.com/
4 *
5 * Base S5P UART resource and device definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#include <linux/kernel.h>
13#include <linux/types.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/ioport.h>
17#include <linux/platform_device.h>
18
19#include <asm/mach/arch.h>
20#include <asm/mach/irq.h>
21#include <mach/hardware.h>
22#include <mach/map.h>
23
24#include <plat/devs.h>
25
26 /* Serial port registrations */
27
28static struct resource s5p_uart0_resource[] = {
29 [0] = DEFINE_RES_MEM(S5P_PA_UART0, S5P_SZ_UART),
30 [1] = DEFINE_RES_IRQ(IRQ_UART0),
31};
32
33static struct resource s5p_uart1_resource[] = {
34 [0] = DEFINE_RES_MEM(S5P_PA_UART1, S5P_SZ_UART),
35 [1] = DEFINE_RES_IRQ(IRQ_UART1),
36};
37
38static struct resource s5p_uart2_resource[] = {
39 [0] = DEFINE_RES_MEM(S5P_PA_UART2, S5P_SZ_UART),
40 [1] = DEFINE_RES_IRQ(IRQ_UART2),
41};
42
43static struct resource s5p_uart3_resource[] = {
44#if CONFIG_SERIAL_SAMSUNG_UARTS > 3
45 [0] = DEFINE_RES_MEM(S5P_PA_UART3, S5P_SZ_UART),
46 [1] = DEFINE_RES_IRQ(IRQ_UART3),
47#endif
48};
49
50static struct resource s5p_uart4_resource[] = {
51#if CONFIG_SERIAL_SAMSUNG_UARTS > 4
52 [0] = DEFINE_RES_MEM(S5P_PA_UART4, S5P_SZ_UART),
53 [1] = DEFINE_RES_IRQ(IRQ_UART4),
54#endif
55};
56
57static struct resource s5p_uart5_resource[] = {
58#if CONFIG_SERIAL_SAMSUNG_UARTS > 5
59 [0] = DEFINE_RES_MEM(S5P_PA_UART5, S5P_SZ_UART),
60 [1] = DEFINE_RES_IRQ(IRQ_UART5),
61#endif
62};
63
64struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = {
65 [0] = {
66 .resources = s5p_uart0_resource,
67 .nr_resources = ARRAY_SIZE(s5p_uart0_resource),
68 },
69 [1] = {
70 .resources = s5p_uart1_resource,
71 .nr_resources = ARRAY_SIZE(s5p_uart1_resource),
72 },
73 [2] = {
74 .resources = s5p_uart2_resource,
75 .nr_resources = ARRAY_SIZE(s5p_uart2_resource),
76 },
77 [3] = {
78 .resources = s5p_uart3_resource,
79 .nr_resources = ARRAY_SIZE(s5p_uart3_resource),
80 },
81 [4] = {
82 .resources = s5p_uart4_resource,
83 .nr_resources = ARRAY_SIZE(s5p_uart4_resource),
84 },
85 [5] = {
86 .resources = s5p_uart5_resource,
87 .nr_resources = ARRAY_SIZE(s5p_uart5_resource),
88 },
89};