ARM: imx: remove unnecessary inclusion from device-imx*.h
[deliverable/linux.git] / arch / arm / plat-mxc / devices / platform-imx-fb.c
CommitLineData
ad851bff
UKK
1/*
2 * Copyright (C) 2010 Pengutronix
3 * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
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 */
b7f080cf 9#include <linux/dma-mapping.h>
ad851bff
UKK
10#include <mach/hardware.h>
11#include <mach/devices-common.h>
12
194ee8e8 13#define imx_imx_fb_data_entry_single(soc, _size) \
ad851bff
UKK
14 { \
15 .iobase = soc ## _LCDC_BASE_ADDR, \
194ee8e8 16 .iosize = _size, \
ad851bff
UKK
17 .irq = soc ## _INT_LCDC, \
18 }
19
9685a360
GGM
20#ifdef CONFIG_SOC_IMX1
21const 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 */
24
ad851bff
UKK
25#ifdef CONFIG_SOC_IMX21
26const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
194ee8e8 27 imx_imx_fb_data_entry_single(MX21, SZ_4K);
ad851bff
UKK
28#endif /* ifdef CONFIG_SOC_IMX21 */
29
972cc482 30#ifdef CONFIG_SOC_IMX25
194ee8e8
UKK
31const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
32 imx_imx_fb_data_entry_single(MX25, SZ_16K);
972cc482 33#endif /* ifdef CONFIG_SOC_IMX25 */
194ee8e8 34
ad851bff
UKK
35#ifdef CONFIG_SOC_IMX27
36const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
194ee8e8 37 imx_imx_fb_data_entry_single(MX27, SZ_4K);
ad851bff
UKK
38#endif /* ifdef CONFIG_SOC_IMX27 */
39
40struct platform_device *__init imx_add_imx_fb(
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,
194ee8e8 47 .end = data->iobase + data->iosize - 1,
ad851bff
UKK
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}
This page took 0.120713 seconds and 5 git commands to generate.