aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/devices.c')
-rw-r--r--arch/arm/mach-mx3/devices.c43
1 files changed, 5 insertions, 38 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index e08c6a8ac56b..a6bdcc07f3c9 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -36,7 +36,7 @@ static struct resource uart0[] = {
36 }, 36 },
37}; 37};
38 38
39static struct platform_device mxc_uart_device0 = { 39struct platform_device mxc_uart_device0 = {
40 .name = "imx-uart", 40 .name = "imx-uart",
41 .id = 0, 41 .id = 0,
42 .resource = uart0, 42 .resource = uart0,
@@ -55,7 +55,7 @@ static struct resource uart1[] = {
55 }, 55 },
56}; 56};
57 57
58static struct platform_device mxc_uart_device1 = { 58struct platform_device mxc_uart_device1 = {
59 .name = "imx-uart", 59 .name = "imx-uart",
60 .id = 1, 60 .id = 1,
61 .resource = uart1, 61 .resource = uart1,
@@ -74,7 +74,7 @@ static struct resource uart2[] = {
74 }, 74 },
75}; 75};
76 76
77static struct platform_device mxc_uart_device2 = { 77struct platform_device mxc_uart_device2 = {
78 .name = "imx-uart", 78 .name = "imx-uart",
79 .id = 2, 79 .id = 2,
80 .resource = uart2, 80 .resource = uart2,
@@ -93,7 +93,7 @@ static struct resource uart3[] = {
93 }, 93 },
94}; 94};
95 95
96static struct platform_device mxc_uart_device3 = { 96struct platform_device mxc_uart_device3 = {
97 .name = "imx-uart", 97 .name = "imx-uart",
98 .id = 3, 98 .id = 3,
99 .resource = uart3, 99 .resource = uart3,
@@ -112,46 +112,13 @@ static struct resource uart4[] = {
112 }, 112 },
113}; 113};
114 114
115static struct platform_device mxc_uart_device4 = { 115struct platform_device mxc_uart_device4 = {
116 .name = "imx-uart", 116 .name = "imx-uart",
117 .id = 4, 117 .id = 4,
118 .resource = uart4, 118 .resource = uart4,
119 .num_resources = ARRAY_SIZE(uart4), 119 .num_resources = ARRAY_SIZE(uart4),
120}; 120};
121 121
122/*
123 * Register only those UARTs that physically exist
124 */
125int __init imx_init_uart(int uart_no, struct imxuart_platform_data *pdata)
126{
127 switch (uart_no) {
128 case 0:
129 mxc_uart_device0.dev.platform_data = pdata;
130 platform_device_register(&mxc_uart_device0);
131 break;
132 case 1:
133 mxc_uart_device1.dev.platform_data = pdata;
134 platform_device_register(&mxc_uart_device1);
135 break;
136 case 2:
137 mxc_uart_device2.dev.platform_data = pdata;
138 platform_device_register(&mxc_uart_device2);
139 break;
140 case 3:
141 mxc_uart_device3.dev.platform_data = pdata;
142 platform_device_register(&mxc_uart_device3);
143 break;
144 case 4:
145 mxc_uart_device4.dev.platform_data = pdata;
146 platform_device_register(&mxc_uart_device4);
147 break;
148 default:
149 return -ENODEV;
150 }
151
152 return 0;
153}
154
155/* GPIO port description */ 122/* GPIO port description */
156static struct mxc_gpio_port imx_gpio_ports[] = { 123static struct mxc_gpio_port imx_gpio_ports[] = {
157 [0] = { 124 [0] = {