diff options
author | Darius Augulis <augulis.darius@gmail.com> | 2008-11-14 05:01:38 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-12-16 08:58:41 -0500 |
commit | 219fed7558346225bae3cfd8fdbf44876e5bf79f (patch) | |
tree | 300acfd64a520affb7a93cbc3ad9bd617b77680e /arch/arm/mach-mx1 | |
parent | cfca8b539f53114fb6a6de091987a984c8013d96 (diff) |
patch-mx1-add-devices
Adds common devices to ARCH_MX1.
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx1')
-rw-r--r-- | arch/arm/mach-mx1/devices.c | 142 | ||||
-rw-r--r-- | arch/arm/mach-mx1/devices.h | 5 |
2 files changed, 147 insertions, 0 deletions
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c index aa7b0b08dfca..ad4679b90870 100644 --- a/arch/arm/mach-mx1/devices.c +++ b/arch/arm/mach-mx1/devices.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | 2 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | 3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de |
4 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | 4 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> |
5 | * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt> | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
7 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -24,6 +25,52 @@ | |||
24 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | 27 | ||
28 | static struct resource imx_csi_resources[] = { | ||
29 | [0] = { | ||
30 | .start = 0x00224000, | ||
31 | .end = 0x00224010, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, | ||
34 | [1] = { | ||
35 | .start = CSI_INT, | ||
36 | .end = CSI_INT, | ||
37 | .flags = IORESOURCE_IRQ, | ||
38 | }, | ||
39 | }; | ||
40 | |||
41 | static u64 imx_csi_dmamask = 0xffffffffUL; | ||
42 | |||
43 | struct platform_device imx_csi_device = { | ||
44 | .name = "imx-csi", | ||
45 | .id = 0, /* This is used to put cameras on this interface */ | ||
46 | .dev = { | ||
47 | .dma_mask = &imx_csi_dmamask, | ||
48 | .coherent_dma_mask = 0xffffffff, | ||
49 | }, | ||
50 | .resource = imx_csi_resources, | ||
51 | .num_resources = ARRAY_SIZE(imx_csi_resources), | ||
52 | }; | ||
53 | |||
54 | static struct resource imx_i2c_resources[] = { | ||
55 | [0] = { | ||
56 | .start = 0x00217000, | ||
57 | .end = 0x00217010, | ||
58 | .flags = IORESOURCE_MEM, | ||
59 | }, | ||
60 | [1] = { | ||
61 | .start = I2C_INT, | ||
62 | .end = I2C_INT, | ||
63 | .flags = IORESOURCE_IRQ, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | struct platform_device imx_i2c_device = { | ||
68 | .name = "imx-i2c", | ||
69 | .id = 0, | ||
70 | .resource = imx_i2c_resources, | ||
71 | .num_resources = ARRAY_SIZE(imx_i2c_resources), | ||
72 | }; | ||
73 | |||
27 | static struct resource imx_uart1_resources[] = { | 74 | static struct resource imx_uart1_resources[] = { |
28 | [0] = { | 75 | [0] = { |
29 | .start = UART1_BASE_ADDR, | 76 | .start = UART1_BASE_ADDR, |
@@ -84,6 +131,101 @@ struct platform_device imx_uart2_device = { | |||
84 | .resource = imx_uart2_resources, | 131 | .resource = imx_uart2_resources, |
85 | }; | 132 | }; |
86 | 133 | ||
134 | static struct resource imx_rtc_resources[] = { | ||
135 | [0] = { | ||
136 | .start = 0x00204000, | ||
137 | .end = 0x00204024, | ||
138 | .flags = IORESOURCE_MEM, | ||
139 | }, | ||
140 | [1] = { | ||
141 | .start = RTC_INT, | ||
142 | .end = RTC_INT, | ||
143 | .flags = IORESOURCE_IRQ, | ||
144 | }, | ||
145 | [2] = { | ||
146 | .start = RTC_SAMINT, | ||
147 | .end = RTC_SAMINT, | ||
148 | .flags = IORESOURCE_IRQ, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | struct platform_device imx_rtc_device = { | ||
153 | .name = "rtc-imx", | ||
154 | .id = 0, | ||
155 | .resource = imx_rtc_resources, | ||
156 | .num_resources = ARRAY_SIZE(imx_rtc_resources), | ||
157 | }; | ||
158 | |||
159 | static struct resource imx_wdt_resources[] = { | ||
160 | [0] = { | ||
161 | .start = 0x00201000, | ||
162 | .end = 0x00201008, | ||
163 | .flags = IORESOURCE_MEM, | ||
164 | }, | ||
165 | [1] = { | ||
166 | .start = WDT_INT, | ||
167 | .end = WDT_INT, | ||
168 | .flags = IORESOURCE_IRQ, | ||
169 | }, | ||
170 | }; | ||
171 | |||
172 | struct platform_device imx_wdt_device = { | ||
173 | .name = "imx-wdt", | ||
174 | .id = 0, | ||
175 | .resource = imx_wdt_resources, | ||
176 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
177 | }; | ||
178 | |||
179 | static struct resource imx_usb_resources[] = { | ||
180 | [0] = { | ||
181 | .start = 0x00212000, | ||
182 | .end = 0x00212148, | ||
183 | .flags = IORESOURCE_MEM, | ||
184 | }, | ||
185 | [1] = { | ||
186 | .start = USBD_INT0, | ||
187 | .end = USBD_INT0, | ||
188 | .flags = IORESOURCE_IRQ, | ||
189 | }, | ||
190 | [2] = { | ||
191 | .start = USBD_INT1, | ||
192 | .end = USBD_INT1, | ||
193 | .flags = IORESOURCE_IRQ, | ||
194 | }, | ||
195 | [3] = { | ||
196 | .start = USBD_INT2, | ||
197 | .end = USBD_INT2, | ||
198 | .flags = IORESOURCE_IRQ, | ||
199 | }, | ||
200 | [4] = { | ||
201 | .start = USBD_INT3, | ||
202 | .end = USBD_INT3, | ||
203 | .flags = IORESOURCE_IRQ, | ||
204 | }, | ||
205 | [5] = { | ||
206 | .start = USBD_INT4, | ||
207 | .end = USBD_INT4, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | [6] = { | ||
211 | .start = USBD_INT5, | ||
212 | .end = USBD_INT5, | ||
213 | .flags = IORESOURCE_IRQ, | ||
214 | }, | ||
215 | [7] = { | ||
216 | .start = USBD_INT6, | ||
217 | .end = USBD_INT6, | ||
218 | .flags = IORESOURCE_IRQ, | ||
219 | }, | ||
220 | }; | ||
221 | |||
222 | struct platform_device imx_usb_device = { | ||
223 | .name = "imx_udc", | ||
224 | .id = 0, | ||
225 | .num_resources = ARRAY_SIZE(imx_usb_resources), | ||
226 | .resource = imx_usb_resources, | ||
227 | }; | ||
228 | |||
87 | /* GPIO port description */ | 229 | /* GPIO port description */ |
88 | static struct mxc_gpio_port imx_gpio_ports[] = { | 230 | static struct mxc_gpio_port imx_gpio_ports[] = { |
89 | [0] = { | 231 | [0] = { |
diff --git a/arch/arm/mach-mx1/devices.h b/arch/arm/mach-mx1/devices.h index 408485b0acfe..0da5d7cce3a2 100644 --- a/arch/arm/mach-mx1/devices.h +++ b/arch/arm/mach-mx1/devices.h | |||
@@ -1,2 +1,7 @@ | |||
1 | extern struct platform_device imx_csi_device; | ||
2 | extern struct platform_device imx_i2c_device; | ||
1 | extern struct platform_device imx_uart1_device; | 3 | extern struct platform_device imx_uart1_device; |
2 | extern struct platform_device imx_uart2_device; | 4 | extern struct platform_device imx_uart2_device; |
5 | extern struct platform_device imx_rtc_device; | ||
6 | extern struct platform_device imx_wdt_device; | ||
7 | extern struct platform_device imx_usb_device; | ||