2 * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Sascha Hauer, kernel@pengutronix.de
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.
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.
20 #include <linux/dma-mapping.h>
21 #include <linux/module.h>
22 #include <linux/platform_device.h>
23 #include <linux/serial.h>
24 #include <linux/gpio.h>
25 #include <mach/hardware.h>
26 #include <mach/irqs.h>
27 #include <mach/common.h>
28 #include <mach/mx3_camera.h>
32 /* i.MX31 Image Processing Unit */
34 /* The resource order is important! */
35 static struct resource mx3_ipu_rsrc
[] = {
37 .start
= MX3x_IPU_CTRL_BASE_ADDR
,
38 .end
= MX3x_IPU_CTRL_BASE_ADDR
+ 0x5F,
39 .flags
= IORESOURCE_MEM
,
41 .start
= MX3x_IPU_CTRL_BASE_ADDR
+ 0x88,
42 .end
= MX3x_IPU_CTRL_BASE_ADDR
+ 0xB3,
43 .flags
= IORESOURCE_MEM
,
45 .start
= MX3x_INT_IPU_SYN
,
46 .end
= MX3x_INT_IPU_SYN
,
47 .flags
= IORESOURCE_IRQ
,
49 .start
= MX3x_INT_IPU_ERR
,
50 .end
= MX3x_INT_IPU_ERR
,
51 .flags
= IORESOURCE_IRQ
,
55 struct platform_device mx3_ipu
= {
58 .num_resources
= ARRAY_SIZE(mx3_ipu_rsrc
),
59 .resource
= mx3_ipu_rsrc
,
62 static struct resource fb_resources
[] = {
64 .start
= MX3x_IPU_CTRL_BASE_ADDR
+ 0xB4,
65 .end
= MX3x_IPU_CTRL_BASE_ADDR
+ 0x1BF,
66 .flags
= IORESOURCE_MEM
,
70 struct platform_device mx3_fb
= {
73 .num_resources
= ARRAY_SIZE(fb_resources
),
74 .resource
= fb_resources
,
76 .coherent_dma_mask
= DMA_BIT_MASK(32),
80 static struct resource camera_resources
[] = {
82 .start
= MX3x_IPU_CTRL_BASE_ADDR
+ 0x60,
83 .end
= MX3x_IPU_CTRL_BASE_ADDR
+ 0x87,
84 .flags
= IORESOURCE_MEM
,
88 struct platform_device mx3_camera
= {
91 .num_resources
= ARRAY_SIZE(camera_resources
),
92 .resource
= camera_resources
,
94 .coherent_dma_mask
= DMA_BIT_MASK(32),
98 static struct resource imx_rtc_resources
[] = {
100 .start
= MX31_RTC_BASE_ADDR
,
101 .end
= MX31_RTC_BASE_ADDR
+ 0x3fff,
102 .flags
= IORESOURCE_MEM
,
105 .start
= MX31_INT_RTC
,
106 .flags
= IORESOURCE_IRQ
,
110 struct platform_device imx_rtc_device0
= {
113 .num_resources
= ARRAY_SIZE(imx_rtc_resources
),
114 .resource
= imx_rtc_resources
,