2 * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
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.
8 #include <linux/dma-mapping.h>
10 #include <mach/mx23.h>
11 #include <mach/mx28.h>
12 #include <mach/devices-common.h>
13 #include <mach/mxsfb.h>
15 #ifdef CONFIG_SOC_IMX23
16 struct platform_device
*__init
mx23_add_mxsfb(
17 const struct mxsfb_platform_data
*pdata
)
19 struct resource res
[] = {
21 .start
= MX23_LCDIF_BASE_ADDR
,
22 .end
= MX23_LCDIF_BASE_ADDR
+ SZ_8K
- 1,
23 .flags
= IORESOURCE_MEM
,
27 return mxs_add_platform_device_dmamask("imx23-fb", -1,
28 res
, ARRAY_SIZE(res
), pdata
, sizeof(*pdata
), DMA_BIT_MASK(32));
30 #endif /* ifdef CONFIG_SOC_IMX23 */
32 #ifdef CONFIG_SOC_IMX28
33 struct platform_device
*__init
mx28_add_mxsfb(
34 const struct mxsfb_platform_data
*pdata
)
36 struct resource res
[] = {
38 .start
= MX28_LCDIF_BASE_ADDR
,
39 .end
= MX28_LCDIF_BASE_ADDR
+ SZ_8K
- 1,
40 .flags
= IORESOURCE_MEM
,
44 return mxs_add_platform_device_dmamask("imx28-fb", -1,
45 res
, ARRAY_SIZE(res
), pdata
, sizeof(*pdata
), DMA_BIT_MASK(32));
47 #endif /* ifdef CONFIG_SOC_IMX28 */