2 * Copyright (C) 2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 2 as published by the
7 * Free Software Foundation.
9 #include <mach/hardware.h>
10 #include <mach/devices-common.h>
12 #define imx_mx1_camera_data_entry_single(soc, _size) \
14 .iobase = soc ## _CSI ## _BASE_ADDR, \
16 .irq = soc ## _INT_CSI, \
19 #ifdef CONFIG_SOC_IMX1
20 const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst
=
21 imx_mx1_camera_data_entry_single(MX1
, 10);
22 #endif /* ifdef CONFIG_SOC_IMX1 */
24 struct platform_device
*__init
imx_add_mx1_camera(
25 const struct imx_mx1_camera_data
*data
,
26 const struct mx1_camera_pdata
*pdata
)
28 struct resource res
[] = {
30 .start
= data
->iobase
,
31 .end
= data
->iobase
+ data
->iosize
- 1,
32 .flags
= IORESOURCE_MEM
,
36 .flags
= IORESOURCE_IRQ
,
39 return imx_add_platform_device_dmamask("mx1-camera", 0,
41 pdata
, sizeof(*pdata
), DMA_BIT_MASK(32));