spi-topcliff-pch: supports a spi mode setup and bit order setup by IO control
[zen-stable.git] / arch / arm / plat-s5p / dev-uart.c
blobc9308db361832d816dfe799d7ec075106327270f
1 /* linux/arch/arm/plat-s5p/dev-uart.c
3 * Copyright (c) 2009 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
6 * Base S5P UART resource and device definitions
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/interrupt.h>
16 #include <linux/list.h>
17 #include <linux/platform_device.h>
19 #include <asm/mach/arch.h>
20 #include <asm/mach/irq.h>
21 #include <mach/hardware.h>
22 #include <mach/map.h>
24 #include <plat/devs.h>
26 /* Serial port registrations */
28 static struct resource s5p_uart0_resource[] = {
29 [0] = {
30 .start = S5P_PA_UART0,
31 .end = S5P_PA_UART0 + S5P_SZ_UART - 1,
32 .flags = IORESOURCE_MEM,
34 [1] = {
35 .start = IRQ_UART0,
36 .end = IRQ_UART0,
37 .flags = IORESOURCE_IRQ,
41 static struct resource s5p_uart1_resource[] = {
42 [0] = {
43 .start = S5P_PA_UART1,
44 .end = S5P_PA_UART1 + S5P_SZ_UART - 1,
45 .flags = IORESOURCE_MEM,
47 [1] = {
48 .start = IRQ_UART1,
49 .end = IRQ_UART1,
50 .flags = IORESOURCE_IRQ,
54 static struct resource s5p_uart2_resource[] = {
55 [0] = {
56 .start = S5P_PA_UART2,
57 .end = S5P_PA_UART2 + S5P_SZ_UART - 1,
58 .flags = IORESOURCE_MEM,
60 [1] = {
61 .start = IRQ_UART2,
62 .end = IRQ_UART2,
63 .flags = IORESOURCE_IRQ,
67 static struct resource s5p_uart3_resource[] = {
68 #if CONFIG_SERIAL_SAMSUNG_UARTS > 3
69 [0] = {
70 .start = S5P_PA_UART3,
71 .end = S5P_PA_UART3 + S5P_SZ_UART - 1,
72 .flags = IORESOURCE_MEM,
74 [1] = {
75 .start = IRQ_UART3,
76 .end = IRQ_UART3,
77 .flags = IORESOURCE_IRQ,
79 #endif
82 static struct resource s5p_uart4_resource[] = {
83 #if CONFIG_SERIAL_SAMSUNG_UARTS > 4
84 [0] = {
85 .start = S5P_PA_UART4,
86 .end = S5P_PA_UART4 + S5P_SZ_UART - 1,
87 .flags = IORESOURCE_MEM,
89 [1] = {
90 .start = IRQ_UART4,
91 .end = IRQ_UART4,
92 .flags = IORESOURCE_IRQ,
94 #endif
97 static struct resource s5p_uart5_resource[] = {
98 #if CONFIG_SERIAL_SAMSUNG_UARTS > 5
99 [0] = {
100 .start = S5P_PA_UART5,
101 .end = S5P_PA_UART5 + S5P_SZ_UART - 1,
102 .flags = IORESOURCE_MEM,
104 [1] = {
105 .start = IRQ_UART5,
106 .end = IRQ_UART5,
107 .flags = IORESOURCE_IRQ,
109 #endif
112 struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = {
113 [0] = {
114 .resources = s5p_uart0_resource,
115 .nr_resources = ARRAY_SIZE(s5p_uart0_resource),
117 [1] = {
118 .resources = s5p_uart1_resource,
119 .nr_resources = ARRAY_SIZE(s5p_uart1_resource),
121 [2] = {
122 .resources = s5p_uart2_resource,
123 .nr_resources = ARRAY_SIZE(s5p_uart2_resource),
125 [3] = {
126 .resources = s5p_uart3_resource,
127 .nr_resources = ARRAY_SIZE(s5p_uart3_resource),
129 [4] = {
130 .resources = s5p_uart4_resource,
131 .nr_resources = ARRAY_SIZE(s5p_uart4_resource),
133 [5] = {
134 .resources = s5p_uart5_resource,
135 .nr_resources = ARRAY_SIZE(s5p_uart5_resource),