From 841eaa73863184bba6c805fc622e242f367609f7 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 23 Sep 2014 13:49:16 +0300 Subject: Remove extra patches These got in by mistake and are not needed. Change-Id: I91d31c42aa4034689a71b0c800ccaa3365389cf6 Reviewed-by: Eirik Aavitsland --- .../customer/0001-AM335x-Adding-SGX-DT-node.patch | 34 ---- .../0002-Changes-accordingtoTIforSGXsupport.patch | 196 --------------------- 2 files changed, 230 deletions(-) delete mode 100644 recipes/linux/linux-mainline/customer/0001-AM335x-Adding-SGX-DT-node.patch delete mode 100644 recipes/linux/linux-mainline/customer/0002-Changes-accordingtoTIforSGXsupport.patch 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 @@ -From 1400fbf3e8e02eb1efd210a892a0d602061c7ca8 Mon Sep 17 00:00:00 2001 -From: Prathap M S -Date: Mon, 2 Sep 2013 11:42:13 +0530 -Subject: [PATCH 1/3] AM335x : Adding SGX DT node - -This adds the SGX DT node for AM335x. - -Signed-off-by: Prathap M S ---- - arch/arm/boot/dts/am33xx.dtsi | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi -index 17e0da8..74c6e41 100644 ---- a/arch/arm/boot/dts/am33xx.dtsi -+++ b/arch/arm/boot/dts/am33xx.dtsi -@@ -96,6 +96,14 @@ - reg = <0x48200000 0x1000>; - }; - -+ sgx@0x56000000 { -+ compatible = "ti,sgx"; -+ ti,hwmods = "gfx"; -+ clock-frequency = <200000000>; -+ reg = <0x56000000 0x1000000>; -+ interrupts = <37>; -+ }; -+ - edma: edma@49000000 { - compatible = "ti,edma3"; - ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; --- -1.7.1 - 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 @@ -From 9de290880400c31b727ebc0014da7ccd67867359 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Alexander=20R=C3=B6ssler?= -Date: Fri, 1 Nov 2013 15:35:26 +0100 -Subject: [PATCH] Changes according to TI for SGX support - ---- - arch/arm/mach-omap2/Makefile | 2 +- - arch/arm/mach-omap2/board-generic.c | 3 +++ - arch/arm/mach-omap2/common.h | 1 + - arch/arm/mach-omap2/gpu.c | 47 +++++++++++++++++++++++++++++++++++++ - drivers/video/da8xx-fb.c | 33 ++++++++++++++++++++++++++ - include/video/da8xx-fb.h | 4 ++++ - 6 files changed, 89 insertions(+), 1 deletion(-) - create mode 100644 arch/arm/mach-omap2/gpu.c - -diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile -index afecbbc..6c253bd 100644 ---- a/arch/arm/mach-omap2/Makefile -+++ b/arch/arm/mach-omap2/Makefile -@@ -5,7 +5,7 @@ - # Common support - obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ - common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ -- omap_device.o sram.o -+ omap_device.o sram.o gpu.o - - omap-2-3-common = irq.o - hwmod-common = omap_hwmod.o \ -diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c -index fac00f0..24bdc10 100644 ---- a/arch/arm/mach-omap2/board-generic.c -+++ b/arch/arm/mach-omap2/board-generic.c -@@ -22,6 +22,7 @@ - #include "common.h" - #include "common-board-devices.h" - #include "dss-common.h" -+#include "soc.h" - - #if !(defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)) - #define intc_of_init NULL -@@ -50,6 +51,8 @@ static void __init omap_generic_init(void) - omap4_panda_display_init_of(); - else if (of_machine_is_compatible("ti,omap4-sdp")) - omap_4430sdp_display_init_of(); -+ if (omap3_has_sgx()) -+ omap_sgx_init_of(); - } - - #ifdef CONFIG_SOC_OMAP2420 -diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h -index f077fbd..dca5aca 100644 ---- a/arch/arm/mach-omap2/common.h -+++ b/arch/arm/mach-omap2/common.h -@@ -293,6 +293,7 @@ extern void omap_reserve(void); - - struct omap_hwmod; - extern int omap_dss_reset(struct omap_hwmod *); -+void __init omap_sgx_init_of(void); - - /* SoC specific clock initializer */ - extern int (*omap_clk_init)(void); -diff --git a/arch/arm/mach-omap2/gpu.c b/arch/arm/mach-omap2/gpu.c -new file mode 100644 -index 0000000..eebb1bd ---- /dev/null -+++ b/arch/arm/mach-omap2/gpu.c -@@ -0,0 +1,47 @@ -+/* -+ * Deassert reset for AM33xx graphics device(SGX) hwmod -+ * -+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ -+ * Prathap MS -+ * -+ * 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 version 2. -+ * -+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any -+ * kind, whether express or implied; without even the implied warranty -+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ */ -+#include -+#include "omap_device.h" -+ -+void __init omap_sgx_init_of(void) -+{ -+ struct device_node *node; -+ struct platform_device *pdev; -+ int ret = 0; -+ node = of_find_compatible_node(NULL, NULL, "ti,sgx"); -+ if (!node) -+ return; -+ pdev = of_find_device_by_node(node); -+ if (!pdev) { -+ pr_warn("of_find_device_by_node() failed for sgx\n"); -+ return; -+ } -+ ret = omap_device_deassert_hardreset(pdev, "gfx"); -+ if (ret != 0) -+ pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n"); -+ -+ node = of_find_compatible_node(NULL, NULL, "ti,am335x-timer"); -+ if (!node) -+ return; -+ pdev = of_find_device_by_node(node); -+ if (!pdev) { -+ pr_warn("of_find_device_by_node() failed for sgx\n"); -+ return; -+ } -+ ret = omap_device_deassert_hardreset(pdev, "timer7"); -+ if (ret != 0) -+ pr_warn("omap_device_deassert_hardreset() failed for sgx(gfx hwmod)\n"); -+} -diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c -index 6723683..6b9720c 100644 ---- a/drivers/video/da8xx-fb.c -+++ b/drivers/video/da8xx-fb.c -@@ -204,6 +204,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = { - .accel = FB_ACCEL_NONE - }; - -+static vsync_callback_t vsync_cb_handler; -+static void *vsync_cb_arg; -+ - static struct fb_videomode known_lcd_panels[] = { - /* Sharp LCD035Q3DG01 */ - [0] = { -@@ -814,6 +817,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, - return 0; - } - -+int register_vsync_cb(vsync_callback_t handler, void *arg, int idx) -+{ -+ if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) { -+ vsync_cb_arg = arg; -+ vsync_cb_handler = handler; -+ } else { -+ return -EEXIST; -+ } -+ -+ return 0; -+} -+EXPORT_SYMBOL(register_vsync_cb); -+ -+int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx) -+{ -+ if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) { -+ vsync_cb_handler = NULL; -+ vsync_cb_arg = NULL; -+ } else { -+ return -ENXIO; -+ } -+ -+ return 0; -+} -+EXPORT_SYMBOL(unregister_vsync_cb); -+ - /* IRQ handler for version 2 of LCDC */ - static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) - { -@@ -851,6 +880,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) - LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG); - par->vsync_flag = 1; - wake_up_interruptible(&par->vsync_wait); -+ if (vsync_cb_handler) -+ vsync_cb_handler(vsync_cb_arg); - } - - if (stat & LCD_END_OF_FRAME1) { -@@ -926,6 +957,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg) - LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG); - par->vsync_flag = 1; - wake_up_interruptible(&par->vsync_wait); -+ if (vsync_cb_handler) -+ vsync_cb_handler(vsync_cb_arg); - } - } - -diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h -index f888259..6b1abfd 100644 ---- a/include/video/da8xx-fb.h -+++ b/include/video/da8xx-fb.h -@@ -86,5 +86,9 @@ struct lcd_sync_arg { - /* Proprietary FB_SYNC_ flags */ - #define FB_SYNC_CLK_INVERT 0x40000000 - -+typedef void (*vsync_callback_t)(void *arg); -+int register_vsync_cb(vsync_callback_t handler, void *arg, int idx); -+int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx); -+ - #endif /* ifndef DA8XX_FB_H */ - --- -1.8.4.2 - -- cgit v1.2.3-54-g00ecf