aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx25
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-11 11:11:34 -0500
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-11-19 15:53:48 -0500
commitbb4c853ff18fe3b0e2aec45053c318479e0c55e3 (patch)
treefd5a90eeacaf73be2d121ff1c5d3a9db2cb5e80b /arch/arm/mach-mx25
parent00871505dcf15418aebc402db9f124dd2738fa2d (diff)
ARM: mx25: dynamically allocate mx2-camera devices
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r--arch/arm/mach-mx25/Makefile2
-rw-r--r--arch/arm/mach-mx25/devices-imx25.h4
-rw-r--r--arch/arm/mach-mx25/devices.c45
-rw-r--r--arch/arm/mach-mx25/devices.h1
4 files changed, 5 insertions, 47 deletions
diff --git a/arch/arm/mach-mx25/Makefile b/arch/arm/mach-mx25/Makefile
index d9e46ce00a4e..f7f7648d2a55 100644
--- a/arch/arm/mach-mx25/Makefile
+++ b/arch/arm/mach-mx25/Makefile
@@ -1,4 +1,4 @@
1obj-y := mm.o devices.o 1obj-y := mm.o
2obj-$(CONFIG_ARCH_MX25) += clock.o 2obj-$(CONFIG_ARCH_MX25) += clock.o
3obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o 3obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o
4obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-cpuimx25.o 4obj-$(CONFIG_MACH_EUKREA_CPUIMX25) += mach-cpuimx25.o
diff --git a/arch/arm/mach-mx25/devices-imx25.h b/arch/arm/mach-mx25/devices-imx25.h
index bf70548caf04..953e1ce5334f 100644
--- a/arch/arm/mach-mx25/devices-imx25.h
+++ b/arch/arm/mach-mx25/devices-imx25.h
@@ -59,6 +59,10 @@ extern const struct imx_imx_uart_1irq_data imx25_imx_uart_data[] __initconst;
59#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata) 59#define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata)
60#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata) 60#define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata)
61 61
62extern const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst;
63#define imx25_add_mx2_camera(pdata) \
64 imx_add_mx2_camera(&imx25_mx2_camera_data, pdata)
65
62extern const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst; 66extern const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst;
63#define imx25_add_mxc_ehci_otg(pdata) \ 67#define imx25_add_mxc_ehci_otg(pdata) \
64 imx_add_mxc_ehci(&imx25_mxc_ehci_otg_data, pdata) 68 imx_add_mxc_ehci(&imx25_mxc_ehci_otg_data, pdata)
diff --git a/arch/arm/mach-mx25/devices.c b/arch/arm/mach-mx25/devices.c
deleted file mode 100644
index 12f31ef43e9f..000000000000
--- a/arch/arm/mach-mx25/devices.c
+++ /dev/null
@@ -1,45 +0,0 @@
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
25static struct resource mx25_csi_resources[] = {
26 {
27 .start = MX25_CSI_BASE_ADDR,
28 .end = MX25_CSI_BASE_ADDR + 0xfff,
29 .flags = IORESOURCE_MEM,
30 },
31 {
32 .start = MX25_INT_CSI,
33 .flags = IORESOURCE_IRQ
34 },
35};
36
37struct platform_device mx25_csi_device = {
38 .name = "mx2-camera",
39 .id = 0,
40 .num_resources = ARRAY_SIZE(mx25_csi_resources),
41 .resource = mx25_csi_resources,
42 .dev = {
43 .coherent_dma_mask = 0xffffffff,
44 },
45};
diff --git a/arch/arm/mach-mx25/devices.h b/arch/arm/mach-mx25/devices.h
index fbb75ff5de73..e69de29bb2d1 100644
--- a/arch/arm/mach-mx25/devices.h
+++ b/arch/arm/mach-mx25/devices.h
@@ -1 +0,0 @@
1extern struct platform_device mx25_csi_device;