summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorWengang Wu <wgw@motorola.com>2014-02-28 15:53:58 -0600
committerJames Wylder <jwylder@motorola.com>2014-03-05 17:47:30 -0600
commitee86015f25945065a190de6bf8a00ed974ad8db8 (patch)
treebbce234883f563a459dfd1f642dba39e839be3b3 /arch/arm/mach-omap2/devices.c
parent9324804a1754c81b55b24e37e87707c9151a3afb (diff)
downloadolio-linux-3.10-ee86015f25945065a190de6bf8a00ed974ad8db8.tar.xz
olio-linux-3.10-ee86015f25945065a190de6bf8a00ed974ad8db8.zip
IKXCLOCK-343 Initial TI SGX Android OpenGL support
Added Makefile/Kconfig for kernel build-in driver Added OMAP3630 support for TI SGX DDK Fixed issue about newer kernel 3.10 Change-Id: I8b415bacb784e9dfb1967f669476d6d63898f331
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 4269fc14569..9017d5ea9f3 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -633,6 +633,32 @@ static void __init omap_init_ocp2scp(void)
static inline void omap_init_ocp2scp(void) { }
#endif
+#if defined(CONFIG_SGX_OMAP3630)
+static struct platform_device mapphone_omaplfb_device = {
+ .name = "omaplfb",
+ .id = -1,
+};
+static void __init omap_init_gpu(void)
+{
+ struct omap_hwmod *oh;
+ struct platform_device *pdev;
+ const char *oh_name = "gpu";
+ const char *name = "pvrsrvkm";
+ oh = omap_hwmod_lookup(oh_name);
+ if (!oh) {
+ pr_err("%s: Could not look up %s\n", __func__, oh_name);
+ return;
+ }
+
+ pdev = omap_device_build(name, -1, oh, NULL, 0);
+ WARN(IS_ERR(pdev),
+ "%s, Can't build omap_device for %s\n", __func__, name);
+ if (platform_device_register(&mapphone_omaplfb_device) < 0)
+ pr_err("%s: Could not register OMAP-LFB device\n", __func__);
+}
+#else
+static inline void omap_init_gpu(void) { }
+#endif
/*-------------------------------------------------------------------------*/
static int __init omap2_init_devices(void)
@@ -662,6 +688,7 @@ static int __init omap2_init_devices(void)
omap_init_rng();
omap_init_vout();
omap_init_ocp2scp();
+ omap_init_gpu();
return 0;
}