Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
[pandora-kernel.git] / arch / arm / mach-mxs / devices / platform-mxsfb.c
1 /*
2  * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License version 2 as published by the
6  * Free Software Foundation.
7  */
8 #include <linux/dma-mapping.h>
9 #include <asm/sizes.h>
10 #include <mach/mx23.h>
11 #include <mach/mx28.h>
12 #include <mach/devices-common.h>
13 #include <mach/mxsfb.h>
14
15 #ifdef CONFIG_SOC_IMX23
16 struct platform_device *__init mx23_add_mxsfb(
17                 const struct mxsfb_platform_data *pdata)
18 {
19         struct resource res[] = {
20                 {
21                         .start = MX23_LCDIF_BASE_ADDR,
22                         .end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1,
23                         .flags = IORESOURCE_MEM,
24                 },
25         };
26
27         return mxs_add_platform_device_dmamask("imx23-fb", -1,
28                         res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
29 }
30 #endif /* ifdef CONFIG_SOC_IMX23 */
31
32 #ifdef CONFIG_SOC_IMX28
33 struct platform_device *__init mx28_add_mxsfb(
34                 const struct mxsfb_platform_data *pdata)
35 {
36         struct resource res[] = {
37                 {
38                         .start = MX28_LCDIF_BASE_ADDR,
39                         .end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1,
40                         .flags = IORESOURCE_MEM,
41                 },
42         };
43
44         return mxs_add_platform_device_dmamask("imx28-fb", -1,
45                         res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
46 }
47 #endif /* ifdef CONFIG_SOC_IMX28 */