aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/devices.c
diff options
context:
space:
mode:
authorAmit Kucheria <amit.kucheria@canonical.com>2010-02-04 15:21:53 -0500
committerAmit Kucheria <amit.kucheria@canonical.com>2010-02-09 11:32:16 -0500
commita329b48c43e5e2e6b51ce159d99aefeb90c7c066 (patch)
tree007238749bf1aeeb567344122d800b9b5b6e7b12 /arch/arm/mach-mx5/devices.c
parent438caa3f6c91ba21c539a8547c4075b619dc6500 (diff)
mxc: Core support for Freescale i.MX5 series
Add basic clock support, cpu identification, I/O mapping, interrupt controller, serial port and ethernet. Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com>
Diffstat (limited to 'arch/arm/mach-mx5/devices.c')
-rw-r--r--arch/arm/mach-mx5/devices.c96
1 files changed, 96 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/devices.c b/arch/arm/mach-mx5/devices.c
new file mode 100644
index 000000000000..d6fd3961ade9
--- /dev/null
+++ b/arch/arm/mach-mx5/devices.c
@@ -0,0 +1,96 @@
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
16static 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
28struct platform_device mxc_uart_device0 = {
29 .name = "imx-uart",
30 .id = 0,
31 .resource = uart0,
32 .num_resources = ARRAY_SIZE(uart0),
33};
34
35static 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
47struct platform_device mxc_uart_device1 = {
48 .name = "imx-uart",
49 .id = 1,
50 .resource = uart1,
51 .num_resources = ARRAY_SIZE(uart1),
52};
53
54static 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
66struct platform_device mxc_uart_device2 = {
67 .name = "imx-uart",
68 .id = 2,
69 .resource = uart2,
70 .num_resources = ARRAY_SIZE(uart2),
71};
72
73static 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
85struct 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 */
93int __init mxc_register_gpios(void)
94{
95 return 0;
96}