From bb4c853ff18fe3b0e2aec45053c318479e0c55e3 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 11 Nov 2010 17:11:34 +0100 Subject: ARM: mx25: dynamically allocate mx2-camera devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Uwe Kleine-König --- arch/arm/mach-mx25/Makefile | 2 +- arch/arm/mach-mx25/devices-imx25.h | 4 ++++ arch/arm/mach-mx25/devices.c | 45 -------------------------------------- arch/arm/mach-mx25/devices.h | 1 - 4 files changed, 5 insertions(+), 47 deletions(-) delete mode 100644 arch/arm/mach-mx25/devices.c (limited to 'arch/arm/mach-mx25') 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 @@ -obj-y := mm.o devices.o +obj-y := mm.o obj-$(CONFIG_ARCH_MX25) += clock.o obj-$(CONFIG_MACH_MX25_3DS) += mach-mx25_3ds.o obj-$(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; #define imx25_add_imx_uart3(pdata) imx25_add_imx_uart(3, pdata) #define imx25_add_imx_uart4(pdata) imx25_add_imx_uart(4, pdata) +extern const struct imx_mx2_camera_data imx25_mx2_camera_data __initconst; +#define imx25_add_mx2_camera(pdata) \ + imx_add_mx2_camera(&imx25_mx2_camera_data, pdata) + extern const struct imx_mxc_ehci_data imx25_mxc_ehci_otg_data __initconst; #define imx25_add_mxc_ehci_otg(pdata) \ 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 @@ -/* - * Copyright 2009 Sascha Hauer, - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include - -static struct resource mx25_csi_resources[] = { - { - .start = MX25_CSI_BASE_ADDR, - .end = MX25_CSI_BASE_ADDR + 0xfff, - .flags = IORESOURCE_MEM, - }, - { - .start = MX25_INT_CSI, - .flags = IORESOURCE_IRQ - }, -}; - -struct platform_device mx25_csi_device = { - .name = "mx2-camera", - .id = 0, - .num_resources = ARRAY_SIZE(mx25_csi_resources), - .resource = mx25_csi_resources, - .dev = { - .coherent_dma_mask = 0xffffffff, - }, -}; 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 @@ -extern struct platform_device mx25_csi_device; -- cgit v1.2.3