2 * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
19 #include <linux/platform_device.h>
20 #include <linux/dma-mapping.h>
21 #include <linux/gpio.h>
22 #include <mach/mx25.h>
23 #include <mach/irqs.h>
25 static struct resource mxc_keypad_resources[] = {
29 .flags = IORESOURCE_MEM,
33 .flags = IORESOURCE_IRQ,
37 struct platform_device mxc_keypad_device = {
40 .num_resources = ARRAY_SIZE(mxc_keypad_resources),
41 .resource = mxc_keypad_resources,
44 static struct resource mx25_rtc_resources[] = {
46 .start = MX25_DRYICE_BASE_ADDR,
47 .end = MX25_DRYICE_BASE_ADDR + 0x40,
48 .flags = IORESOURCE_MEM,
51 .start = MX25_INT_DRYICE,
52 .flags = IORESOURCE_IRQ
56 struct platform_device mx25_rtc_device = {
59 .num_resources = ARRAY_SIZE(mx25_rtc_resources),
60 .resource = mx25_rtc_resources,
63 static struct resource mx25_fb_resources[] = {
65 .start = MX25_LCDC_BASE_ADDR,
66 .end = MX25_LCDC_BASE_ADDR + 0xfff,
67 .flags = IORESOURCE_MEM,
70 .start = MX25_INT_LCDC,
72 .flags = IORESOURCE_IRQ,
76 struct platform_device mx25_fb_device = {
79 .resource = mx25_fb_resources,
80 .num_resources = ARRAY_SIZE(mx25_fb_resources),
82 .coherent_dma_mask = 0xFFFFFFFF,
86 static struct resource mxc_wdt_resources[] = {
88 .start = MX25_WDOG_BASE_ADDR,
89 .end = MX25_WDOG_BASE_ADDR + SZ_16K - 1,
90 .flags = IORESOURCE_MEM,
94 struct platform_device mxc_wdt = {
97 .num_resources = ARRAY_SIZE(mxc_wdt_resources),
98 .resource = mxc_wdt_resources,
101 static struct resource mx25_kpp_resources[] = {
103 .start = MX25_KPP_BASE_ADDR,
104 .end = MX25_KPP_BASE_ADDR + 0xf,
105 .flags = IORESOURCE_MEM,
108 .start = MX25_INT_KPP,
110 .flags = IORESOURCE_IRQ,
114 struct platform_device mx25_kpp_device = {
115 .name = "imx-keypad",
117 .num_resources = ARRAY_SIZE(mx25_kpp_resources),
118 .resource = mx25_kpp_resources,
121 static struct resource mx25_csi_resources[] = {
123 .start = MX25_CSI_BASE_ADDR,
124 .end = MX25_CSI_BASE_ADDR + 0xfff,
125 .flags = IORESOURCE_MEM,
128 .start = MX25_INT_CSI,
129 .flags = IORESOURCE_IRQ
133 struct platform_device mx25_csi_device = {
134 .name = "mx2-camera",
136 .num_resources = ARRAY_SIZE(mx25_csi_resources),
137 .resource = mx25_csi_resources,
139 .coherent_dma_mask = 0xffffffff,