aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung/s5p-dev-uart.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 15:31:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 15:31:49 -0400
commit2c757fd5d1a92086f225a75a8fac7cab242d11b0 (patch)
treed150ea105242d551f6959c2525472295e151144c /arch/arm/plat-samsung/s5p-dev-uart.c
parentce53044c68cf4fb6c50a2a0d88786be65fae7235 (diff)
parent424663566c43ce87e8b33228860bf882f1ea61bf (diff)
Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc cleanups (part 2) from Olof Johansson: "More cleanups, continuing an earlier set with omap and samsung specific cleanups. These could not go into the first set because they have dependencies on various other series that in turn depend on the first cleanups." Fixed up conflicts in arch/arm/plat-omap/counter_32k.c due to commit bd0493eaaf5c: "move read_{boot,persistent}_clock to the architecture level" that changed how the persistent clocks were handled. And trivial conflicts in arch/arm/mach-omap1/common.h due to just independent changes close to each other. * tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (35 commits) ARM: SAMSUNG: merge plat-s5p into plat-samsung ARM: SAMSUNG: move options for common s5p into plat-samsung/Kconfig ARM: SAMSUNG: move setup code for s5p mfc and mipiphy into plat-samsung ARM: SAMSUNG: move platform device for s5p uart into plat-samsung ARM: SAMSUNG: move hr timer for common s5p into plat-samsung ARM: SAMSUNG: move pm part for common s5p into plat-samsung ARM: SAMSUNG: move interrupt part for common s5p into plat-samsung ARM: SAMSUNG: move clock part for common s5p into plat-samsung ARM: S3C24XX: Use common macro to define resources on dev-uart.c ARM: S3C24XX: move common clock init into common.c ARM: S3C24XX: move common power-management code to mach-s3c24xx ARM: S3C24XX: move plat-s3c24xx/dev-uart.c into common.c ARM: S3C24XX: move plat-s3c24xx/cpu.c ARM: OMAP2+: Kconfig: convert SOC_OMAPAM33XX to SOC_AM33XX ARM: OMAP2+: Kconfig: convert SOC_OMAPTI81XX to SOC_TI81XX GPMC: add ECC control definitions ARM: OMAP2+: dmtimer: remove redundant sysconfig context restore ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx ARM: OMAP: AM35xx: remove redunant cpu_is checks for AM3505 ARM: OMAP1: Pass dma request lines in platform data to MMC driver ...
Diffstat (limited to 'arch/arm/plat-samsung/s5p-dev-uart.c')
-rw-r--r--arch/arm/plat-samsung/s5p-dev-uart.c89
1 files changed, 89 insertions, 0 deletions
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};