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 <linux/dma-mapping.h>
10
#include <mach/hardware.h>
11
#include <mach/devices-common.h>
13
#define imx_imx_fb_data_entry_single(soc, _size) \
15
.iobase = soc ## _LCDC_BASE_ADDR, \
17
.irq = soc ## _INT_LCDC, \
20
#ifdef CONFIG_SOC_IMX1
21
const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
22
imx_imx_fb_data_entry_single(MX1, SZ_4K);
23
#endif /* ifdef CONFIG_SOC_IMX1 */
25
#ifdef CONFIG_SOC_IMX21
26
const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
27
imx_imx_fb_data_entry_single(MX21, SZ_4K);
28
#endif /* ifdef CONFIG_SOC_IMX21 */
30
#ifdef CONFIG_SOC_IMX25
31
const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
32
imx_imx_fb_data_entry_single(MX25, SZ_16K);
33
#endif /* ifdef CONFIG_SOC_IMX25 */
35
#ifdef CONFIG_SOC_IMX27
36
const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
37
imx_imx_fb_data_entry_single(MX27, SZ_4K);
38
#endif /* ifdef CONFIG_SOC_IMX27 */
40
struct platform_device *__init imx_add_imx_fb(
41
const struct imx_imx_fb_data *data,
42
const struct imx_fb_platform_data *pdata)
44
struct resource res[] = {
46
.start = data->iobase,
47
.end = data->iobase + data->iosize - 1,
48
.flags = IORESOURCE_MEM,
52
.flags = IORESOURCE_IRQ,
55
return imx_add_platform_device_dmamask("imx-fb", 0,
57
pdata, sizeof(*pdata), DMA_BIT_MASK(32));