Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
platform-imx-fb.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 <linux/dma-mapping.h>
10 #include <mach/hardware.h>
11 #include <mach/devices-common.h>
12 
13 #define imx_imx_fb_data_entry_single(soc, _size) \
14  { \
15  .iobase = soc ## _LCDC_BASE_ADDR, \
16  .iosize = _size, \
17  .irq = soc ## _INT_LCDC, \
18  }
19 
20 #ifdef CONFIG_SOC_IMX1
23 #endif /* ifdef CONFIG_SOC_IMX1 */
24 
25 #ifdef CONFIG_SOC_IMX21
26 const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
28 #endif /* ifdef CONFIG_SOC_IMX21 */
29 
30 #ifdef CONFIG_SOC_IMX25
31 const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
33 #endif /* ifdef CONFIG_SOC_IMX25 */
34 
35 #ifdef CONFIG_SOC_IMX27
36 const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
38 #endif /* ifdef CONFIG_SOC_IMX27 */
39 
41  const struct imx_imx_fb_data *data,
42  const struct imx_fb_platform_data *pdata)
43 {
44  struct resource res[] = {
45  {
46  .start = data->iobase,
47  .end = data->iobase + data->iosize - 1,
48  .flags = IORESOURCE_MEM,
49  }, {
50  .start = data->irq,
51  .end = data->irq,
52  .flags = IORESOURCE_IRQ,
53  },
54  };
55  return imx_add_platform_device_dmamask("imx-fb", 0,
56  res, ARRAY_SIZE(res),
57  pdata, sizeof(*pdata), DMA_BIT_MASK(32));
58 }