From 2395137acb37e56a85c1b78bad86a58d9c04e54d Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 23 Sep 2014 13:19:11 +0300 Subject: Move meta-beagleboard specific files to separate layer Create new layer for recipes and files that required only when meta-beagleboard layer is used. For now, the bblayers.conf template still includes the new layer as well. Change-Id: I5e50067b8b6c7d480d3808a24e8acc2ace07b04b Reviewed-by: Eirik Aavitsland --- conf/bblayers.conf.sample | 1 + meta-beagleboard-extras/conf/layer.conf | 33 ++++++ .../0001-AM335x-Adding-SGX-DT-node.patch | 34 ++++++ ...ke-hwmod-deassert-for-SGX-graphics-device.patch | 121 +++++++++++++++++++++ ...-fb-Add-API-to-register-wait-for-vsync-ca.patch | 97 +++++++++++++++++ .../recipes/linux/linux-mainline_3.8.bbappend | 8 ++ .../recipes/u-boot/u-boot-uenv-script.bb | 49 +++++++++ .../recipes/u-boot/u-boot-uenv-script/uEnv.txt | 1 + .../0001-AM335x-Adding-SGX-DT-node.patch | 34 ------ ...ke-hwmod-deassert-for-SGX-graphics-device.patch | 121 --------------------- ...-fb-Add-API-to-register-wait-for-vsync-ca.patch | 97 ----------------- recipes/linux/linux-mainline_3.8.bbappend | 8 -- recipes/u-boot/u-boot-uenv-script.bb | 49 --------- recipes/u-boot/u-boot-uenv-script/uEnv.txt | 1 - 14 files changed, 344 insertions(+), 310 deletions(-) create mode 100644 meta-beagleboard-extras/conf/layer.conf create mode 100755 meta-beagleboard-extras/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch create mode 100755 meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch create mode 100755 meta-beagleboard-extras/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch create mode 100644 meta-beagleboard-extras/recipes/linux/linux-mainline_3.8.bbappend create mode 100644 meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script.bb create mode 100644 meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script/uEnv.txt delete mode 100755 recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch delete mode 100755 recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch delete mode 100755 recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch delete mode 100644 recipes/linux/linux-mainline_3.8.bbappend delete mode 100644 recipes/u-boot/u-boot-uenv-script.bb delete mode 100644 recipes/u-boot/u-boot-uenv-script/uEnv.txt diff --git a/conf/bblayers.conf.sample b/conf/bblayers.conf.sample index 9d5c3e5..2a6e8aa 100644 --- a/conf/bblayers.conf.sample +++ b/conf/bblayers.conf.sample @@ -40,6 +40,7 @@ BBLAYERS ?= " \ ##COREBASE##/meta-b2qt \ ##COREBASE##/meta-b2qt/meta-ti-extras \ ##COREBASE##/meta-b2qt/meta-fsl-extras \ + ##COREBASE##/meta-b2qt/meta-beagleboard-extras \ " BBLAYERS_NON_REMOVABLE ?= " \ ##COREBASE##/meta \ diff --git a/meta-beagleboard-extras/conf/layer.conf b/meta-beagleboard-extras/conf/layer.conf new file mode 100644 index 0000000..9cdf5ac --- /dev/null +++ b/meta-beagleboard-extras/conf/layer.conf @@ -0,0 +1,33 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://qt.digia.com/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb \ + ${LAYERDIR}/recipes*/*/*.bbappend \ + " + +BBFILE_COLLECTIONS += "b2qt_bb" +BBFILE_PATTERN_b2qt_bb := "^${LAYERDIR}/" +BBFILE_PRIORITY_b2qt_bb = "20" diff --git a/meta-beagleboard-extras/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch b/meta-beagleboard-extras/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch new file mode 100755 index 0000000..97ce000 --- /dev/null +++ b/meta-beagleboard-extras/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch @@ -0,0 +1,34 @@ +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/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 new file mode 100755 index 0000000..05672d3 --- /dev/null +++ b/meta-beagleboard-extras/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch @@ -0,0 +1,121 @@ +From 4179cd27a2caa23688646e043e2872e89c9a7bc7 Mon Sep 17 00:00:00 2001 +From: Prathap M S +Date: Mon, 2 Sep 2013 11:52:03 +0530 +Subject: [PATCH 2/3] AM33XX : Invoke hwmod deassert for SGX(graphics device) + +By default reset is asserted for SGX. +Adding gpu.c file introducing omap_sgx_init_of() for deasserting SGX reset. +This calls omap_device_deassert_hardreset() for deasserting the reset for SGX. + +Signed-off-by: Prathap M S +--- + arch/arm/mach-omap2/Makefile | 2 +- + arch/arm/mach-omap2/board-generic.c | 4 +++ + arch/arm/mach-omap2/common.h | 1 + + arch/arm/mach-omap2/gpu.c | 48 +++++++++++++++++++++++++++++++++++ + 4 files changed, 54 insertions(+), 1 deletions(-) + create mode 100644 arch/arm/mach-omap2/gpu.c + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index d4f6715..b65cc56 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -8,7 +8,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ + # 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 omap_hwmod_reset.o \ +diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c +index be5d005..e2b3981 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 +50,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 dfcc182..7d2f04e 100644 +--- a/arch/arm/mach-omap2/common.h ++++ b/arch/arm/mach-omap2/common.h +@@ -296,6 +296,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..98a66cf +--- /dev/null ++++ b/arch/arm/mach-omap2/gpu.c +@@ -0,0 +1,48 @@ ++/* ++ * 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"); ++} ++ +-- +1.7.1 + diff --git a/meta-beagleboard-extras/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch b/meta-beagleboard-extras/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch new file mode 100755 index 0000000..c425982 --- /dev/null +++ b/meta-beagleboard-extras/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch @@ -0,0 +1,97 @@ +From 0f4e7d4b7d7314b38a9fd3497d7d4e0c36d19bff Mon Sep 17 00:00:00 2001 +From: Prathap M S +Date: Mon, 2 Sep 2013 12:05:23 +0530 +Subject: [PATCH 3/3] video: da8xx-fb: Add API to register wait for vsync callback + +This patch adds APIs to register and unregister wait for vsync callback. +This is derived from commit id 2d44302545da24fd22912d964102bc31a7489e97 +This commit id was part of 3.2 kernel sources. + +Signed-off-by: Prathap M S +--- + drivers/video/da8xx-fb.c | 33 +++++++++++++++++++++++++++++++++ + include/video/da8xx-fb.h | 4 ++++ + 2 files changed, 37 insertions(+), 0 deletions(-) + +diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c +index 131cf4c..ef06b85 100644 +--- a/drivers/video/da8xx-fb.c ++++ b/drivers/video/da8xx-fb.c +@@ -199,6 +199,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] = { +@@ -806,6 +809,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) + { +@@ -843,6 +872,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) { +@@ -918,6 +949,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 efed3c3..a6cc484 100644 +--- a/include/video/da8xx-fb.h ++++ b/include/video/da8xx-fb.h +@@ -91,5 +91,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.7.1 + diff --git a/meta-beagleboard-extras/recipes/linux/linux-mainline_3.8.bbappend b/meta-beagleboard-extras/recipes/linux/linux-mainline_3.8.bbappend new file mode 100644 index 0000000..e5518bc --- /dev/null +++ b/meta-beagleboard-extras/recipes/linux/linux-mainline_3.8.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += "\ + file://0001-AM335x-Adding-SGX-DT-node.patch \ + file://0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch \ + file://0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch \ + " + +INSANE_SKIP_${PN} = "installed-vs-shipped" diff --git a/meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script.bb b/meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script.bb new file mode 100644 index 0000000..b15dd1f --- /dev/null +++ b/meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script.bb @@ -0,0 +1,49 @@ +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://qt.digia.com/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +DESCRIPTION = "U-Boot script to start up BeagleBone Black" +LICENSE = "CLOSED" +PR = "r0" + +COMPATIBLE_MACHINE = "(beaglebone)" +PV = "20140225" + +SRC_URI = "file://uEnv.txt" + +inherit deploy + +do_deploy () { + install -d ${DEPLOYDIR} + install ${WORKDIR}/uEnv.txt ${DEPLOYDIR}/uEnv-${MACHINE}-${PV}-${PR}.txt + + cd ${DEPLOYDIR} + rm -f uEnv-${MACHINE}.txt + ln -sf uEnv-${MACHINE}-${PV}-${PR}.txt uEnv-${MACHINE}.txt +} + +addtask deploy after do_install before do_build + +do_compile[noexec] = "1" +do_install[noexec] = "1" +do_populate_sysroot[noexec] = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script/uEnv.txt b/meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script/uEnv.txt new file mode 100644 index 0000000..6b23df1 --- /dev/null +++ b/meta-beagleboard-extras/recipes/u-boot/u-boot-uenv-script/uEnv.txt @@ -0,0 +1 @@ +optargs=consoleblank=0 vt.global_cursor_default=0 quiet diff --git a/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch b/recipes/linux/linux-mainline/0001-AM335x-Adding-SGX-DT-node.patch deleted file mode 100755 index 97ce000..0000000 --- a/recipes/linux/linux-mainline/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/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch b/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch deleted file mode 100755 index 05672d3..0000000 --- a/recipes/linux/linux-mainline/0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch +++ /dev/null @@ -1,121 +0,0 @@ -From 4179cd27a2caa23688646e043e2872e89c9a7bc7 Mon Sep 17 00:00:00 2001 -From: Prathap M S -Date: Mon, 2 Sep 2013 11:52:03 +0530 -Subject: [PATCH 2/3] AM33XX : Invoke hwmod deassert for SGX(graphics device) - -By default reset is asserted for SGX. -Adding gpu.c file introducing omap_sgx_init_of() for deasserting SGX reset. -This calls omap_device_deassert_hardreset() for deasserting the reset for SGX. - -Signed-off-by: Prathap M S ---- - arch/arm/mach-omap2/Makefile | 2 +- - arch/arm/mach-omap2/board-generic.c | 4 +++ - arch/arm/mach-omap2/common.h | 1 + - arch/arm/mach-omap2/gpu.c | 48 +++++++++++++++++++++++++++++++++++ - 4 files changed, 54 insertions(+), 1 deletions(-) - create mode 100644 arch/arm/mach-omap2/gpu.c - -diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile -index d4f6715..b65cc56 100644 ---- a/arch/arm/mach-omap2/Makefile -+++ b/arch/arm/mach-omap2/Makefile -@@ -8,7 +8,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ - # 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 omap_hwmod_reset.o \ -diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c -index be5d005..e2b3981 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 +50,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 dfcc182..7d2f04e 100644 ---- a/arch/arm/mach-omap2/common.h -+++ b/arch/arm/mach-omap2/common.h -@@ -296,6 +296,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..98a66cf ---- /dev/null -+++ b/arch/arm/mach-omap2/gpu.c -@@ -0,0 +1,48 @@ -+/* -+ * 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"); -+} -+ --- -1.7.1 - diff --git a/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch b/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch deleted file mode 100755 index c425982..0000000 --- a/recipes/linux/linux-mainline/0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 0f4e7d4b7d7314b38a9fd3497d7d4e0c36d19bff Mon Sep 17 00:00:00 2001 -From: Prathap M S -Date: Mon, 2 Sep 2013 12:05:23 +0530 -Subject: [PATCH 3/3] video: da8xx-fb: Add API to register wait for vsync callback - -This patch adds APIs to register and unregister wait for vsync callback. -This is derived from commit id 2d44302545da24fd22912d964102bc31a7489e97 -This commit id was part of 3.2 kernel sources. - -Signed-off-by: Prathap M S ---- - drivers/video/da8xx-fb.c | 33 +++++++++++++++++++++++++++++++++ - include/video/da8xx-fb.h | 4 ++++ - 2 files changed, 37 insertions(+), 0 deletions(-) - -diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c -index 131cf4c..ef06b85 100644 ---- a/drivers/video/da8xx-fb.c -+++ b/drivers/video/da8xx-fb.c -@@ -199,6 +199,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] = { -@@ -806,6 +809,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) - { -@@ -843,6 +872,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) { -@@ -918,6 +949,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 efed3c3..a6cc484 100644 ---- a/include/video/da8xx-fb.h -+++ b/include/video/da8xx-fb.h -@@ -91,5 +91,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.7.1 - diff --git a/recipes/linux/linux-mainline_3.8.bbappend b/recipes/linux/linux-mainline_3.8.bbappend deleted file mode 100644 index e5518bc..0000000 --- a/recipes/linux/linux-mainline_3.8.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI += "\ - file://0001-AM335x-Adding-SGX-DT-node.patch \ - file://0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch \ - file://0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch \ - " - -INSANE_SKIP_${PN} = "installed-vs-shipped" diff --git a/recipes/u-boot/u-boot-uenv-script.bb b/recipes/u-boot/u-boot-uenv-script.bb deleted file mode 100644 index b15dd1f..0000000 --- a/recipes/u-boot/u-boot-uenv-script.bb +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################# -## -## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -## -## This file is part of the Qt Enterprise Embedded Scripts of the Qt -## framework. -## -## $QT_BEGIN_LICENSE$ -## Commercial License Usage Only -## Licensees holding valid commercial Qt license agreements with Digia -## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, -## may use this file in accordance with the terms contained in said license -## agreement. -## -## For further information use the contact form at -## http://qt.digia.com/contact-us. -## -## -## $QT_END_LICENSE$ -## -############################################################################# - -DESCRIPTION = "U-Boot script to start up BeagleBone Black" -LICENSE = "CLOSED" -PR = "r0" - -COMPATIBLE_MACHINE = "(beaglebone)" -PV = "20140225" - -SRC_URI = "file://uEnv.txt" - -inherit deploy - -do_deploy () { - install -d ${DEPLOYDIR} - install ${WORKDIR}/uEnv.txt ${DEPLOYDIR}/uEnv-${MACHINE}-${PV}-${PR}.txt - - cd ${DEPLOYDIR} - rm -f uEnv-${MACHINE}.txt - ln -sf uEnv-${MACHINE}-${PV}-${PR}.txt uEnv-${MACHINE}.txt -} - -addtask deploy after do_install before do_build - -do_compile[noexec] = "1" -do_install[noexec] = "1" -do_populate_sysroot[noexec] = "1" - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes/u-boot/u-boot-uenv-script/uEnv.txt b/recipes/u-boot/u-boot-uenv-script/uEnv.txt deleted file mode 100644 index 6b23df1..0000000 --- a/recipes/u-boot/u-boot-uenv-script/uEnv.txt +++ /dev/null @@ -1 +0,0 @@ -optargs=consoleblank=0 vt.global_cursor_default=0 quiet -- cgit v1.2.3-54-g00ecf