summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2011-09-01 08:09:22 +0100
committerAndy Green <andy.green@linaro.org>2011-09-01 08:09:22 +0100
commitd164b1df919634855dc36b09ecf2e5e53cccd9af (patch)
tree524dc07f51a4065e02fa18ea967adbe42f890603
parentb92253bd99ed8e56033808b7031fc0973dea709f (diff)
omap2+: add drm device
Register drm platform device, and a platform device for pvr module in case it is loaded.. Maybe this should be added to a new file?
-rw-r--r--arch/arm/plat-omap/fb.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index c9e5d7298c4..b0dcd20b118 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -419,3 +419,34 @@ unsigned long __init omapfb_reserve_sram(unsigned long sram_pstart,
}
#endif
+
+/* DRM/GPU stuff should maybe move to different file? */
+
+#include <linux/omap_drm.h>
+
+#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)
+
+static struct platform_device omap_drm_device = {
+ .name = "omapdrm",
+ .id = 0,
+};
+
+static int __init omap_init_gpu(void)
+{
+ return platform_device_register(&omap_drm_device);
+}
+
+arch_initcall(omap_init_gpu);
+
+void omapdrm_set_platform_data(struct omap_drm_platform_data *data)
+{
+ omap_drm_device.dev.platform_data = data;
+}
+
+#else
+
+void omapdrm_set_platform_data(struct omap_drm_platform_data *data)
+{
+}
+
+#endif