Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Author: MontaVista Software, Inc. |
| 3 | * <source@mvista.com> |
| 4 | * |
| 5 | * Based on the OMAP devices.c |
| 6 | * |
| 7 | * 2005 (c) MontaVista Software, Inc. This file is licensed under the |
| 8 | * terms of the GNU General Public License version 2. This program is |
| 9 | * licensed "as is" without any warranty of any kind, whether express |
| 10 | * or implied. |
| 11 | * |
| 12 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
| 13 | * Copyright 2008 Juergen Beisert, kernel@pengutronix.de |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 14 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de |
| 15 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> |
| 16 | * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt> |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 17 | * |
| 18 | * This program is free software; you can redistribute it and/or |
| 19 | * modify it under the terms of the GNU General Public License |
| 20 | * as published by the Free Software Foundation; either version 2 |
| 21 | * of the License, or (at your option) any later version. |
| 22 | * This program is distributed in the hope that it will be useful, |
| 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 | * GNU General Public License for more details. |
| 26 | * |
| 27 | * You should have received a copy of the GNU General Public License |
| 28 | * along with this program; if not, write to the Free Software |
| 29 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 30 | * MA 02110-1301, USA. |
| 31 | */ |
| 32 | #include <linux/module.h> |
| 33 | #include <linux/kernel.h> |
| 34 | #include <linux/init.h> |
| 35 | #include <linux/platform_device.h> |
| 36 | #include <linux/gpio.h> |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 37 | #include <linux/dma-mapping.h> |
Uwe Kleine-König | e9ec2a1 | 2010-06-10 17:34:59 +0200 | [diff] [blame] | 38 | #include <linux/serial.h> |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 39 | |
Russell King | 80b02c1 | 2009-01-08 10:01:47 +0000 | [diff] [blame] | 40 | #include <mach/irqs.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 41 | #include <mach/hardware.h> |
Holger Schurig | 058b7a6 | 2009-01-26 16:34:51 +0100 | [diff] [blame] | 42 | #include <mach/common.h> |
Sascha Hauer | 1a02be0 | 2008-12-19 14:32:07 +0100 | [diff] [blame] | 43 | #include <mach/mmc.h> |
Holger Schurig | 058b7a6 | 2009-01-26 16:34:51 +0100 | [diff] [blame] | 44 | |
| 45 | #include "devices.h" |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 46 | |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 47 | #if defined(CONFIG_ARCH_MX1) |
| 48 | static struct resource imx1_camera_resources[] = { |
| 49 | { |
| 50 | .start = 0x00224000, |
| 51 | .end = 0x00224010, |
| 52 | .flags = IORESOURCE_MEM, |
| 53 | }, { |
| 54 | .start = MX1_CSI_INT, |
| 55 | .end = MX1_CSI_INT, |
| 56 | .flags = IORESOURCE_IRQ, |
| 57 | }, |
| 58 | }; |
| 59 | |
| 60 | static u64 imx1_camera_dmamask = DMA_BIT_MASK(32); |
| 61 | |
| 62 | struct platform_device imx1_camera_device = { |
| 63 | .name = "mx1-camera", |
| 64 | .id = 0, /* This is used to put cameras on this interface */ |
| 65 | .dev = { |
| 66 | .dma_mask = &imx1_camera_dmamask, |
| 67 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 68 | }, |
| 69 | .resource = imx1_camera_resources, |
| 70 | .num_resources = ARRAY_SIZE(imx1_camera_resources), |
| 71 | }; |
| 72 | |
| 73 | static struct resource imx_i2c_resources[] = { |
| 74 | { |
| 75 | .start = 0x00217000, |
| 76 | .end = 0x00217010, |
| 77 | .flags = IORESOURCE_MEM, |
| 78 | }, { |
| 79 | .start = MX1_I2C_INT, |
| 80 | .end = MX1_I2C_INT, |
| 81 | .flags = IORESOURCE_IRQ, |
| 82 | }, |
| 83 | }; |
| 84 | |
| 85 | struct platform_device imx_i2c_device0 = { |
| 86 | .name = "imx-i2c", |
| 87 | .id = 0, |
| 88 | .resource = imx_i2c_resources, |
| 89 | .num_resources = ARRAY_SIZE(imx_i2c_resources), |
| 90 | }; |
| 91 | |
| 92 | #define DEFINE_IMX1_UART_DEVICE(n, baseaddr, irqrx, irqtx, irqrts) \ |
| 93 | static struct resource imx1_uart_resources ## n[] = { \ |
| 94 | { \ |
| 95 | .start = baseaddr, \ |
| 96 | .end = baseaddr + 0xd0, \ |
| 97 | .flags = IORESOURCE_MEM, \ |
| 98 | }, { \ |
| 99 | .start = irqrx, \ |
| 100 | .end = irqrx, \ |
| 101 | .flags = IORESOURCE_IRQ, \ |
| 102 | }, { \ |
| 103 | .start = irqtx, \ |
| 104 | .end = irqtx, \ |
| 105 | .flags = IORESOURCE_IRQ, \ |
| 106 | }, { \ |
| 107 | .start = irqrts, \ |
| 108 | .end = irqrts, \ |
| 109 | .flags = IORESOURCE_IRQ, \ |
| 110 | }, \ |
| 111 | }; \ |
| 112 | \ |
| 113 | struct platform_device imx1_uart_device ## n = { \ |
| 114 | .name = "imx-uart", \ |
| 115 | .id = n, \ |
| 116 | .num_resources = ARRAY_SIZE(imx1_uart_resources ## n), \ |
| 117 | .resource = imx1_uart_resources ## n, \ |
| 118 | } |
| 119 | |
| 120 | DEFINE_IMX1_UART_DEVICE(0, MX1_UART1_BASE_ADDR, MX1_UART1_MINT_RX, MX1_UART1_MINT_TX, MX1_UART1_MINT_RTS); |
| 121 | DEFINE_IMX1_UART_DEVICE(1, MX1_UART2_BASE_ADDR, MX1_UART2_MINT_RX, MX1_UART2_MINT_TX, MX1_UART2_MINT_RTS); |
| 122 | |
| 123 | static struct resource imx_rtc_resources[] = { |
| 124 | { |
| 125 | .start = 0x00204000, |
| 126 | .end = 0x00204024, |
| 127 | .flags = IORESOURCE_MEM, |
| 128 | }, { |
| 129 | .start = MX1_RTC_INT, |
| 130 | .end = MX1_RTC_INT, |
| 131 | .flags = IORESOURCE_IRQ, |
| 132 | }, { |
| 133 | .start = MX1_RTC_SAMINT, |
| 134 | .end = MX1_RTC_SAMINT, |
| 135 | .flags = IORESOURCE_IRQ, |
| 136 | }, |
| 137 | }; |
| 138 | |
| 139 | struct platform_device imx_rtc_device = { |
| 140 | .name = "rtc-imx", |
| 141 | .id = 0, |
| 142 | .resource = imx_rtc_resources, |
| 143 | .num_resources = ARRAY_SIZE(imx_rtc_resources), |
| 144 | }; |
| 145 | |
| 146 | static struct resource imx_wdt_resources[] = { |
| 147 | { |
| 148 | .start = 0x00201000, |
| 149 | .end = 0x00201008, |
| 150 | .flags = IORESOURCE_MEM, |
| 151 | }, { |
| 152 | .start = MX1_WDT_INT, |
| 153 | .end = MX1_WDT_INT, |
| 154 | .flags = IORESOURCE_IRQ, |
| 155 | }, |
| 156 | }; |
| 157 | |
| 158 | struct platform_device imx_wdt_device = { |
| 159 | .name = "imx-wdt", |
| 160 | .id = 0, |
| 161 | .resource = imx_wdt_resources, |
| 162 | .num_resources = ARRAY_SIZE(imx_wdt_resources), |
| 163 | }; |
| 164 | |
| 165 | static struct resource imx_usb_resources[] = { |
| 166 | { |
| 167 | .start = 0x00212000, |
| 168 | .end = 0x00212148, |
| 169 | .flags = IORESOURCE_MEM, |
| 170 | }, { |
| 171 | .start = MX1_USBD_INT0, |
| 172 | .end = MX1_USBD_INT0, |
| 173 | .flags = IORESOURCE_IRQ, |
| 174 | }, { |
| 175 | .start = MX1_USBD_INT1, |
| 176 | .end = MX1_USBD_INT1, |
| 177 | .flags = IORESOURCE_IRQ, |
| 178 | }, { |
| 179 | .start = MX1_USBD_INT2, |
| 180 | .end = MX1_USBD_INT2, |
| 181 | .flags = IORESOURCE_IRQ, |
| 182 | }, { |
| 183 | .start = MX1_USBD_INT3, |
| 184 | .end = MX1_USBD_INT3, |
| 185 | .flags = IORESOURCE_IRQ, |
| 186 | }, { |
| 187 | .start = MX1_USBD_INT4, |
| 188 | .end = MX1_USBD_INT4, |
| 189 | .flags = IORESOURCE_IRQ, |
| 190 | }, { |
| 191 | .start = MX1_USBD_INT5, |
| 192 | .end = MX1_USBD_INT5, |
| 193 | .flags = IORESOURCE_IRQ, |
| 194 | }, { |
| 195 | .start = MX1_USBD_INT6, |
| 196 | .end = MX1_USBD_INT6, |
| 197 | .flags = IORESOURCE_IRQ, |
| 198 | }, |
| 199 | }; |
| 200 | |
| 201 | struct platform_device imx_usb_device = { |
| 202 | .name = "imx_udc", |
| 203 | .id = 0, |
| 204 | .num_resources = ARRAY_SIZE(imx_usb_resources), |
| 205 | .resource = imx_usb_resources, |
| 206 | }; |
| 207 | |
| 208 | /* GPIO port description */ |
| 209 | static struct mxc_gpio_port imx_gpio_ports[] = { |
| 210 | { |
| 211 | .chip.label = "gpio-0", |
| 212 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR), |
| 213 | .irq = MX1_GPIO_INT_PORTA, |
| 214 | .virtual_irq_start = MXC_GPIO_IRQ_START, |
| 215 | }, { |
| 216 | .chip.label = "gpio-1", |
| 217 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100), |
| 218 | .irq = MX1_GPIO_INT_PORTB, |
| 219 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, |
| 220 | }, { |
| 221 | .chip.label = "gpio-2", |
| 222 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200), |
| 223 | .irq = MX1_GPIO_INT_PORTC, |
| 224 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, |
| 225 | }, { |
| 226 | .chip.label = "gpio-3", |
| 227 | .base = (void __iomem *)MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300), |
| 228 | .irq = MX1_GPIO_INT_PORTD, |
| 229 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96, |
| 230 | } |
| 231 | }; |
| 232 | |
| 233 | int __init imx1_register_gpios(void) |
| 234 | { |
| 235 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
| 236 | } |
| 237 | #endif |
| 238 | |
| 239 | #if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27) |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 240 | /* |
Sascha Hauer | f420db8 | 2008-12-19 14:32:14 +0100 | [diff] [blame] | 241 | * SPI master controller |
| 242 | * |
| 243 | * - i.MX1: 2 channel (slighly different register setting) |
| 244 | * - i.MX21: 2 channel |
| 245 | * - i.MX27: 3 channel |
| 246 | */ |
Uwe Kleine-König | 68c94b4 | 2010-02-04 22:04:32 +0100 | [diff] [blame] | 247 | #define DEFINE_IMX_SPI_DEVICE(n, baseaddr, irq) \ |
| 248 | static struct resource mxc_spi_resources ## n[] = { \ |
| 249 | { \ |
| 250 | .start = baseaddr, \ |
| 251 | .end = baseaddr + SZ_4K - 1, \ |
| 252 | .flags = IORESOURCE_MEM, \ |
| 253 | }, { \ |
| 254 | .start = irq, \ |
| 255 | .end = irq, \ |
| 256 | .flags = IORESOURCE_IRQ, \ |
| 257 | }, \ |
| 258 | }; \ |
| 259 | \ |
| 260 | struct platform_device mxc_spi_device ## n = { \ |
| 261 | .name = "spi_imx", \ |
| 262 | .id = n, \ |
| 263 | .num_resources = ARRAY_SIZE(mxc_spi_resources ## n), \ |
| 264 | .resource = mxc_spi_resources ## n, \ |
| 265 | } |
Sascha Hauer | f420db8 | 2008-12-19 14:32:14 +0100 | [diff] [blame] | 266 | |
Uwe Kleine-König | 68c94b4 | 2010-02-04 22:04:32 +0100 | [diff] [blame] | 267 | DEFINE_IMX_SPI_DEVICE(0, MX2x_CSPI1_BASE_ADDR, MX2x_INT_CSPI1); |
| 268 | DEFINE_IMX_SPI_DEVICE(1, MX2x_CSPI2_BASE_ADDR, MX2x_INT_CSPI2); |
Sascha Hauer | f420db8 | 2008-12-19 14:32:14 +0100 | [diff] [blame] | 269 | |
| 270 | #ifdef CONFIG_MACH_MX27 |
Uwe Kleine-König | 68c94b4 | 2010-02-04 22:04:32 +0100 | [diff] [blame] | 271 | DEFINE_IMX_SPI_DEVICE(2, MX27_CSPI3_BASE_ADDR, MX27_INT_CSPI3); |
Sascha Hauer | f420db8 | 2008-12-19 14:32:14 +0100 | [diff] [blame] | 272 | #endif |
| 273 | |
| 274 | /* |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 275 | * General Purpose Timer |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 276 | * - i.MX21: 3 timers |
| 277 | * - i.MX27: 6 timers |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 278 | */ |
Uwe Kleine-König | 2b84a364 | 2010-02-04 14:11:02 +0100 | [diff] [blame] | 279 | #define DEFINE_IMX_GPT_DEVICE(n, baseaddr, irq) \ |
| 280 | static struct resource timer ## n ##_resources[] = { \ |
| 281 | { \ |
| 282 | .start = baseaddr, \ |
| 283 | .end = baseaddr + SZ_4K - 1, \ |
| 284 | .flags = IORESOURCE_MEM, \ |
| 285 | }, { \ |
| 286 | .start = irq, \ |
| 287 | .end = irq, \ |
| 288 | .flags = IORESOURCE_IRQ, \ |
| 289 | } \ |
| 290 | }; \ |
| 291 | \ |
| 292 | struct platform_device mxc_gpt ## n = { \ |
| 293 | .name = "imx_gpt", \ |
| 294 | .id = n, \ |
| 295 | .num_resources = ARRAY_SIZE(timer ## n ## _resources), \ |
| 296 | .resource = timer ## n ## _resources, \ |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 297 | } |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 298 | |
Uwe Kleine-König | 2b84a364 | 2010-02-04 14:11:02 +0100 | [diff] [blame] | 299 | /* We use gpt1 as system timer, so do not add a device for this one */ |
| 300 | DEFINE_IMX_GPT_DEVICE(1, MX2x_GPT2_BASE_ADDR, MX2x_INT_GPT2); |
| 301 | DEFINE_IMX_GPT_DEVICE(2, MX2x_GPT3_BASE_ADDR, MX2x_INT_GPT3); |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 302 | |
| 303 | #ifdef CONFIG_MACH_MX27 |
Uwe Kleine-König | 2b84a364 | 2010-02-04 14:11:02 +0100 | [diff] [blame] | 304 | DEFINE_IMX_GPT_DEVICE(3, MX27_GPT4_BASE_ADDR, MX27_INT_GPT4); |
| 305 | DEFINE_IMX_GPT_DEVICE(4, MX27_GPT5_BASE_ADDR, MX27_INT_GPT5); |
| 306 | DEFINE_IMX_GPT_DEVICE(5, MX27_GPT6_BASE_ADDR, MX27_INT_GPT6); |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 307 | #endif |
| 308 | |
Wolfram Sang | 6d38c1c | 2010-04-29 10:03:18 +0200 | [diff] [blame] | 309 | /* Watchdog: i.MX1 has seperate driver, i.MX21 and i.MX27 are equal */ |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 310 | static struct resource mxc_wdt_resources[] = { |
| 311 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 312 | .start = MX2x_WDOG_BASE_ADDR, |
| 313 | .end = MX2x_WDOG_BASE_ADDR + SZ_4K - 1, |
| 314 | .flags = IORESOURCE_MEM, |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 315 | }, |
| 316 | }; |
| 317 | |
| 318 | struct platform_device mxc_wdt = { |
Wolfram Sang | 6d38c1c | 2010-04-29 10:03:18 +0200 | [diff] [blame] | 319 | .name = "imx2-wdt", |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 320 | .id = 0, |
| 321 | .num_resources = ARRAY_SIZE(mxc_wdt_resources), |
| 322 | .resource = mxc_wdt_resources, |
| 323 | }; |
| 324 | |
Sascha Hauer | 3d89baa | 2008-12-01 14:15:38 -0800 | [diff] [blame] | 325 | static struct resource mxc_w1_master_resources[] = { |
| 326 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 327 | .start = MX2x_OWIRE_BASE_ADDR, |
| 328 | .end = MX2x_OWIRE_BASE_ADDR + SZ_4K - 1, |
Sascha Hauer | 3d89baa | 2008-12-01 14:15:38 -0800 | [diff] [blame] | 329 | .flags = IORESOURCE_MEM, |
| 330 | }, |
| 331 | }; |
| 332 | |
| 333 | struct platform_device mxc_w1_master_device = { |
| 334 | .name = "mxc_w1", |
| 335 | .id = 0, |
| 336 | .num_resources = ARRAY_SIZE(mxc_w1_master_resources), |
| 337 | .resource = mxc_w1_master_resources, |
| 338 | }; |
| 339 | |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 340 | /* |
| 341 | * lcdc: |
| 342 | * - i.MX1: the basic controller |
| 343 | * - i.MX21: to be checked |
| 344 | * - i.MX27: like i.MX1, with slightly variations |
| 345 | */ |
| 346 | static struct resource mxc_fb[] = { |
| 347 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 348 | .start = MX2x_LCDC_BASE_ADDR, |
| 349 | .end = MX2x_LCDC_BASE_ADDR + SZ_4K - 1, |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 350 | .flags = IORESOURCE_MEM, |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 351 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 352 | .start = MX2x_INT_LCDC, |
| 353 | .end = MX2x_INT_LCDC, |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 354 | .flags = IORESOURCE_IRQ, |
| 355 | } |
| 356 | }; |
| 357 | |
| 358 | /* mxc lcd driver */ |
| 359 | struct platform_device mxc_fb_device = { |
| 360 | .name = "imx-fb", |
| 361 | .id = 0, |
| 362 | .num_resources = ARRAY_SIZE(mxc_fb), |
| 363 | .resource = mxc_fb, |
| 364 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 365 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 366 | }, |
| 367 | }; |
| 368 | |
Sascha Hauer | 879fea1 | 2009-01-26 17:26:02 +0100 | [diff] [blame] | 369 | #ifdef CONFIG_MACH_MX27 |
| 370 | static struct resource mxc_fec_resources[] = { |
| 371 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 372 | .start = MX27_FEC_BASE_ADDR, |
| 373 | .end = MX27_FEC_BASE_ADDR + SZ_4K - 1, |
| 374 | .flags = IORESOURCE_MEM, |
Sascha Hauer | 879fea1 | 2009-01-26 17:26:02 +0100 | [diff] [blame] | 375 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 376 | .start = MX27_INT_FEC, |
| 377 | .end = MX27_INT_FEC, |
| 378 | .flags = IORESOURCE_IRQ, |
Sascha Hauer | 879fea1 | 2009-01-26 17:26:02 +0100 | [diff] [blame] | 379 | }, |
| 380 | }; |
| 381 | |
| 382 | struct platform_device mxc_fec_device = { |
| 383 | .name = "fec", |
| 384 | .id = 0, |
| 385 | .num_resources = ARRAY_SIZE(mxc_fec_resources), |
| 386 | .resource = mxc_fec_resources, |
| 387 | }; |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 388 | #endif |
| 389 | |
Uwe Kleine-König | 9309b2b | 2010-02-04 22:13:52 +0100 | [diff] [blame] | 390 | #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq) \ |
| 391 | static struct resource mxc_i2c_resources ## n[] = { \ |
| 392 | { \ |
| 393 | .start = baseaddr, \ |
| 394 | .end = baseaddr + SZ_4K - 1, \ |
| 395 | .flags = IORESOURCE_MEM, \ |
| 396 | }, { \ |
| 397 | .start = irq, \ |
| 398 | .end = irq, \ |
| 399 | .flags = IORESOURCE_IRQ, \ |
| 400 | } \ |
| 401 | }; \ |
| 402 | \ |
| 403 | struct platform_device mxc_i2c_device ## n = { \ |
| 404 | .name = "imx-i2c", \ |
| 405 | .id = n, \ |
| 406 | .num_resources = ARRAY_SIZE(mxc_i2c_resources ## n), \ |
| 407 | .resource = mxc_i2c_resources ## n, \ |
Sascha Hauer | c5d4dbf | 2009-01-28 13:26:56 +0100 | [diff] [blame] | 408 | } |
Sascha Hauer | c5d4dbf | 2009-01-28 13:26:56 +0100 | [diff] [blame] | 409 | |
Uwe Kleine-König | 9309b2b | 2010-02-04 22:13:52 +0100 | [diff] [blame] | 410 | DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C); |
Sascha Hauer | c5d4dbf | 2009-01-28 13:26:56 +0100 | [diff] [blame] | 411 | |
| 412 | #ifdef CONFIG_MACH_MX27 |
Uwe Kleine-König | 9309b2b | 2010-02-04 22:13:52 +0100 | [diff] [blame] | 413 | DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2); |
Sascha Hauer | c5d4dbf | 2009-01-28 13:26:56 +0100 | [diff] [blame] | 414 | #endif |
| 415 | |
Sascha Hauer | 824b16e | 2009-01-16 15:17:46 +0100 | [diff] [blame] | 416 | static struct resource mxc_pwm_resources[] = { |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 417 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 418 | .start = MX2x_PWM_BASE_ADDR, |
| 419 | .end = MX2x_PWM_BASE_ADDR + SZ_4K - 1, |
| 420 | .flags = IORESOURCE_MEM, |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 421 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 422 | .start = MX2x_INT_PWM, |
| 423 | .end = MX2x_INT_PWM, |
| 424 | .flags = IORESOURCE_IRQ, |
Sascha Hauer | 824b16e | 2009-01-16 15:17:46 +0100 | [diff] [blame] | 425 | } |
| 426 | }; |
| 427 | |
| 428 | struct platform_device mxc_pwm_device = { |
| 429 | .name = "mxc_pwm", |
| 430 | .id = 0, |
| 431 | .num_resources = ARRAY_SIZE(mxc_pwm_resources), |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 432 | .resource = mxc_pwm_resources, |
Sascha Hauer | 824b16e | 2009-01-16 15:17:46 +0100 | [diff] [blame] | 433 | }; |
| 434 | |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 435 | #define DEFINE_MXC_MMC_DEVICE(n, baseaddr, irq, dmareq) \ |
| 436 | static struct resource mxc_sdhc_resources ## n[] = { \ |
| 437 | { \ |
| 438 | .start = baseaddr, \ |
| 439 | .end = baseaddr + SZ_4K - 1, \ |
| 440 | .flags = IORESOURCE_MEM, \ |
| 441 | }, { \ |
| 442 | .start = irq, \ |
| 443 | .end = irq, \ |
| 444 | .flags = IORESOURCE_IRQ, \ |
| 445 | }, { \ |
| 446 | .start = dmareq, \ |
| 447 | .end = dmareq, \ |
| 448 | .flags = IORESOURCE_DMA, \ |
| 449 | }, \ |
| 450 | }; \ |
| 451 | \ |
Russell King | 988addf | 2010-03-08 20:21:04 +0000 | [diff] [blame] | 452 | static u64 mxc_sdhc ## n ## _dmamask = DMA_BIT_MASK(32); \ |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 453 | \ |
| 454 | struct platform_device mxc_sdhc_device ## n = { \ |
| 455 | .name = "mxc-mmc", \ |
| 456 | .id = n, \ |
| 457 | .dev = { \ |
| 458 | .dma_mask = &mxc_sdhc ## n ## _dmamask, \ |
Russell King | 988addf | 2010-03-08 20:21:04 +0000 | [diff] [blame] | 459 | .coherent_dma_mask = DMA_BIT_MASK(32), \ |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 460 | }, \ |
| 461 | .num_resources = ARRAY_SIZE(mxc_sdhc_resources ## n), \ |
| 462 | .resource = mxc_sdhc_resources ## n, \ |
| 463 | } |
Sascha Hauer | 1a02be0 | 2008-12-19 14:32:07 +0100 | [diff] [blame] | 464 | |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 465 | DEFINE_MXC_MMC_DEVICE(0, MX2x_SDHC1_BASE_ADDR, MX2x_INT_SDHC1, MX2x_DMA_REQ_SDHC1); |
| 466 | DEFINE_MXC_MMC_DEVICE(1, MX2x_SDHC2_BASE_ADDR, MX2x_INT_SDHC2, MX2x_DMA_REQ_SDHC2); |
Sascha Hauer | 1a02be0 | 2008-12-19 14:32:07 +0100 | [diff] [blame] | 467 | |
Sascha Hauer | f6d2fa7 | 2009-08-13 10:02:30 +0200 | [diff] [blame] | 468 | #ifdef CONFIG_MACH_MX27 |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 469 | static struct resource otg_resources[] = { |
| 470 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 471 | .start = MX27_USBOTG_BASE_ADDR, |
| 472 | .end = MX27_USBOTG_BASE_ADDR + 0x1ff, |
| 473 | .flags = IORESOURCE_MEM, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 474 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 475 | .start = MX27_INT_USB3, |
| 476 | .end = MX27_INT_USB3, |
| 477 | .flags = IORESOURCE_IRQ, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 478 | }, |
| 479 | }; |
| 480 | |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 481 | static u64 otg_dmamask = DMA_BIT_MASK(32); |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 482 | |
| 483 | /* OTG gadget device */ |
| 484 | struct platform_device mxc_otg_udc_device = { |
| 485 | .name = "fsl-usb2-udc", |
| 486 | .id = -1, |
| 487 | .dev = { |
| 488 | .dma_mask = &otg_dmamask, |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 489 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 490 | }, |
| 491 | .resource = otg_resources, |
| 492 | .num_resources = ARRAY_SIZE(otg_resources), |
| 493 | }; |
| 494 | |
| 495 | /* OTG host */ |
| 496 | struct platform_device mxc_otg_host = { |
| 497 | .name = "mxc-ehci", |
| 498 | .id = 0, |
| 499 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 500 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 501 | .dma_mask = &otg_dmamask, |
| 502 | }, |
| 503 | .resource = otg_resources, |
| 504 | .num_resources = ARRAY_SIZE(otg_resources), |
| 505 | }; |
| 506 | |
| 507 | /* USB host 1 */ |
| 508 | |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 509 | static u64 usbh1_dmamask = DMA_BIT_MASK(32); |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 510 | |
| 511 | static struct resource mxc_usbh1_resources[] = { |
| 512 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 513 | .start = MX27_USBOTG_BASE_ADDR + 0x200, |
| 514 | .end = MX27_USBOTG_BASE_ADDR + 0x3ff, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 515 | .flags = IORESOURCE_MEM, |
| 516 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 517 | .start = MX27_INT_USB1, |
| 518 | .end = MX27_INT_USB1, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 519 | .flags = IORESOURCE_IRQ, |
| 520 | }, |
| 521 | }; |
| 522 | |
| 523 | struct platform_device mxc_usbh1 = { |
| 524 | .name = "mxc-ehci", |
| 525 | .id = 1, |
| 526 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 527 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 528 | .dma_mask = &usbh1_dmamask, |
| 529 | }, |
| 530 | .resource = mxc_usbh1_resources, |
| 531 | .num_resources = ARRAY_SIZE(mxc_usbh1_resources), |
| 532 | }; |
| 533 | |
| 534 | /* USB host 2 */ |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 535 | static u64 usbh2_dmamask = DMA_BIT_MASK(32); |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 536 | |
| 537 | static struct resource mxc_usbh2_resources[] = { |
| 538 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 539 | .start = MX27_USBOTG_BASE_ADDR + 0x400, |
| 540 | .end = MX27_USBOTG_BASE_ADDR + 0x5ff, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 541 | .flags = IORESOURCE_MEM, |
| 542 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 543 | .start = MX27_INT_USB2, |
| 544 | .end = MX27_INT_USB2, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 545 | .flags = IORESOURCE_IRQ, |
| 546 | }, |
| 547 | }; |
| 548 | |
| 549 | struct platform_device mxc_usbh2 = { |
| 550 | .name = "mxc-ehci", |
| 551 | .id = 2, |
| 552 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 553 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 554 | .dma_mask = &usbh2_dmamask, |
| 555 | }, |
| 556 | .resource = mxc_usbh2_resources, |
| 557 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
| 558 | }; |
Sascha Hauer | f6d2fa7 | 2009-08-13 10:02:30 +0200 | [diff] [blame] | 559 | #endif |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 560 | |
Uwe Kleine-König | 69ddb48 | 2010-02-05 12:03:37 +0100 | [diff] [blame] | 561 | #define DEFINE_IMX_SSI_DMARES(_name, ssin, suffix) \ |
| 562 | { \ |
| 563 | .name = _name, \ |
| 564 | .start = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ |
| 565 | .end = MX2x_DMA_REQ_SSI ## ssin ## _ ## suffix, \ |
| 566 | .flags = IORESOURCE_DMA, \ |
| 567 | } |
Sascha Hauer | 23291df | 2009-10-22 14:50:33 +0200 | [diff] [blame] | 568 | |
Uwe Kleine-König | 69ddb48 | 2010-02-05 12:03:37 +0100 | [diff] [blame] | 569 | #define DEFINE_IMX_SSI_DEVICE(n, ssin, baseaddr, irq) \ |
| 570 | static struct resource imx_ssi_resources ## n[] = { \ |
| 571 | { \ |
| 572 | .start = MX2x_SSI ## ssin ## _BASE_ADDR, \ |
| 573 | .end = MX2x_SSI ## ssin ## _BASE_ADDR + 0x6f, \ |
| 574 | .flags = IORESOURCE_MEM, \ |
| 575 | }, { \ |
| 576 | .start = MX2x_INT_SSI1, \ |
| 577 | .end = MX2x_INT_SSI1, \ |
| 578 | .flags = IORESOURCE_IRQ, \ |
| 579 | }, \ |
| 580 | DEFINE_IMX_SSI_DMARES("tx0", ssin, TX0), \ |
| 581 | DEFINE_IMX_SSI_DMARES("rx0", ssin, RX0), \ |
| 582 | DEFINE_IMX_SSI_DMARES("tx1", ssin, TX1), \ |
| 583 | DEFINE_IMX_SSI_DMARES("rx1", ssin, RX1), \ |
| 584 | }; \ |
| 585 | \ |
| 586 | struct platform_device imx_ssi_device ## n = { \ |
| 587 | .name = "imx-ssi", \ |
| 588 | .id = n, \ |
| 589 | .num_resources = ARRAY_SIZE(imx_ssi_resources ## n), \ |
| 590 | .resource = imx_ssi_resources ## n, \ |
| 591 | } |
Sascha Hauer | 23291df | 2009-10-22 14:50:33 +0200 | [diff] [blame] | 592 | |
Uwe Kleine-König | 69ddb48 | 2010-02-05 12:03:37 +0100 | [diff] [blame] | 593 | DEFINE_IMX_SSI_DEVICE(0, 1, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); |
| 594 | DEFINE_IMX_SSI_DEVICE(1, 2, MX2x_SSI1_BASE_ADDR, MX2x_INT_SSI1); |
Sascha Hauer | 23291df | 2009-10-22 14:50:33 +0200 | [diff] [blame] | 595 | |
Uwe Kleine-König | 551823e | 2010-06-11 09:08:02 +0200 | [diff] [blame] | 596 | #define DEFINE_IMX2x_UART_DEVICE(n, baseaddr, irq) \ |
Uwe Kleine-König | e9ec2a1 | 2010-06-10 17:34:59 +0200 | [diff] [blame] | 597 | static struct resource imx2x_uart_resources ## n[] = { \ |
| 598 | { \ |
| 599 | .start = baseaddr, \ |
| 600 | .end = baseaddr + 0xb5, \ |
| 601 | .flags = IORESOURCE_MEM, \ |
| 602 | }, { \ |
| 603 | .start = irq, \ |
| 604 | .end = irq, \ |
| 605 | .flags = IORESOURCE_IRQ, \ |
| 606 | }, \ |
| 607 | }; \ |
| 608 | \ |
Uwe Kleine-König | 551823e | 2010-06-11 09:08:02 +0200 | [diff] [blame] | 609 | struct platform_device imx2x_uart_device ## n = { \ |
Uwe Kleine-König | e9ec2a1 | 2010-06-10 17:34:59 +0200 | [diff] [blame] | 610 | .name = "imx-uart", \ |
| 611 | .id = n, \ |
| 612 | .num_resources = ARRAY_SIZE(imx2x_uart_resources ## n), \ |
| 613 | .resource = imx2x_uart_resources ## n, \ |
| 614 | } |
| 615 | |
Uwe Kleine-König | 551823e | 2010-06-11 09:08:02 +0200 | [diff] [blame] | 616 | DEFINE_IMX2x_UART_DEVICE(0, MX2x_UART1_BASE_ADDR, MX2x_INT_UART1); |
| 617 | DEFINE_IMX2x_UART_DEVICE(1, MX2x_UART2_BASE_ADDR, MX2x_INT_UART2); |
| 618 | DEFINE_IMX2x_UART_DEVICE(2, MX2x_UART3_BASE_ADDR, MX2x_INT_UART3); |
| 619 | DEFINE_IMX2x_UART_DEVICE(3, MX2x_UART4_BASE_ADDR, MX2x_INT_UART4); |
Uwe Kleine-König | e9ec2a1 | 2010-06-10 17:34:59 +0200 | [diff] [blame] | 620 | |
| 621 | #ifdef CONFIG_MACH_MX27 |
Uwe Kleine-König | 551823e | 2010-06-11 09:08:02 +0200 | [diff] [blame] | 622 | DEFINE_IMX2x_UART_DEVICE(4, MX27_UART5_BASE_ADDR, MX27_INT_UART5); |
| 623 | DEFINE_IMX2x_UART_DEVICE(5, MX27_UART6_BASE_ADDR, MX27_INT_UART6); |
Uwe Kleine-König | e9ec2a1 | 2010-06-10 17:34:59 +0200 | [diff] [blame] | 624 | #endif |
| 625 | |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 626 | /* GPIO port description */ |
Uwe Kleine-König | 897359d | 2010-02-05 17:40:28 +0100 | [diff] [blame] | 627 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ |
| 628 | { \ |
| 629 | .chip.label = "gpio-" #n, \ |
| 630 | .irq = _irq, \ |
| 631 | .base = SOC ## _IO_ADDRESS(MX2x_GPIO_BASE_ADDR + \ |
| 632 | n * 0x100), \ |
| 633 | .virtual_irq_start = MXC_GPIO_IRQ_START + n * 32, \ |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 634 | } |
Uwe Kleine-König | 897359d | 2010-02-05 17:40:28 +0100 | [diff] [blame] | 635 | |
| 636 | #define DEFINE_MXC_GPIO_PORT(SOC, n) \ |
| 637 | { \ |
| 638 | .chip.label = "gpio-" #n, \ |
| 639 | .base = SOC ## _IO_ADDRESS(MX2x_GPIO_BASE_ADDR + \ |
| 640 | n * 0x100), \ |
| 641 | .virtual_irq_start = MXC_GPIO_IRQ_START + n * 32, \ |
| 642 | } |
| 643 | |
| 644 | #define DEFINE_MXC_GPIO_PORTS(SOC, pfx) \ |
| 645 | static struct mxc_gpio_port pfx ## _gpio_ports[] = { \ |
| 646 | DEFINE_MXC_GPIO_PORT_IRQ(SOC, 0, SOC ## _INT_GPIO), \ |
| 647 | DEFINE_MXC_GPIO_PORT(SOC, 1), \ |
| 648 | DEFINE_MXC_GPIO_PORT(SOC, 2), \ |
| 649 | DEFINE_MXC_GPIO_PORT(SOC, 3), \ |
| 650 | DEFINE_MXC_GPIO_PORT(SOC, 4), \ |
| 651 | DEFINE_MXC_GPIO_PORT(SOC, 5), \ |
| 652 | } |
| 653 | |
| 654 | #ifdef CONFIG_MACH_MX21 |
| 655 | DEFINE_MXC_GPIO_PORTS(MX21, imx21); |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 656 | |
| 657 | int __init imx21_register_gpios(void) |
| 658 | { |
| 659 | return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); |
| 660 | } |
Uwe Kleine-König | 897359d | 2010-02-05 17:40:28 +0100 | [diff] [blame] | 661 | #endif |
| 662 | |
| 663 | #ifdef CONFIG_MACH_MX27 |
| 664 | DEFINE_MXC_GPIO_PORTS(MX27, imx27); |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 665 | |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 666 | int __init imx27_register_gpios(void) |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 667 | { |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 668 | return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 669 | } |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 670 | #endif |
Martin Fuzzey | 4e0fa90 | 2009-11-21 12:14:58 +0100 | [diff] [blame] | 671 | |
| 672 | #ifdef CONFIG_MACH_MX21 |
| 673 | static struct resource mx21_usbhc_resources[] = { |
| 674 | { |
Wolfram Sang | e169530 | 2010-05-15 11:25:35 +0100 | [diff] [blame] | 675 | .start = MX21_USBOTG_BASE_ADDR, |
| 676 | .end = MX21_USBOTG_BASE_ADDR + SZ_8K - 1, |
Martin Fuzzey | 4e0fa90 | 2009-11-21 12:14:58 +0100 | [diff] [blame] | 677 | .flags = IORESOURCE_MEM, |
| 678 | }, |
| 679 | { |
Russell King | 988addf | 2010-03-08 20:21:04 +0000 | [diff] [blame] | 680 | .start = MX21_INT_USBHOST, |
| 681 | .end = MX21_INT_USBHOST, |
Martin Fuzzey | 4e0fa90 | 2009-11-21 12:14:58 +0100 | [diff] [blame] | 682 | .flags = IORESOURCE_IRQ, |
| 683 | }, |
| 684 | }; |
| 685 | |
| 686 | struct platform_device mx21_usbhc_device = { |
| 687 | .name = "imx21-hcd", |
| 688 | .id = 0, |
| 689 | .dev = { |
| 690 | .dma_mask = &mx21_usbhc_device.dev.coherent_dma_mask, |
| 691 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 692 | }, |
| 693 | .num_resources = ARRAY_SIZE(mx21_usbhc_resources), |
| 694 | .resource = mx21_usbhc_resources, |
| 695 | }; |
| 696 | #endif |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 697 | #endif |