summaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@digia.com>2014-09-23 13:49:16 +0300
committerSamuli Piippo <samuli.piippo@digia.com>2014-09-25 15:22:02 +0300
commit841eaa73863184bba6c805fc622e242f367609f7 (patch)
tree6fb7536457b0b98f14ef71fedc50570bb781ae81 /recipes
parentc756f993eb26dbcf306e23cedecf378b3c5f0bec (diff)
downloadmeta-boot2qt-841eaa73863184bba6c805fc622e242f367609f7.tar.gz
Remove extra patches
These got in by mistake and are not needed. Change-Id: I91d31c42aa4034689a71b0c800ccaa3365389cf6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch34
-rw-r--r--recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch196
2 files changed, 0 insertions, 230 deletions
diff --git a/recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch b/recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch
deleted file mode 100644
index 97ce000..0000000
--- a/recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 1400fbf3e8e02eb1efd210a892a0d602061c7ca8 Mon Sep 17 00:00:00 2001
2From: Prathap M S <msprathap@ti.com>
3Date: Mon, 2 Sep 2013 11:42:13 +0530
4Subject: [PATCH 1/3] AM335x : Adding SGX DT node
5
6This adds the SGX DT node for AM335x.
7
8Signed-off-by: Prathap M S <msprathap@ti.com>
9---
10 arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++
11 1 files changed, 8 insertions(+), 0 deletions(-)
12
13diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
14index 17e0da8..74c6e41 100644
15--- a/arch/arm/boot/dts/am33xx.dtsi
16+++ b/arch/arm/boot/dts/am33xx.dtsi
17@@ -96,6 +96,14 @@
18 reg = <0x48200000 0x1000>;
19 };
20
21+ sgx@0x56000000 {
22+ compatible = "ti,sgx";
23+ ti,hwmods = "gfx";
24+ clock-frequency = <200000000>;
25+ reg = <0x56000000 0x1000000>;
26+ interrupts = <37>;
27+ };
28+
29 edma: edma@49000000 {
30 compatible = "ti,edma3";
31 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
32--
331.7.1
34
diff --git a/recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch b/recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch
deleted file mode 100644
index 3287851..0000000
--- a/recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch
+++ /dev/null
@@ -1,196 +0,0 @@
1From 9de290880400c31b727ebc0014da7ccd67867359 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Alexander=20R=C3=B6ssler?= <mail.aroessler@gmail.com>
3Date: Fri, 1 Nov 2013 15:35:26 +0100
4Subject: [PATCH] Changes according to TI for SGX support
5
6---
7 arch/arm/mach-omap2/Makefile | 2 +-
8 arch/arm/mach-omap2/board-generic.c | 3 +++
9 arch/arm/mach-omap2/common.h | 1 +
10 arch/arm/mach-omap2/gpu.c | 47 +++++++++++++++++++++++++++++++++++++
11 drivers/video/da8xx-fb.c | 33 ++++++++++++++++++++++++++
12 include/video/da8xx-fb.h | 4 ++++
13 6 files changed, 89 insertions(+), 1 deletion(-)
14 create mode 100644 arch/arm/mach-omap2/gpu.c
15
16diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
17index afecbbc..6c253bd 100644
18--- a/arch/arm/mach-omap2/Makefile
19+++ b/arch/arm/mach-omap2/Makefile
20@@ -5,7 +5,7 @@
21 # Common support
22 obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
23 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
24- omap_device.o sram.o
25+ omap_device.o sram.o gpu.o
26
27 omap-2-3-common = irq.o
28 hwmod-common = omap_hwmod.o \
29diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
30index fac00f0..24bdc10 100644
31--- a/arch/arm/mach-omap2/board-generic.c
32+++ b/arch/arm/mach-omap2/board-generic.c
33@@ -22,6 +22,7 @@
34 #include "common.h"
35 #include "common-board-devices.h"
36 #include "dss-common.h"
37+#include "soc.h"
38
39 #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3))
40 #define intc_of_init NULL
41@@ -50,6 +51,8 @@ static void __init omap_generic_init(void)
42 omap4_panda_display_init_of();
43 else if (of_machine_is_compatible("ti,omap4-sdp"))
44 omap_4430sdp_display_init_of();
45+ if (omap3_has_sgx())
46+ omap_sgx_init_of();
47 }
48
49 #ifdef CONFIG_SOC_OMAP2420
50diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
51index f077fbd..dca5aca 100644
52--- a/arch/arm/mach-omap2/common.h
53+++ b/arch/arm/mach-omap2/common.h
54@@ -293,6 +293,7 @@ extern void omap_reserve(void);
55
56 struct omap_hwmod;
57 extern int omap_dss_reset(struct omap_hwmod *);
58+void __init omap_sgx_init_of(void);
59
60 /* SoC specific clock initializer */
61 extern int (*omap_clk_init)(void);
62diff --git a/arch/arm/mach-omap2/gpu.c b/arch/arm/mach-omap2/gpu.c
63new file mode 100644
64index 0000000..eebb1bd
65--- /dev/null
66+++ b/arch/arm/mach-omap2/gpu.c
67@@ -0,0 +1,47 @@
68+/*
69+ * Deassert reset for AM33xx graphics device(SGX) hwmod
70+ *
71+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
72+ * Prathap MS <msprathap@ti.com>
73+ *
74+ * This program is free software; you can redistribute it and/or
75+ * modify it under the terms of the GNU General Public License as
76+ * published by the Free Software Foundation version 2.
77+ *
78+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
79+ * kind, whether express or implied; without even the implied warranty
80+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81+ * GNU General Public License for more details.
82+ */
83+#include <linux/of_platform.h>
84+#include "omap_device.h"
85+
86+void __init omap_sgx_init_of(void)
87+{
88+ struct device_node *node;
89+ struct platform_device *pdev;
90+ int ret = 0;
91+ node = of_find_compatible_node(NULL, NULL, "ti,sgx");
92+ if (!node)
93+ return;
94+ pdev = of_find_device_by_node(node);
95+ if (!pdev) {
96+ pr_warn("of_find_device_by_node() failed for sgx\n");
97+ return;
98+ }
99+ ret = omap_device_deassert_hardreset(pdev, "gfx");
100+ if (ret != 0)
101+ pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n");
102+
103+ node = of_find_compatible_node(NULL, NULL, "ti,am335x-timer");
104+ if (!node)
105+ return;
106+ pdev = of_find_device_by_node(node);
107+ if (!pdev) {
108+ pr_warn("of_find_device_by_node() failed for sgx\n");
109+ return;
110+ }
111+ ret = omap_device_deassert_hardreset(pdev, "timer7");
112+ if (ret != 0)
113+ pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n");
114+}
115diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
116index 6723683..6b9720c 100644
117--- a/drivers/video/da8xx-fb.c
118+++ b/drivers/video/da8xx-fb.c
119@@ -204,6 +204,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = {
120 .accel = FB_ACCEL_NONE
121 };
122
123+static vsync_callback_t vsync_cb_handler;
124+static void *vsync_cb_arg;
125+
126 static struct fb_videomode known_lcd_panels[] = {
127 /* Sharp LCD035Q3DG01 */
128 [0] = {
129@@ -814,6 +817,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg,
130 return 0;
131 }
132
133+int register_vsync_cb(vsync_callback_t handler, void *arg, int idx)
134+{
135+ if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) {
136+ vsync_cb_arg = arg;
137+ vsync_cb_handler = handler;
138+ } else {
139+ return -EEXIST;
140+ }
141+
142+ return 0;
143+}
144+EXPORT_SYMBOL(register_vsync_cb);
145+
146+int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx)
147+{
148+ if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) {
149+ vsync_cb_handler = NULL;
150+ vsync_cb_arg = NULL;
151+ } else {
152+ return -ENXIO;
153+ }
154+
155+ return 0;
156+}
157+EXPORT_SYMBOL(unregister_vsync_cb);
158+
159 /* IRQ handler for version 2 of LCDC */
160 static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
161 {
162@@ -851,6 +880,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
163 LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG);
164 par->vsync_flag = 1;
165 wake_up_interruptible(&par->vsync_wait);
166+ if (vsync_cb_handler)
167+ vsync_cb_handler(vsync_cb_arg);
168 }
169
170 if (stat & LCD_END_OF_FRAME1) {
171@@ -926,6 +957,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
172 LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG);
173 par->vsync_flag = 1;
174 wake_up_interruptible(&par->vsync_wait);
175+ if (vsync_cb_handler)
176+ vsync_cb_handler(vsync_cb_arg);
177 }
178 }
179
180diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h
181index f888259..6b1abfd 100644
182--- a/include/video/da8xx-fb.h
183+++ b/include/video/da8xx-fb.h
184@@ -86,5 +86,9 @@ struct lcd_sync_arg {
185 /* Proprietary FB_SYNC_ flags */
186 #define FB_SYNC_CLK_INVERT 0x40000000
187
188+typedef void (*vsync_callback_t)(void *arg);
189+int register_vsync_cb(vsync_callback_t handler, void *arg, int idx);
190+int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx);
191+
192 #endif /* ifndef DA8XX_FB_H */
193
194--
1951.8.4.2
196