x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / arm / mach-imx / devices / platform-imx-fb.c
blob25a47c616b2d7c2b855eaf510b84b4d466b51d62
1 /*
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.
8 */
9 #include <linux/dma-mapping.h>
11 #include "../hardware.h"
12 #include "devices-common.h"
14 #define imx_imx_fb_data_entry_single(soc, _devid, _size) \
15 { \
16 .devid = _devid, \
17 .iobase = soc ## _LCDC_BASE_ADDR, \
18 .iosize = _size, \
19 .irq = soc ## _INT_LCDC, \
22 #ifdef CONFIG_SOC_IMX1
23 const struct imx_imx_fb_data imx1_imx_fb_data __initconst =
24 imx_imx_fb_data_entry_single(MX1, "imx1-fb", SZ_4K);
25 #endif /* ifdef CONFIG_SOC_IMX1 */
27 #ifdef CONFIG_SOC_IMX21
28 const struct imx_imx_fb_data imx21_imx_fb_data __initconst =
29 imx_imx_fb_data_entry_single(MX21, "imx21-fb", SZ_4K);
30 #endif /* ifdef CONFIG_SOC_IMX21 */
32 #ifdef CONFIG_SOC_IMX25
33 const struct imx_imx_fb_data imx25_imx_fb_data __initconst =
34 imx_imx_fb_data_entry_single(MX25, "imx21-fb", SZ_16K);
35 #endif /* ifdef CONFIG_SOC_IMX25 */
37 #ifdef CONFIG_SOC_IMX27
38 const struct imx_imx_fb_data imx27_imx_fb_data __initconst =
39 imx_imx_fb_data_entry_single(MX27, "imx21-fb", SZ_4K);
40 #endif /* ifdef CONFIG_SOC_IMX27 */
42 struct platform_device *__init imx_add_imx_fb(
43 const struct imx_imx_fb_data *data,
44 const struct imx_fb_platform_data *pdata)
46 struct resource res[] = {
48 .start = data->iobase,
49 .end = data->iobase + data->iosize - 1,
50 .flags = IORESOURCE_MEM,
51 }, {
52 .start = data->irq,
53 .end = data->irq,
54 .flags = IORESOURCE_IRQ,
57 return imx_add_platform_device_dmamask(data->devid, 0,
58 res, ARRAY_SIZE(res),
59 pdata, sizeof(*pdata), DMA_BIT_MASK(32));