Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
platform-mx1-camera.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 Pengutronix
3  * Uwe Kleine-Koenig <[email protected]>
4  *
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>
11 
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, \
17  }
18 
19 #ifdef CONFIG_SOC_IMX1
20 const struct imx_mx1_camera_data imx1_mx1_camera_data __initconst =
22 #endif /* ifdef CONFIG_SOC_IMX1 */
23 
25  const struct imx_mx1_camera_data *data,
26  const struct mx1_camera_pdata *pdata)
27 {
28  struct resource res[] = {
29  {
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,
37  },
38  };
39  return imx_add_platform_device_dmamask("mx1-camera", 0,
40  res, ARRAY_SIZE(res),
41  pdata, sizeof(*pdata), DMA_BIT_MASK(32));
42 }