mm: move shmem prototypes to shmem_fs.h
[linux/fpc-iii.git] / arch / arm / plat-mxc / devices / platform-mx1-camera.c
blobedcc581a30a9ea440034df1b122d2bec6aac30e9
1 /*
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.
8 */
9 #include <mach/hardware.h>
10 #include <mach/devices-common.h>
12 #define imx_mx1_camera_data_entry_single(soc, _size) \
13 { \
14 .iobase = soc ## _CSI ## _BASE_ADDR, \
15 .iosize = _size, \
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,
33 }, {
34 .start = data->irq,
35 .end = data->irq,
36 .flags = IORESOURCE_IRQ,
39 return imx_add_platform_device_dmamask("mx1-camera", 0,
40 res, ARRAY_SIZE(res),
41 pdata, sizeof(*pdata), DMA_BIT_MASK(32));