Merge tag 'v3.6-rc1' into staging/for_v3.6
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / arm / mach-s3c64xx / dev-uart.c
1 /* linux/arch/arm/plat-s3c64xx/dev-uart.c
2  *
3  * Copyright 2008 Openmoko, Inc.
4  * Copyright 2008 Simtec Electronics
5  *      Ben Dooks <ben@simtec.co.uk>
6  *      http://armlinux.simtec.co.uk/
7  *
8  * Base S3C64XX UART resource and device definitions
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  *
14 */
15
16 #include <linux/kernel.h>
17 #include <linux/types.h>
18 #include <linux/interrupt.h>
19 #include <linux/list.h>
20 #include <linux/platform_device.h>
21
22 #include <asm/mach/arch.h>
23 #include <asm/mach/irq.h>
24 #include <mach/hardware.h>
25 #include <mach/map.h>
26
27 #include <plat/devs.h>
28
29 /* Serial port registrations */
30
31 /* 64xx uarts are closer together */
32
33 static struct resource s3c64xx_uart0_resource[] = {
34         [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256),
35         [1] = DEFINE_RES_IRQ(IRQ_UART0),
36 };
37
38 static struct resource s3c64xx_uart1_resource[] = {
39         [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256),
40         [1] = DEFINE_RES_IRQ(IRQ_UART1),
41 };
42
43 static struct resource s3c6xx_uart2_resource[] = {
44         [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256),
45         [1] = DEFINE_RES_IRQ(IRQ_UART2),
46 };
47
48 static struct resource s3c64xx_uart3_resource[] = {
49         [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256),
50         [1] = DEFINE_RES_IRQ(IRQ_UART3),
51 };
52
53
54 struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = {
55         [0] = {
56                 .resources      = s3c64xx_uart0_resource,
57                 .nr_resources   = ARRAY_SIZE(s3c64xx_uart0_resource),
58         },
59         [1] = {
60                 .resources      = s3c64xx_uart1_resource,
61                 .nr_resources   = ARRAY_SIZE(s3c64xx_uart1_resource),
62         },
63         [2] = {
64                 .resources      = s3c6xx_uart2_resource,
65                 .nr_resources   = ARRAY_SIZE(s3c6xx_uart2_resource),
66         },
67         [3] = {
68                 .resources      = s3c64xx_uart3_resource,
69                 .nr_resources   = ARRAY_SIZE(s3c64xx_uart3_resource),
70         },
71 };