ARM: EXYNOS: add platform device for core DRM subsystem
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 11 May 2012 21:42:33 +0000 (06:42 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Fri, 11 May 2012 21:42:33 +0000 (06:42 +0900)
Add platform device for Exynos DRM core. This device is used
for creating DRM user-space device and allocating memory for
display buffers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-exynos/Kconfig
arch/arm/mach-exynos/Makefile
arch/arm/mach-exynos/dev-drm.c [new file with mode: 0644]
arch/arm/plat-samsung/include/plat/devs.h

index e81c35f936b595e5d332e9cdcdd1229d2ac21670..8bc89f27e9dad86a1467d167d455a162f483b91f 100644 (file)
@@ -80,6 +80,11 @@ config EXYNOS4_DEV_AHCI
        help
          Compile in platform device definitions for AHCI
 
+config EXYNOS_DEV_DRM
+       bool
+       help
+         Compile in platform device definitions for core DRM device
+
 config EXYNOS4_SETUP_FIMD0
        bool
        help
index 8631840d1b5e85ce8d959430bcdbdeadb339afbb..f67e882b9dabff8dfbf3346949edfb7c21692d53 100644 (file)
@@ -50,6 +50,7 @@ obj-$(CONFIG_MACH_EXYNOS5_DT)         += mach-exynos5-dt.o
 obj-y                                  += dev-uart.o
 obj-$(CONFIG_ARCH_EXYNOS4)             += dev-audio.o
 obj-$(CONFIG_EXYNOS4_DEV_AHCI)         += dev-ahci.o
+obj-$(CONFIG_EXYNOS_DEV_DRM)           += dev-drm.o
 obj-$(CONFIG_EXYNOS4_DEV_SYSMMU)       += dev-sysmmu.o
 obj-$(CONFIG_EXYNOS4_DEV_DWMCI)                += dev-dwmci.o
 obj-$(CONFIG_EXYNOS4_DEV_DMA)          += dma.o
diff --git a/arch/arm/mach-exynos/dev-drm.c b/arch/arm/mach-exynos/dev-drm.c
new file mode 100644 (file)
index 0000000..17c9c6e
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * linux/arch/arm/mach-exynos/dev-drm.c
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *             http://www.samsung.com
+ *
+ * EXYNOS - core DRM device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/dma-mapping.h>
+#include <linux/platform_device.h>
+
+#include <plat/devs.h>
+
+static u64 exynos_drm_dma_mask = DMA_BIT_MASK(32);
+
+struct platform_device exynos_device_drm = {
+       .name   = "exynos-drm",
+       .dev    = {
+               .dma_mask               = &exynos_drm_dma_mask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       }
+};
index 2155d4af62a30ce2d83c016e097690ba1b0ae316..62e6251e4b19839806e7af4d0073c384b1812f15 100644 (file)
@@ -135,6 +135,8 @@ extern struct platform_device exynos4_device_pd[];
 extern struct platform_device exynos4_device_spdif;
 extern struct platform_device exynos4_device_sysmmu;
 
+extern struct platform_device exynos_device_drm;
+
 extern struct platform_device samsung_asoc_dma;
 extern struct platform_device samsung_asoc_idma;
 extern struct platform_device samsung_device_keypad;