Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[sfrench/cifs-2.6.git] / arch / arm / mach-mx5 / devices.c
1 /*
2  * Copyright 2009 Amit Kucheria <amit.kucheria@canonical.com>
3  *
4  * The code contained herein is licensed under the GNU General Public
5  * License. You may obtain a copy of the GNU General Public License
6  * Version 2 or later at the following locations:
7  *
8  * http://www.opensource.org/licenses/gpl-license.html
9  * http://www.gnu.org/copyleft/gpl.html
10  */
11
12 #include <linux/platform_device.h>
13 #include <mach/hardware.h>
14 #include <mach/imx-uart.h>
15
16 static struct resource uart0[] = {
17         {
18                 .start = MX51_UART1_BASE_ADDR,
19                 .end = MX51_UART1_BASE_ADDR + 0xfff,
20                 .flags = IORESOURCE_MEM,
21         }, {
22                 .start = MX51_MXC_INT_UART1,
23                 .end = MX51_MXC_INT_UART1,
24                 .flags = IORESOURCE_IRQ,
25         },
26 };
27
28 struct platform_device mxc_uart_device0 = {
29         .name = "imx-uart",
30         .id = 0,
31         .resource = uart0,
32         .num_resources = ARRAY_SIZE(uart0),
33 };
34
35 static struct resource uart1[] = {
36         {
37                 .start = MX51_UART2_BASE_ADDR,
38                 .end = MX51_UART2_BASE_ADDR + 0xfff,
39                 .flags = IORESOURCE_MEM,
40         }, {
41                 .start = MX51_MXC_INT_UART2,
42                 .end = MX51_MXC_INT_UART2,
43                 .flags = IORESOURCE_IRQ,
44         },
45 };
46
47 struct platform_device mxc_uart_device1 = {
48         .name = "imx-uart",
49         .id = 1,
50         .resource = uart1,
51         .num_resources = ARRAY_SIZE(uart1),
52 };
53
54 static struct resource uart2[] = {
55         {
56                 .start = MX51_UART3_BASE_ADDR,
57                 .end = MX51_UART3_BASE_ADDR + 0xfff,
58                 .flags = IORESOURCE_MEM,
59         }, {
60                 .start = MX51_MXC_INT_UART3,
61                 .end = MX51_MXC_INT_UART3,
62                 .flags = IORESOURCE_IRQ,
63         },
64 };
65
66 struct platform_device mxc_uart_device2 = {
67         .name = "imx-uart",
68         .id = 2,
69         .resource = uart2,
70         .num_resources = ARRAY_SIZE(uart2),
71 };
72
73 static struct resource mxc_fec_resources[] = {
74         {
75                 .start  = MX51_MXC_FEC_BASE_ADDR,
76                 .end    = MX51_MXC_FEC_BASE_ADDR + 0xfff,
77                 .flags  = IORESOURCE_MEM,
78         }, {
79                 .start  = MX51_MXC_INT_FEC,
80                 .end    = MX51_MXC_INT_FEC,
81                 .flags  = IORESOURCE_IRQ,
82         },
83 };
84
85 struct platform_device mxc_fec_device = {
86         .name = "fec",
87         .id = 0,
88         .num_resources = ARRAY_SIZE(mxc_fec_resources),
89         .resource = mxc_fec_resources,
90 };
91
92 /* Dummy definition to allow compiling in AVIC and TZIC simultaneously */
93 int __init mxc_register_gpios(void)
94 {
95         return 0;
96 }