Sascha Hauer | e3d13ff | 2008-07-05 10:02:48 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version 2 |
| 8 | * of the License, or (at your option) any later version. |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 | * Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
Guennadi Liakhovetski | eb05bbe | 2009-05-04 13:13:52 +0200 | [diff] [blame] | 20 | #include <linux/dma-mapping.h> |
Sascha Hauer | e3d13ff | 2008-07-05 10:02:48 +0200 | [diff] [blame] | 21 | #include <linux/module.h> |
| 22 | #include <linux/platform_device.h> |
| 23 | #include <linux/serial.h> |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 24 | #include <linux/gpio.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 25 | #include <mach/hardware.h> |
Russell King | 80b02c1 | 2009-01-08 10:01:47 +0000 | [diff] [blame] | 26 | #include <mach/irqs.h> |
Alan Carvalho de Assis | 45001e9 | 2009-04-02 12:38:41 -0300 | [diff] [blame] | 27 | #include <mach/common.h> |
Valentin Longchamp | 9c70e22 | 2009-05-07 11:51:42 +0200 | [diff] [blame] | 28 | #include <mach/mx3_camera.h> |
Sascha Hauer | e3d13ff | 2008-07-05 10:02:48 +0200 | [diff] [blame] | 29 | |
Sascha Hauer | 87bbb19 | 2009-01-29 16:00:23 +0100 | [diff] [blame] | 30 | #include "devices.h" |
| 31 | |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 32 | /* GPIO port description */ |
| 33 | static struct mxc_gpio_port imx_gpio_ports[] = { |
Sascha Hauer | 3f4f54b | 2009-06-23 12:12:00 +0200 | [diff] [blame] | 34 | { |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 35 | .chip.label = "gpio-0", |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 36 | .base = MX31_IO_ADDRESS(MX31_GPIO1_BASE_ADDR), |
| 37 | .irq = MX3x_INT_GPIO1, |
Sascha Hauer | 9d631b8 | 2008-12-18 11:08:55 +0100 | [diff] [blame] | 38 | .virtual_irq_start = MXC_GPIO_IRQ_START, |
Sascha Hauer | 3f4f54b | 2009-06-23 12:12:00 +0200 | [diff] [blame] | 39 | }, { |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 40 | .chip.label = "gpio-1", |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 41 | .base = MX31_IO_ADDRESS(MX31_GPIO2_BASE_ADDR), |
| 42 | .irq = MX3x_INT_GPIO2, |
Sascha Hauer | 9d631b8 | 2008-12-18 11:08:55 +0100 | [diff] [blame] | 43 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, |
Sascha Hauer | 3f4f54b | 2009-06-23 12:12:00 +0200 | [diff] [blame] | 44 | }, { |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 45 | .chip.label = "gpio-2", |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 46 | .base = MX31_IO_ADDRESS(MX31_GPIO3_BASE_ADDR), |
| 47 | .irq = MX3x_INT_GPIO3, |
Sascha Hauer | 9d631b8 | 2008-12-18 11:08:55 +0100 | [diff] [blame] | 48 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 49 | } |
| 50 | }; |
| 51 | |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 52 | int __init imx3x_register_gpios(void) |
Juergen Beisert | 07bd1a6 | 2008-07-05 10:02:49 +0200 | [diff] [blame] | 53 | { |
| 54 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
| 55 | } |
Sascha Hauer | a840592 | 2008-12-01 14:15:39 -0800 | [diff] [blame] | 56 | |
| 57 | static struct resource mxc_w1_master_resources[] = { |
| 58 | { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 59 | .start = MX3x_OWIRE_BASE_ADDR, |
| 60 | .end = MX3x_OWIRE_BASE_ADDR + SZ_4K - 1, |
Sascha Hauer | a840592 | 2008-12-01 14:15:39 -0800 | [diff] [blame] | 61 | .flags = IORESOURCE_MEM, |
| 62 | }, |
| 63 | }; |
| 64 | |
| 65 | struct platform_device mxc_w1_master_device = { |
| 66 | .name = "mxc_w1", |
| 67 | .id = 0, |
| 68 | .num_resources = ARRAY_SIZE(mxc_w1_master_resources), |
| 69 | .resource = mxc_w1_master_resources, |
| 70 | }; |
Sascha Hauer | cb96cf1 | 2008-11-11 15:15:39 +0100 | [diff] [blame] | 71 | |
Sascha Hauer | 2adc1d6 | 2008-12-19 14:32:06 +0100 | [diff] [blame] | 72 | #ifdef CONFIG_ARCH_MX31 |
| 73 | static struct resource mxcsdhc0_resources[] = { |
| 74 | { |
Uwe Kleine-König | 662a74b | 2010-10-20 17:44:30 +0200 | [diff] [blame] | 75 | .start = MX31_MMC_SDHC1_BASE_ADDR, |
| 76 | .end = MX31_MMC_SDHC1_BASE_ADDR + SZ_16K - 1, |
Sascha Hauer | 2adc1d6 | 2008-12-19 14:32:06 +0100 | [diff] [blame] | 77 | .flags = IORESOURCE_MEM, |
| 78 | }, { |
Uwe Kleine-König | 662a74b | 2010-10-20 17:44:30 +0200 | [diff] [blame] | 79 | .start = MX31_INT_MMC_SDHC1, |
| 80 | .end = MX31_INT_MMC_SDHC1, |
Sascha Hauer | 2adc1d6 | 2008-12-19 14:32:06 +0100 | [diff] [blame] | 81 | .flags = IORESOURCE_IRQ, |
| 82 | }, |
| 83 | }; |
| 84 | |
| 85 | static struct resource mxcsdhc1_resources[] = { |
| 86 | { |
Uwe Kleine-König | 662a74b | 2010-10-20 17:44:30 +0200 | [diff] [blame] | 87 | .start = MX31_MMC_SDHC2_BASE_ADDR, |
| 88 | .end = MX31_MMC_SDHC2_BASE_ADDR + SZ_16K - 1, |
Sascha Hauer | 2adc1d6 | 2008-12-19 14:32:06 +0100 | [diff] [blame] | 89 | .flags = IORESOURCE_MEM, |
| 90 | }, { |
Uwe Kleine-König | 662a74b | 2010-10-20 17:44:30 +0200 | [diff] [blame] | 91 | .start = MX31_INT_MMC_SDHC2, |
| 92 | .end = MX31_INT_MMC_SDHC2, |
Sascha Hauer | 2adc1d6 | 2008-12-19 14:32:06 +0100 | [diff] [blame] | 93 | .flags = IORESOURCE_IRQ, |
| 94 | }, |
| 95 | }; |
| 96 | |
| 97 | struct platform_device mxcsdhc_device0 = { |
| 98 | .name = "mxc-mmc", |
| 99 | .id = 0, |
| 100 | .num_resources = ARRAY_SIZE(mxcsdhc0_resources), |
| 101 | .resource = mxcsdhc0_resources, |
| 102 | }; |
| 103 | |
| 104 | struct platform_device mxcsdhc_device1 = { |
| 105 | .name = "mxc-mmc", |
| 106 | .id = 1, |
| 107 | .num_resources = ARRAY_SIZE(mxcsdhc1_resources), |
| 108 | .resource = mxcsdhc1_resources, |
| 109 | }; |
Alan Carvalho de Assis | 45001e9 | 2009-04-02 12:38:41 -0300 | [diff] [blame] | 110 | |
| 111 | static struct resource rnga_resources[] = { |
| 112 | { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 113 | .start = MX3x_RNGA_BASE_ADDR, |
| 114 | .end = MX3x_RNGA_BASE_ADDR + 0x28, |
Alan Carvalho de Assis | 45001e9 | 2009-04-02 12:38:41 -0300 | [diff] [blame] | 115 | .flags = IORESOURCE_MEM, |
| 116 | }, |
| 117 | }; |
| 118 | |
| 119 | struct platform_device mxc_rnga_device = { |
| 120 | .name = "mxc_rnga", |
| 121 | .id = -1, |
| 122 | .num_resources = 1, |
| 123 | .resource = rnga_resources, |
| 124 | }; |
Sascha Hauer | 2adc1d6 | 2008-12-19 14:32:06 +0100 | [diff] [blame] | 125 | #endif /* CONFIG_ARCH_MX31 */ |
| 126 | |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 127 | /* i.MX31 Image Processing Unit */ |
| 128 | |
| 129 | /* The resource order is important! */ |
| 130 | static struct resource mx3_ipu_rsrc[] = { |
| 131 | { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 132 | .start = MX3x_IPU_CTRL_BASE_ADDR, |
| 133 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0x5F, |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 134 | .flags = IORESOURCE_MEM, |
| 135 | }, { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 136 | .start = MX3x_IPU_CTRL_BASE_ADDR + 0x88, |
| 137 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0xB3, |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 138 | .flags = IORESOURCE_MEM, |
| 139 | }, { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 140 | .start = MX3x_INT_IPU_SYN, |
| 141 | .end = MX3x_INT_IPU_SYN, |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 142 | .flags = IORESOURCE_IRQ, |
| 143 | }, { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 144 | .start = MX3x_INT_IPU_ERR, |
| 145 | .end = MX3x_INT_IPU_ERR, |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 146 | .flags = IORESOURCE_IRQ, |
| 147 | }, |
| 148 | }; |
| 149 | |
| 150 | struct platform_device mx3_ipu = { |
| 151 | .name = "ipu-core", |
| 152 | .id = -1, |
| 153 | .num_resources = ARRAY_SIZE(mx3_ipu_rsrc), |
| 154 | .resource = mx3_ipu_rsrc, |
| 155 | }; |
| 156 | |
| 157 | static struct resource fb_resources[] = { |
| 158 | { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 159 | .start = MX3x_IPU_CTRL_BASE_ADDR + 0xB4, |
| 160 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0x1BF, |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 161 | .flags = IORESOURCE_MEM, |
| 162 | }, |
| 163 | }; |
| 164 | |
| 165 | struct platform_device mx3_fb = { |
| 166 | .name = "mx3_sdc_fb", |
| 167 | .id = -1, |
| 168 | .num_resources = ARRAY_SIZE(fb_resources), |
| 169 | .resource = fb_resources, |
| 170 | .dev = { |
Valentin Longchamp | 9c70e22 | 2009-05-07 11:51:42 +0200 | [diff] [blame] | 171 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Valentin Longchamp | ca489f8 | 2009-02-16 12:47:52 +0100 | [diff] [blame] | 172 | }, |
| 173 | }; |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 174 | |
Valentin Longchamp | 9c70e22 | 2009-05-07 11:51:42 +0200 | [diff] [blame] | 175 | static struct resource camera_resources[] = { |
| 176 | { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 177 | .start = MX3x_IPU_CTRL_BASE_ADDR + 0x60, |
| 178 | .end = MX3x_IPU_CTRL_BASE_ADDR + 0x87, |
Valentin Longchamp | 9c70e22 | 2009-05-07 11:51:42 +0200 | [diff] [blame] | 179 | .flags = IORESOURCE_MEM, |
| 180 | }, |
| 181 | }; |
| 182 | |
| 183 | struct platform_device mx3_camera = { |
| 184 | .name = "mx3-camera", |
| 185 | .id = 0, |
| 186 | .num_resources = ARRAY_SIZE(camera_resources), |
| 187 | .resource = camera_resources, |
| 188 | .dev = { |
| 189 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 190 | }, |
| 191 | }; |
| 192 | |
Guennadi Liakhovetski | eb05bbe | 2009-05-04 13:13:52 +0200 | [diff] [blame] | 193 | static struct resource otg_resources[] = { |
| 194 | { |
Sascha Hauer | 7bc07eb | 2009-04-17 16:52:25 +0200 | [diff] [blame] | 195 | .start = MX31_OTG_BASE_ADDR, |
| 196 | .end = MX31_OTG_BASE_ADDR + 0x1ff, |
Guennadi Liakhovetski | eb05bbe | 2009-05-04 13:13:52 +0200 | [diff] [blame] | 197 | .flags = IORESOURCE_MEM, |
| 198 | }, { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 199 | .start = MX31_INT_USB3, |
| 200 | .end = MX31_INT_USB3, |
Guennadi Liakhovetski | eb05bbe | 2009-05-04 13:13:52 +0200 | [diff] [blame] | 201 | .flags = IORESOURCE_IRQ, |
| 202 | }, |
| 203 | }; |
| 204 | |
| 205 | static u64 otg_dmamask = DMA_BIT_MASK(32); |
| 206 | |
| 207 | /* OTG gadget device */ |
| 208 | struct platform_device mxc_otg_udc_device = { |
| 209 | .name = "fsl-usb2-udc", |
| 210 | .id = -1, |
| 211 | .dev = { |
| 212 | .dma_mask = &otg_dmamask, |
| 213 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 214 | }, |
| 215 | .resource = otg_resources, |
| 216 | .num_resources = ARRAY_SIZE(otg_resources), |
| 217 | }; |
| 218 | |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 219 | /* OTG host */ |
| 220 | struct platform_device mxc_otg_host = { |
| 221 | .name = "mxc-ehci", |
| 222 | .id = 0, |
| 223 | .dev = { |
| 224 | .coherent_dma_mask = 0xffffffff, |
| 225 | .dma_mask = &otg_dmamask, |
| 226 | }, |
| 227 | .resource = otg_resources, |
| 228 | .num_resources = ARRAY_SIZE(otg_resources), |
| 229 | }; |
| 230 | |
| 231 | /* USB host 1 */ |
| 232 | |
| 233 | static u64 usbh1_dmamask = ~(u32)0; |
| 234 | |
| 235 | static struct resource mxc_usbh1_resources[] = { |
| 236 | { |
Sascha Hauer | 7bc07eb | 2009-04-17 16:52:25 +0200 | [diff] [blame] | 237 | .start = MX31_OTG_BASE_ADDR + 0x200, |
| 238 | .end = MX31_OTG_BASE_ADDR + 0x3ff, |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 239 | .flags = IORESOURCE_MEM, |
| 240 | }, { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 241 | .start = MX31_INT_USB1, |
| 242 | .end = MX31_INT_USB1, |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 243 | .flags = IORESOURCE_IRQ, |
| 244 | }, |
| 245 | }; |
| 246 | |
| 247 | struct platform_device mxc_usbh1 = { |
| 248 | .name = "mxc-ehci", |
| 249 | .id = 1, |
| 250 | .dev = { |
| 251 | .coherent_dma_mask = 0xffffffff, |
| 252 | .dma_mask = &usbh1_dmamask, |
| 253 | }, |
| 254 | .resource = mxc_usbh1_resources, |
| 255 | .num_resources = ARRAY_SIZE(mxc_usbh1_resources), |
| 256 | }; |
| 257 | |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 258 | #ifdef CONFIG_ARCH_MX31 |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 259 | /* USB host 2 */ |
| 260 | static u64 usbh2_dmamask = ~(u32)0; |
| 261 | |
| 262 | static struct resource mxc_usbh2_resources[] = { |
| 263 | { |
Sascha Hauer | 7bc07eb | 2009-04-17 16:52:25 +0200 | [diff] [blame] | 264 | .start = MX31_OTG_BASE_ADDR + 0x400, |
| 265 | .end = MX31_OTG_BASE_ADDR + 0x5ff, |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 266 | .flags = IORESOURCE_MEM, |
| 267 | }, { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 268 | .start = MX31_INT_USB2, |
| 269 | .end = MX31_INT_USB2, |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 270 | .flags = IORESOURCE_IRQ, |
| 271 | }, |
| 272 | }; |
| 273 | |
| 274 | struct platform_device mxc_usbh2 = { |
| 275 | .name = "mxc-ehci", |
| 276 | .id = 2, |
| 277 | .dev = { |
| 278 | .coherent_dma_mask = 0xffffffff, |
| 279 | .dma_mask = &usbh2_dmamask, |
| 280 | }, |
| 281 | .resource = mxc_usbh2_resources, |
| 282 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
| 283 | }; |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 284 | #endif |
Daniel Mack | c13a482 | 2009-06-25 14:11:50 +0200 | [diff] [blame] | 285 | |
Vladimir Zapolskiy | a7dc12b | 2010-03-19 18:16:37 +0300 | [diff] [blame] | 286 | static struct resource imx_wdt_resources[] = { |
| 287 | { |
| 288 | .flags = IORESOURCE_MEM, |
| 289 | }, |
| 290 | }; |
| 291 | |
| 292 | struct platform_device imx_wdt_device0 = { |
Wolfram Sang | 6d38c1c | 2010-04-29 10:03:18 +0200 | [diff] [blame] | 293 | .name = "imx2-wdt", |
Vladimir Zapolskiy | a7dc12b | 2010-03-19 18:16:37 +0300 | [diff] [blame] | 294 | .id = 0, |
| 295 | .num_resources = ARRAY_SIZE(imx_wdt_resources), |
| 296 | .resource = imx_wdt_resources, |
| 297 | }; |
| 298 | |
Vladimir Zapolskiy | ded518c | 2010-03-24 14:32:17 +0300 | [diff] [blame] | 299 | static struct resource imx_rtc_resources[] = { |
| 300 | { |
| 301 | .start = MX31_RTC_BASE_ADDR, |
| 302 | .end = MX31_RTC_BASE_ADDR + 0x3fff, |
| 303 | .flags = IORESOURCE_MEM, |
| 304 | }, |
| 305 | { |
| 306 | .start = MX31_INT_RTC, |
| 307 | .flags = IORESOURCE_IRQ, |
| 308 | }, |
| 309 | }; |
| 310 | |
| 311 | struct platform_device imx_rtc_device0 = { |
| 312 | .name = "mxc_rtc", |
| 313 | .id = -1, |
| 314 | .num_resources = ARRAY_SIZE(imx_rtc_resources), |
| 315 | .resource = imx_rtc_resources, |
| 316 | }; |
| 317 | |
Alberto Panizzo | b1e8995 | 2010-05-19 11:33:43 +0200 | [diff] [blame] | 318 | static struct resource imx_kpp_resources[] = { |
| 319 | { |
| 320 | .start = MX3x_KPP_BASE_ADDR, |
| 321 | .end = MX3x_KPP_BASE_ADDR + 0xf, |
| 322 | .flags = IORESOURCE_MEM |
| 323 | }, { |
| 324 | .start = MX3x_INT_KPP, |
| 325 | .end = MX3x_INT_KPP, |
| 326 | .flags = IORESOURCE_IRQ, |
| 327 | }, |
| 328 | }; |
| 329 | |
| 330 | struct platform_device imx_kpp_device = { |
| 331 | .name = "imx-keypad", |
| 332 | .id = -1, |
| 333 | .num_resources = ARRAY_SIZE(imx_kpp_resources), |
| 334 | .resource = imx_kpp_resources, |
| 335 | }; |
| 336 | |
Vladimir Zapolskiy | a7dc12b | 2010-03-19 18:16:37 +0300 | [diff] [blame] | 337 | static int __init mx3_devices_init(void) |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 338 | { |
Uwe Kleine-König | a2ceeef | 2010-06-16 12:23:11 +0200 | [diff] [blame] | 339 | #if defined(CONFIG_ARCH_MX31) |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 340 | if (cpu_is_mx31()) { |
Vladimir Zapolskiy | a7dc12b | 2010-03-19 18:16:37 +0300 | [diff] [blame] | 341 | imx_wdt_resources[0].start = MX31_WDOG_BASE_ADDR; |
| 342 | imx_wdt_resources[0].end = MX31_WDOG_BASE_ADDR + 0x3fff; |
Alan Carvalho de Assis | 45001e9 | 2009-04-02 12:38:41 -0300 | [diff] [blame] | 343 | mxc_register_device(&mxc_rnga_device, NULL); |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 344 | } |
Uwe Kleine-König | a2ceeef | 2010-06-16 12:23:11 +0200 | [diff] [blame] | 345 | #endif |
| 346 | #if defined(CONFIG_ARCH_MX35) |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 347 | if (cpu_is_mx35()) { |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 348 | imx_gpio_ports[0].base = MX35_IO_ADDRESS(MX35_GPIO1_BASE_ADDR), |
| 349 | imx_gpio_ports[1].base = MX35_IO_ADDRESS(MX35_GPIO2_BASE_ADDR), |
| 350 | imx_gpio_ports[2].base = MX35_IO_ADDRESS(MX35_GPIO3_BASE_ADDR), |
Sascha Hauer | 7bc07eb | 2009-04-17 16:52:25 +0200 | [diff] [blame] | 351 | otg_resources[0].start = MX35_OTG_BASE_ADDR; |
| 352 | otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 353 | otg_resources[1].start = MX35_INT_USBOTG; |
| 354 | otg_resources[1].end = MX35_INT_USBOTG; |
Sascha Hauer | 7bc07eb | 2009-04-17 16:52:25 +0200 | [diff] [blame] | 355 | mxc_usbh1_resources[0].start = MX35_OTG_BASE_ADDR + 0x400; |
| 356 | mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff; |
Uwe Kleine-König | 9651b7d | 2010-10-22 14:49:45 +0200 | [diff] [blame^] | 357 | mxc_usbh1_resources[1].start = MX35_INT_USBHS; |
| 358 | mxc_usbh1_resources[1].end = MX35_INT_USBHS; |
Vladimir Zapolskiy | a7dc12b | 2010-03-19 18:16:37 +0300 | [diff] [blame] | 359 | imx_wdt_resources[0].start = MX35_WDOG_BASE_ADDR; |
| 360 | imx_wdt_resources[0].end = MX35_WDOG_BASE_ADDR + 0x3fff; |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 361 | } |
Uwe Kleine-König | a2ceeef | 2010-06-16 12:23:11 +0200 | [diff] [blame] | 362 | #endif |
Sascha Hauer | 9536ff3 | 2009-02-06 15:38:51 +0100 | [diff] [blame] | 363 | |
| 364 | return 0; |
| 365 | } |
| 366 | |
| 367 | subsys_initcall(mx3_devices_init); |