Commit | Line | Data |
---|---|---|
e2fb5052 AG |
1 | /* |
2 | * DRM/KMS device registration for TI OMAP platforms | |
3 | * | |
4 | * Copyright (C) 2012 Texas Instruments | |
5 | * Author: Rob Clark <rob.clark@linaro.org> | |
6 | * | |
7 | * This program is free software; you can redistribute it and/or modify it | |
8 | * under the terms of the GNU General Public License version 2 as published by | |
9 | * the Free Software Foundation. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
14 | * more details. | |
15 | * | |
16 | * You should have received a copy of the GNU General Public License along with | |
17 | * this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | */ | |
19 | ||
20 | #include <linux/module.h> | |
21 | #include <linux/kernel.h> | |
22 | #include <linux/mm.h> | |
23 | #include <linux/init.h> | |
24 | #include <linux/platform_device.h> | |
25 | #include <linux/dma-mapping.h> | |
5e3b0874 | 26 | #include <linux/platform_data/omap_drm.h> |
e2fb5052 | 27 | |
81f3ae06 | 28 | #include "soc.h" |
e2fb5052 AG |
29 | |
30 | #if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) | |
31 | ||
5e3b0874 RC |
32 | static struct omap_drm_platform_data platform_data; |
33 | ||
e2fb5052 AG |
34 | static struct platform_device omap_drm_device = { |
35 | .dev = { | |
36 | .coherent_dma_mask = DMA_BIT_MASK(32), | |
5e3b0874 | 37 | .platform_data = &platform_data, |
e2fb5052 AG |
38 | }, |
39 | .name = "omapdrm", | |
40 | .id = 0, | |
41 | }; | |
42 | ||
43 | static int __init omap_init_drm(void) | |
44 | { | |
81f3ae06 | 45 | platform_data.omaprev = GET_OMAP_TYPE; |
5e3b0874 | 46 | |
e2fb5052 AG |
47 | return platform_device_register(&omap_drm_device); |
48 | ||
49 | } | |
50 | ||
b76c8b19 | 51 | omap_arch_initcall(omap_init_drm); |
e2fb5052 AG |
52 | |
53 | #endif |