1 /*
2  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
3  *		http://www.samsung.com
4  *
5  * Base EXYNOS 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 #define EXYNOS_UART_RESOURCE(_series, _nr)	\
27 static struct resource exynos##_series##_uart##_nr##_resource[] = {	\
28 	[0] = DEFINE_RES_MEM(EXYNOS##_series##_PA_UART##_nr, EXYNOS##_series##_SZ_UART),	\
29 	[1] = DEFINE_RES_IRQ(EXYNOS##_series##_IRQ_UART##_nr),	\
30 };
31 
32 EXYNOS_UART_RESOURCE(4, 0)
33 EXYNOS_UART_RESOURCE(4, 1)
34 EXYNOS_UART_RESOURCE(4, 2)
35 EXYNOS_UART_RESOURCE(4, 3)
36 
37 struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = {
38 	[0] = {
39 		.resources	= exynos4_uart0_resource,
40 		.nr_resources	= ARRAY_SIZE(exynos4_uart0_resource),
41 	},
42 	[1] = {
43 		.resources	= exynos4_uart1_resource,
44 		.nr_resources	= ARRAY_SIZE(exynos4_uart1_resource),
45 	},
46 	[2] = {
47 		.resources	= exynos4_uart2_resource,
48 		.nr_resources	= ARRAY_SIZE(exynos4_uart2_resource),
49 	},
50 	[3] = {
51 		.resources	= exynos4_uart3_resource,
52 		.nr_resources	= ARRAY_SIZE(exynos4_uart3_resource),
53 	},
54 };
55 
56 EXYNOS_UART_RESOURCE(5, 0)
57 EXYNOS_UART_RESOURCE(5, 1)
58 EXYNOS_UART_RESOURCE(5, 2)
59 EXYNOS_UART_RESOURCE(5, 3)
60 
61 struct s3c24xx_uart_resources exynos5_uart_resources[] __initdata = {
62 	[0] = {
63 		.resources	= exynos5_uart0_resource,
64 		.nr_resources	= ARRAY_SIZE(exynos5_uart0_resource),
65 	},
66 	[1] = {
67 		.resources	= exynos5_uart1_resource,
68 		.nr_resources	= ARRAY_SIZE(exynos5_uart0_resource),
69 	},
70 	[2] = {
71 		.resources	= exynos5_uart2_resource,
72 		.nr_resources	= ARRAY_SIZE(exynos5_uart2_resource),
73 	},
74 	[3] = {
75 		.resources	= exynos5_uart3_resource,
76 		.nr_resources	= ARRAY_SIZE(exynos5_uart3_resource),
77 	},
78 };
79