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) |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 48 | /* GPIO port description */ |
| 49 | static struct mxc_gpio_port imx_gpio_ports[] = { |
| 50 | { |
| 51 | .chip.label = "gpio-0", |
Uwe Kleine-König | cf3a6ab | 2010-10-25 15:54:58 +0200 | [diff] [blame] | 52 | .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR), |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 53 | .irq = MX1_GPIO_INT_PORTA, |
| 54 | .virtual_irq_start = MXC_GPIO_IRQ_START, |
| 55 | }, { |
| 56 | .chip.label = "gpio-1", |
Uwe Kleine-König | cf3a6ab | 2010-10-25 15:54:58 +0200 | [diff] [blame] | 57 | .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x100), |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 58 | .irq = MX1_GPIO_INT_PORTB, |
| 59 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, |
| 60 | }, { |
| 61 | .chip.label = "gpio-2", |
Uwe Kleine-König | cf3a6ab | 2010-10-25 15:54:58 +0200 | [diff] [blame] | 62 | .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x200), |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 63 | .irq = MX1_GPIO_INT_PORTC, |
| 64 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, |
| 65 | }, { |
| 66 | .chip.label = "gpio-3", |
Uwe Kleine-König | cf3a6ab | 2010-10-25 15:54:58 +0200 | [diff] [blame] | 67 | .base = MX1_IO_ADDRESS(MX1_GPIO_BASE_ADDR + 0x300), |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 68 | .irq = MX1_GPIO_INT_PORTD, |
| 69 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96, |
| 70 | } |
| 71 | }; |
| 72 | |
| 73 | int __init imx1_register_gpios(void) |
| 74 | { |
| 75 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
| 76 | } |
| 77 | #endif |
| 78 | |
| 79 | #if defined(CONFIG_MACH_MX21) || defined(CONFIG_MACH_MX27) |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 80 | /* |
| 81 | * lcdc: |
| 82 | * - i.MX1: the basic controller |
| 83 | * - i.MX21: to be checked |
| 84 | * - i.MX27: like i.MX1, with slightly variations |
| 85 | */ |
| 86 | static struct resource mxc_fb[] = { |
| 87 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 88 | .start = MX2x_LCDC_BASE_ADDR, |
| 89 | .end = MX2x_LCDC_BASE_ADDR + SZ_4K - 1, |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 90 | .flags = IORESOURCE_MEM, |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 91 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 92 | .start = MX2x_INT_LCDC, |
| 93 | .end = MX2x_INT_LCDC, |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 94 | .flags = IORESOURCE_IRQ, |
| 95 | } |
| 96 | }; |
| 97 | |
| 98 | /* mxc lcd driver */ |
| 99 | struct platform_device mxc_fb_device = { |
| 100 | .name = "imx-fb", |
| 101 | .id = 0, |
| 102 | .num_resources = ARRAY_SIZE(mxc_fb), |
| 103 | .resource = mxc_fb, |
| 104 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 105 | .coherent_dma_mask = DMA_BIT_MASK(32), |
Holger Schurig | e481355 | 2009-01-26 16:34:56 +0100 | [diff] [blame] | 106 | }, |
| 107 | }; |
| 108 | |
Sascha Hauer | 824b16e | 2009-01-16 15:17:46 +0100 | [diff] [blame] | 109 | static struct resource mxc_pwm_resources[] = { |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 110 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 111 | .start = MX2x_PWM_BASE_ADDR, |
| 112 | .end = MX2x_PWM_BASE_ADDR + SZ_4K - 1, |
| 113 | .flags = IORESOURCE_MEM, |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 114 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 115 | .start = MX2x_INT_PWM, |
| 116 | .end = MX2x_INT_PWM, |
| 117 | .flags = IORESOURCE_IRQ, |
Sascha Hauer | 824b16e | 2009-01-16 15:17:46 +0100 | [diff] [blame] | 118 | } |
| 119 | }; |
| 120 | |
| 121 | struct platform_device mxc_pwm_device = { |
| 122 | .name = "mxc_pwm", |
| 123 | .id = 0, |
| 124 | .num_resources = ARRAY_SIZE(mxc_pwm_resources), |
Sascha Hauer | bf50bcc | 2009-06-23 12:04:36 +0200 | [diff] [blame] | 125 | .resource = mxc_pwm_resources, |
Sascha Hauer | 824b16e | 2009-01-16 15:17:46 +0100 | [diff] [blame] | 126 | }; |
| 127 | |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 128 | #define DEFINE_MXC_MMC_DEVICE(n, baseaddr, irq, dmareq) \ |
| 129 | static struct resource mxc_sdhc_resources ## n[] = { \ |
| 130 | { \ |
| 131 | .start = baseaddr, \ |
| 132 | .end = baseaddr + SZ_4K - 1, \ |
| 133 | .flags = IORESOURCE_MEM, \ |
| 134 | }, { \ |
| 135 | .start = irq, \ |
| 136 | .end = irq, \ |
| 137 | .flags = IORESOURCE_IRQ, \ |
| 138 | }, { \ |
| 139 | .start = dmareq, \ |
| 140 | .end = dmareq, \ |
| 141 | .flags = IORESOURCE_DMA, \ |
| 142 | }, \ |
| 143 | }; \ |
| 144 | \ |
Russell King | 988addf | 2010-03-08 20:21:04 +0000 | [diff] [blame] | 145 | static u64 mxc_sdhc ## n ## _dmamask = DMA_BIT_MASK(32); \ |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 146 | \ |
| 147 | struct platform_device mxc_sdhc_device ## n = { \ |
| 148 | .name = "mxc-mmc", \ |
| 149 | .id = n, \ |
| 150 | .dev = { \ |
| 151 | .dma_mask = &mxc_sdhc ## n ## _dmamask, \ |
Russell King | 988addf | 2010-03-08 20:21:04 +0000 | [diff] [blame] | 152 | .coherent_dma_mask = DMA_BIT_MASK(32), \ |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 153 | }, \ |
| 154 | .num_resources = ARRAY_SIZE(mxc_sdhc_resources ## n), \ |
| 155 | .resource = mxc_sdhc_resources ## n, \ |
| 156 | } |
Sascha Hauer | 1a02be0 | 2008-12-19 14:32:07 +0100 | [diff] [blame] | 157 | |
Uwe Kleine-König | ccd0e42 | 2010-02-05 10:46:56 +0100 | [diff] [blame] | 158 | DEFINE_MXC_MMC_DEVICE(0, MX2x_SDHC1_BASE_ADDR, MX2x_INT_SDHC1, MX2x_DMA_REQ_SDHC1); |
| 159 | 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] | 160 | |
Sascha Hauer | f6d2fa7 | 2009-08-13 10:02:30 +0200 | [diff] [blame] | 161 | #ifdef CONFIG_MACH_MX27 |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 162 | static struct resource otg_resources[] = { |
| 163 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 164 | .start = MX27_USBOTG_BASE_ADDR, |
| 165 | .end = MX27_USBOTG_BASE_ADDR + 0x1ff, |
| 166 | .flags = IORESOURCE_MEM, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 167 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 168 | .start = MX27_INT_USB3, |
| 169 | .end = MX27_INT_USB3, |
| 170 | .flags = IORESOURCE_IRQ, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 171 | }, |
| 172 | }; |
| 173 | |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 174 | static u64 otg_dmamask = DMA_BIT_MASK(32); |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 175 | |
| 176 | /* OTG gadget device */ |
| 177 | struct platform_device mxc_otg_udc_device = { |
| 178 | .name = "fsl-usb2-udc", |
| 179 | .id = -1, |
| 180 | .dev = { |
| 181 | .dma_mask = &otg_dmamask, |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 182 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 183 | }, |
| 184 | .resource = otg_resources, |
| 185 | .num_resources = ARRAY_SIZE(otg_resources), |
| 186 | }; |
| 187 | |
| 188 | /* OTG host */ |
| 189 | struct platform_device mxc_otg_host = { |
| 190 | .name = "mxc-ehci", |
| 191 | .id = 0, |
| 192 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 193 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 194 | .dma_mask = &otg_dmamask, |
| 195 | }, |
| 196 | .resource = otg_resources, |
| 197 | .num_resources = ARRAY_SIZE(otg_resources), |
| 198 | }; |
| 199 | |
| 200 | /* USB host 1 */ |
| 201 | |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 202 | static u64 usbh1_dmamask = DMA_BIT_MASK(32); |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 203 | |
| 204 | static struct resource mxc_usbh1_resources[] = { |
| 205 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 206 | .start = MX27_USBOTG_BASE_ADDR + 0x200, |
| 207 | .end = MX27_USBOTG_BASE_ADDR + 0x3ff, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 208 | .flags = IORESOURCE_MEM, |
| 209 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 210 | .start = MX27_INT_USB1, |
| 211 | .end = MX27_INT_USB1, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 212 | .flags = IORESOURCE_IRQ, |
| 213 | }, |
| 214 | }; |
| 215 | |
| 216 | struct platform_device mxc_usbh1 = { |
| 217 | .name = "mxc-ehci", |
| 218 | .id = 1, |
| 219 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 220 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 221 | .dma_mask = &usbh1_dmamask, |
| 222 | }, |
| 223 | .resource = mxc_usbh1_resources, |
| 224 | .num_resources = ARRAY_SIZE(mxc_usbh1_resources), |
| 225 | }; |
| 226 | |
| 227 | /* USB host 2 */ |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 228 | static u64 usbh2_dmamask = DMA_BIT_MASK(32); |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 229 | |
| 230 | static struct resource mxc_usbh2_resources[] = { |
| 231 | { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 232 | .start = MX27_USBOTG_BASE_ADDR + 0x400, |
| 233 | .end = MX27_USBOTG_BASE_ADDR + 0x5ff, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 234 | .flags = IORESOURCE_MEM, |
| 235 | }, { |
Uwe Kleine-König | 58152a1 | 2010-02-05 11:42:54 +0100 | [diff] [blame] | 236 | .start = MX27_INT_USB2, |
| 237 | .end = MX27_INT_USB2, |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 238 | .flags = IORESOURCE_IRQ, |
| 239 | }, |
| 240 | }; |
| 241 | |
| 242 | struct platform_device mxc_usbh2 = { |
| 243 | .name = "mxc-ehci", |
| 244 | .id = 2, |
| 245 | .dev = { |
Martin Fuzzey | 3eb352c | 2009-11-21 12:14:54 +0100 | [diff] [blame] | 246 | .coherent_dma_mask = DMA_BIT_MASK(32), |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 247 | .dma_mask = &usbh2_dmamask, |
| 248 | }, |
| 249 | .resource = mxc_usbh2_resources, |
| 250 | .num_resources = ARRAY_SIZE(mxc_usbh2_resources), |
| 251 | }; |
Sascha Hauer | f6d2fa7 | 2009-08-13 10:02:30 +0200 | [diff] [blame] | 252 | #endif |
javier Martin | 627fb3b | 2009-07-15 15:26:21 +0200 | [diff] [blame] | 253 | |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 254 | /* GPIO port description */ |
Uwe Kleine-König | 897359d5 | 2010-02-05 17:40:28 +0100 | [diff] [blame] | 255 | #define DEFINE_MXC_GPIO_PORT_IRQ(SOC, n, _irq) \ |
| 256 | { \ |
| 257 | .chip.label = "gpio-" #n, \ |
| 258 | .irq = _irq, \ |
| 259 | .base = SOC ## _IO_ADDRESS(MX2x_GPIO_BASE_ADDR + \ |
| 260 | n * 0x100), \ |
| 261 | .virtual_irq_start = MXC_GPIO_IRQ_START + n * 32, \ |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 262 | } |
Uwe Kleine-König | 897359d5 | 2010-02-05 17:40:28 +0100 | [diff] [blame] | 263 | |
| 264 | #define DEFINE_MXC_GPIO_PORT(SOC, n) \ |
| 265 | { \ |
| 266 | .chip.label = "gpio-" #n, \ |
| 267 | .base = SOC ## _IO_ADDRESS(MX2x_GPIO_BASE_ADDR + \ |
| 268 | n * 0x100), \ |
| 269 | .virtual_irq_start = MXC_GPIO_IRQ_START + n * 32, \ |
| 270 | } |
| 271 | |
| 272 | #define DEFINE_MXC_GPIO_PORTS(SOC, pfx) \ |
| 273 | static struct mxc_gpio_port pfx ## _gpio_ports[] = { \ |
| 274 | DEFINE_MXC_GPIO_PORT_IRQ(SOC, 0, SOC ## _INT_GPIO), \ |
| 275 | DEFINE_MXC_GPIO_PORT(SOC, 1), \ |
| 276 | DEFINE_MXC_GPIO_PORT(SOC, 2), \ |
| 277 | DEFINE_MXC_GPIO_PORT(SOC, 3), \ |
| 278 | DEFINE_MXC_GPIO_PORT(SOC, 4), \ |
| 279 | DEFINE_MXC_GPIO_PORT(SOC, 5), \ |
| 280 | } |
| 281 | |
| 282 | #ifdef CONFIG_MACH_MX21 |
| 283 | DEFINE_MXC_GPIO_PORTS(MX21, imx21); |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 284 | |
| 285 | int __init imx21_register_gpios(void) |
| 286 | { |
| 287 | return mxc_gpio_init(imx21_gpio_ports, ARRAY_SIZE(imx21_gpio_ports)); |
| 288 | } |
Uwe Kleine-König | 897359d5 | 2010-02-05 17:40:28 +0100 | [diff] [blame] | 289 | #endif |
| 290 | |
| 291 | #ifdef CONFIG_MACH_MX27 |
| 292 | DEFINE_MXC_GPIO_PORTS(MX27, imx27); |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 293 | |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 294 | int __init imx27_register_gpios(void) |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 295 | { |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 296 | return mxc_gpio_init(imx27_gpio_ports, ARRAY_SIZE(imx27_gpio_ports)); |
Juergen Beisert | fc80a5e | 2008-07-05 10:02:57 +0200 | [diff] [blame] | 297 | } |
Uwe Kleine-König | 9a763bf | 2010-06-10 17:11:06 +0200 | [diff] [blame] | 298 | #endif |
Martin Fuzzey | 4e0fa90 | 2009-11-21 12:14:58 +0100 | [diff] [blame] | 299 | |
| 300 | #ifdef CONFIG_MACH_MX21 |
| 301 | static struct resource mx21_usbhc_resources[] = { |
| 302 | { |
Wolfram Sang | e169530 | 2010-05-15 11:25:35 +0100 | [diff] [blame] | 303 | .start = MX21_USBOTG_BASE_ADDR, |
| 304 | .end = MX21_USBOTG_BASE_ADDR + SZ_8K - 1, |
Martin Fuzzey | 4e0fa90 | 2009-11-21 12:14:58 +0100 | [diff] [blame] | 305 | .flags = IORESOURCE_MEM, |
| 306 | }, |
| 307 | { |
Russell King | 988addf | 2010-03-08 20:21:04 +0000 | [diff] [blame] | 308 | .start = MX21_INT_USBHOST, |
| 309 | .end = MX21_INT_USBHOST, |
Martin Fuzzey | 4e0fa90 | 2009-11-21 12:14:58 +0100 | [diff] [blame] | 310 | .flags = IORESOURCE_IRQ, |
| 311 | }, |
| 312 | }; |
| 313 | |
| 314 | struct platform_device mx21_usbhc_device = { |
| 315 | .name = "imx21-hcd", |
| 316 | .id = 0, |
| 317 | .dev = { |
| 318 | .dma_mask = &mx21_usbhc_device.dev.coherent_dma_mask, |
| 319 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 320 | }, |
| 321 | .num_resources = ARRAY_SIZE(mx21_usbhc_resources), |
| 322 | .resource = mx21_usbhc_resources, |
| 323 | }; |
| 324 | #endif |
| 325 | |
Eric Bénard | 0896a9e | 2010-05-19 18:46:06 +0200 | [diff] [blame] | 326 | static struct resource imx_kpp_resources[] = { |
| 327 | { |
| 328 | .start = MX2x_KPP_BASE_ADDR, |
| 329 | .end = MX2x_KPP_BASE_ADDR + 0xf, |
| 330 | .flags = IORESOURCE_MEM |
| 331 | }, { |
| 332 | .start = MX2x_INT_KPP, |
| 333 | .end = MX2x_INT_KPP, |
| 334 | .flags = IORESOURCE_IRQ, |
| 335 | }, |
| 336 | }; |
| 337 | |
| 338 | struct platform_device imx_kpp_device = { |
| 339 | .name = "imx-keypad", |
| 340 | .id = -1, |
| 341 | .num_resources = ARRAY_SIZE(imx_kpp_resources), |
| 342 | .resource = imx_kpp_resources, |
| 343 | }; |
Uwe Kleine-König | 2dcf78c | 2010-06-30 12:16:24 +0200 | [diff] [blame] | 344 | |
Uwe Kleine-König | 0746949 | 2010-06-14 15:56:58 +0200 | [diff] [blame] | 345 | #endif |