blob: bf72c9b8dbdd19736b1f9090eafc479b0052bfdb [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 */
8#include <asm/sizes.h>
9#include <mach/mx23.h>
10#include <mach/mx28.h>
11#include <mach/devices-common.h>
12#include <mach/mxsfb.h>
13
14#ifdef CONFIG_SOC_IMX23
15struct platform_device *__init mx23_add_mxsfb(
16 const struct mxsfb_platform_data *pdata)
17{
18 struct resource res[] = {
19 {
20 .start = MX23_LCDIF_BASE_ADDR,
21 .end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1,
22 .flags = IORESOURCE_MEM,
23 },
24 };
25
26 return mxs_add_platform_device_dmamask("imx23-fb", -1,
27 res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
28}
29#endif /* ifdef CONFIG_SOC_IMX23 */
30
31#ifdef CONFIG_SOC_IMX28
32struct platform_device *__init mx28_add_mxsfb(
33 const struct mxsfb_platform_data *pdata)
34{
35 struct resource res[] = {
36 {
37 .start = MX28_LCDIF_BASE_ADDR,
38 .end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1,
39 .flags = IORESOURCE_MEM,
40 },
41 };
42
43 return mxs_add_platform_device_dmamask("imx28-fb", -1,
44 res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
45}
46#endif /* ifdef CONFIG_SOC_IMX28 */