summaryrefslogtreecommitdiffstats
path: root/meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch')
-rwxr-xr-xmeta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch121
1 files changed, 0 insertions, 121 deletions
diff --git a/meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch b/meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch
deleted file mode 100755
index 05672d3..0000000
--- a/meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch
+++ /dev/null
@@ -1,121 +0,0 @@
1From 4179cd27a2caa23688646e043e2872e89c9a7bc7 Mon Sep 17 00:00:00 2001
2From: Prathap M S <msprathap@ti.com>
3Date: Mon, 2 Sep 2013 11:52:03 +0530
4Subject: [PATCH 2/3] AM33XX : Invoke hwmod deassert for SGX(graphics device)
5
6By default reset is asserted for SGX.
7Adding gpu.c file introducing omap_sgx_init_of() for deasserting SGX reset.
8This calls omap_device_deassert_hardreset() for deasserting the reset for SGX.
9
10Signed-off-by: Prathap M S <msprathap@ti.com>
11---
12 arch/arm/mach-omap2/Makefile | 2 +-
13 arch/arm/mach-omap2/board-generic.c | 4 +++
14 arch/arm/mach-omap2/common.h | 1 +
15 arch/arm/mach-omap2/gpu.c | 48 +++++++++++++++++++++++++++++++++++
16 4 files changed, 54 insertions(+), 1 deletions(-)
17 create mode 100644 arch/arm/mach-omap2/gpu.c
18
19diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
20index d4f6715..b65cc56 100644
21--- a/arch/arm/mach-omap2/Makefile
22+++ b/arch/arm/mach-omap2/Makefile
23@@ -8,7 +8,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
24 # Common support
25 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
26 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
27- omap_device.o sram.o
28+ omap_device.o sram.o gpu.o
29
30 omap-2-3-common = irq.o
31 hwmod-common = omap_hwmod.o omap_hwmod_reset.o \
32diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
33index be5d005..e2b3981 100644
34--- a/arch/arm/mach-omap2/board-generic.c
35+++ b/arch/arm/mach-omap2/board-generic.c
36@@ -22,6 +22,7 @@
37 #include "common.h"
38 #include "common-board-devices.h"
39 #include "dss-common.h"
40+#include "soc.h"
41
42 #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
43 #define intc_of_init NULL
44@@ -50,6 +50,8 @@ static void __init omap_generic_init(void)
45 omap4_panda_display_init_of();
46 else if (of_machine_is_compatible("ti,omap4-sdp"))
47 omap_4430sdp_display_init_of();
48+ if (omap3_has_sgx())
49+ omap_sgx_init_of();
50 }
51
52 #ifdef CONFIG_SOC_OMAP2420
53diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
54index dfcc182..7d2f04e 100644
55--- a/arch/arm/mach-omap2/common.h
56+++ b/arch/arm/mach-omap2/common.h
57@@ -296,6 +296,7 @@ extern void omap_reserve(void);
58
59 struct omap_hwmod;
60 extern int omap_dss_reset(struct omap_hwmod *);
61+void __init omap_sgx_init_of(void);
62
63 /* SoC specific clock initializer */
64 extern int (*omap_clk_init)(void);
65diff --git a/arch/arm/mach-omap2/gpu.c b/arch/arm/mach-omap2/gpu.c
66new file mode 100644
67index 0000000..98a66cf
68--- /dev/null
69+++ b/arch/arm/mach-omap2/gpu.c
70@@ -0,0 +1,48 @@
71+/*
72+ * Deassert reset for AM33xx graphics device(SGX) hwmod
73+ *
74+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
75+ * Prathap MS <msprathap@ti.com>
76+ *
77+ * This program is free software; you can redistribute it and/or
78+ * modify it under the terms of the GNU General Public License as
79+ * published by the Free Software Foundation version 2.
80+ *
81+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
82+ * kind, whether express or implied; without even the implied warranty
83+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84+ * GNU General Public License for more details.
85+ */
86+#include <linux/of_platform.h>
87+#include "omap_device.h"
88+
89+void __init omap_sgx_init_of(void)
90+{
91+ struct device_node *node;
92+ struct platform_device *pdev;
93+ int ret = 0;
94+ node = of_find_compatible_node(NULL, NULL, "ti,sgx");
95+ if (!node)
96+ return;
97+ pdev = of_find_device_by_node(node);
98+ if (!pdev) {
99+ pr_warn("of_find_device_by_node() failed for sgx\n");
100+ return;
101+ }
102+ ret = omap_device_deassert_hardreset(pdev, "gfx");
103+ if (ret != 0)
104+ pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n");
105+
106+ node = of_find_compatible_node(NULL, NULL, "ti,am335x-timer");
107+ if (!node)
108+ return;
109+ pdev = of_find_device_by_node(node);
110+ if (!pdev) {
111+ pr_warn("of_find_device_by_node() failed for sgx\n");
112+ return;
113+ }
114+ ret = omap_device_deassert_hardreset(pdev, "timer7");
115+ if (ret != 0)
116+ pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n");
117+}
118+
119--
1201.7.1
121