ARM: imx: move debug macros to include/debug
[deliverable/linux.git] / arch / arm / mach-imx / 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 10#include <mach/hardware.h>
e0557c0d 11#include "devices-common.h"
ad851bff 12
e69dc9a9 13#define imx_imx_fb_data_entry_single(soc, _devid, _size) \
ad851bff 14 { \
e69dc9a9 15 .devid = _devid, \
ad851bff 16 .iobase = soc ## _LCDC_BASE_ADDR, \
194ee8e8 17 .iosize = _size, \
ad851bff
UKK
18 .irq = soc ## _INT_LCDC, \
19 }
20
9685a360
GGM
21#ifdef CONFIG_SOC_IMX1
22const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
e69dc9a9 23 imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K);
9685a360
GGM
24#endif /* ifdef CONFIG_SOC_IMX1 */
25
ad851bff
UKK
26#ifdef CONFIG_SOC_IMX21
27const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
e69dc9a9 28 imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
ad851bff
UKK
29#endif /* ifdef CONFIG_SOC_IMX21 */
30
972cc482 31#ifdef CONFIG_SOC_IMX25
194ee8e8 32const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
e69dc9a9 33 imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K);
972cc482 34#endif /* ifdef CONFIG_SOC_IMX25 */
194ee8e8 35
ad851bff
UKK
36#ifdef CONFIG_SOC_IMX27
37const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
e69dc9a9 38 imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K);
ad851bff
UKK
39#endif /* ifdef CONFIG_SOC_IMX27 */
40
41struct platform_device *__init imx_add_imx_fb(
42 const struct imx_imx_fb_data *data,
43 const struct imx_fb_platform_data *pdata)
44{
45 struct resource res[] = {
46 {
47 .start = data->iobase,
194ee8e8 48 .end = data->iobase + data->iosize - 1,
ad851bff
UKK
49 .flags = IORESOURCE_MEM,
50 }, {
51 .start = data->irq,
52 .end = data->irq,
53 .flags = IORESOURCE_IRQ,
54 },
55 };
56 return imx_add_platform_device_dmamask("imx-fb", 0,
57 res, ARRAY_SIZE(res),
58 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
59}
This page took 0.151648 seconds and 5 git commands to generate.