summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mxs/devices/platform-mxsfb.c
blob: 76b53f73418e695a6b0826e8ea8b4f03d8b78910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License version 2 as published by the
 * Free Software Foundation.
 */
#include <linux/dma-mapping.h>
#include <asm/sizes.h>
#include <mach/mx23.h>
#include <mach/mx28.h>
#include <mach/devices-common.h>
#include <linux/mxsfb.h>

#ifdef CONFIG_SOC_IMX23
struct platform_device *__init mx23_add_mxsfb(
		const struct mxsfb_platform_data *pdata)
{
	struct resource res[] = {
		{
			.start = MX23_LCDIF_BASE_ADDR,
			.end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1,
			.flags = IORESOURCE_MEM,
		},
	};

	return mxs_add_platform_device_dmamask("imx23-fb", -1,
			res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
}
#endif /* ifdef CONFIG_SOC_IMX23 */

#ifdef CONFIG_SOC_IMX28
struct platform_device *__init mx28_add_mxsfb(
		const struct mxsfb_platform_data *pdata)
{
	struct resource res[] = {
		{
			.start = MX28_LCDIF_BASE_ADDR,
			.end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1,
			.flags = IORESOURCE_MEM,
		},
	};

	return mxs_add_platform_device_dmamask("imx28-fb", -1,
			res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32));
}
#endif /* ifdef CONFIG_SOC_IMX28 */