blob: 76b53f73418e695a6b0826e8ea8b4f03d8b78910 [file] [log] [blame]
Sascha Hauer2e8fd692011-01-14 15:32:49 +01001/*
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 */
Axel Linb9b65862011-06-30 21:35:03 +08008#include <linux/dma-mapping.h>
Sascha Hauer2e8fd692011-01-14 15:32:49 +01009#include <asm/sizes.h>
10#include <mach/mx23.h>
11#include <mach/mx28.h>
12#include <mach/devices-common.h>
Shawn Guoce4409b2012-06-25 19:22:09 +080013#include <linux/mxsfb.h>
Sascha Hauer2e8fd692011-01-14 15:32:49 +010014
15#ifdef CONFIG_SOC_IMX23
16struct 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
33struct 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 */