]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/mach-mx25/devices.c
ARM: mx25: move registration of gpios to plat-mxc/gpio.c
[karo-tx-linux.git] / arch / arm / mach-mx25 / devices.c
1 /*
2  * Copyright 2009 Sascha Hauer, <kernel@pengutronix.de>
3  *
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.
12  *
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.
17  */
18
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>
24
25 static struct resource mxc_keypad_resources[] = {
26         {
27                 .start  = 0x43fa8000,
28                 .end    = 0x43fabfff,
29                 .flags  = IORESOURCE_MEM,
30         }, {
31                 .start   = 24,
32                 .end     = 24,
33                 .flags   = IORESOURCE_IRQ,
34         }
35 };
36
37 struct platform_device mxc_keypad_device = {
38         .name = "mxc-keypad",
39         .id = -1,
40         .num_resources = ARRAY_SIZE(mxc_keypad_resources),
41         .resource = mxc_keypad_resources,
42 };
43
44 static struct resource mx25_rtc_resources[] = {
45         {
46                 .start  = MX25_DRYICE_BASE_ADDR,
47                 .end    = MX25_DRYICE_BASE_ADDR + 0x40,
48                 .flags  = IORESOURCE_MEM,
49         },
50         {
51                 .start  = MX25_INT_DRYICE,
52                 .flags  = IORESOURCE_IRQ
53         },
54 };
55
56 struct platform_device mx25_rtc_device = {
57         .name   = "imxdi_rtc",
58         .id     = 0,
59         .num_resources  = ARRAY_SIZE(mx25_rtc_resources),
60         .resource       = mx25_rtc_resources,
61 };
62
63 static struct resource mx25_fb_resources[] = {
64         {
65                 .start  = MX25_LCDC_BASE_ADDR,
66                 .end    = MX25_LCDC_BASE_ADDR + 0xfff,
67                 .flags  = IORESOURCE_MEM,
68         },
69         {
70                 .start  = MX25_INT_LCDC,
71                 .end    = MX25_INT_LCDC,
72                 .flags  = IORESOURCE_IRQ,
73         },
74 };
75
76 struct platform_device mx25_fb_device = {
77         .name           = "imx-fb",
78         .id             = 0,
79         .resource       = mx25_fb_resources,
80         .num_resources  = ARRAY_SIZE(mx25_fb_resources),
81         .dev            = {
82                 .coherent_dma_mask = 0xFFFFFFFF,
83         },
84 };
85
86 static struct resource mxc_wdt_resources[] = {
87         {
88                 .start = MX25_WDOG_BASE_ADDR,
89                 .end = MX25_WDOG_BASE_ADDR + SZ_16K - 1,
90                 .flags = IORESOURCE_MEM,
91         },
92 };
93
94 struct platform_device mxc_wdt = {
95         .name = "imx2-wdt",
96         .id = 0,
97         .num_resources = ARRAY_SIZE(mxc_wdt_resources),
98         .resource = mxc_wdt_resources,
99 };
100
101 static struct resource mx25_kpp_resources[] = {
102         {
103                 .start  = MX25_KPP_BASE_ADDR,
104                 .end    = MX25_KPP_BASE_ADDR + 0xf,
105                 .flags  = IORESOURCE_MEM,
106         },
107         {
108                 .start  = MX25_INT_KPP,
109                 .end    = MX25_INT_KPP,
110                 .flags  = IORESOURCE_IRQ,
111         },
112 };
113
114 struct platform_device mx25_kpp_device = {
115         .name   = "imx-keypad",
116         .id     = -1,
117         .num_resources  = ARRAY_SIZE(mx25_kpp_resources),
118         .resource       = mx25_kpp_resources,
119 };
120
121 static struct resource mx25_csi_resources[] = {
122         {
123                 .start  = MX25_CSI_BASE_ADDR,
124                 .end    = MX25_CSI_BASE_ADDR + 0xfff,
125                 .flags  = IORESOURCE_MEM,
126         },
127         {
128                 .start  = MX25_INT_CSI,
129                 .flags  = IORESOURCE_IRQ
130         },
131 };
132
133 struct platform_device mx25_csi_device = {
134         .name   = "mx2-camera",
135         .id     = 0,
136         .num_resources  = ARRAY_SIZE(mx25_csi_resources),
137         .resource       = mx25_csi_resources,
138         .dev            = {
139                 .coherent_dma_mask = 0xffffffff,
140         },
141 };