diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-23 13:19:11 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-25 15:22:32 +0300 |
commit | 2395137acb37e56a85c1b78bad86a58d9c04e54d (patch) | |
tree | 2c0fb13cd3b737607271b5bd6a14a5bdaa5108eb /meta-beagleboard-extras | |
parent | 01603689e8dd2d3c5be0f41d41b3543452903f03 (diff) | |
download | meta-boot2qt-2395137acb37e56a85c1b78bad86a58d9c04e54d.tar.gz |
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 <eirik.aavitsland@digia.com>
Diffstat (limited to 'meta-beagleboard-extras')
7 files changed, 343 insertions, 0 deletions
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 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://qt.digia.com/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | # We have a conf and classes directory, append to BBPATH | ||
24 | BBPATH .= ":${LAYERDIR}" | ||
25 | |||
26 | # We have a recipes directory, add to BBFILES | ||
27 | BBFILES += "${LAYERDIR}/recipes*/*/*.bb \ | ||
28 | ${LAYERDIR}/recipes*/*/*.bbappend \ | ||
29 | " | ||
30 | |||
31 | BBFILE_COLLECTIONS += "b2qt_bb" | ||
32 | BBFILE_PATTERN_b2qt_bb := "^${LAYERDIR}/" | ||
33 | 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 @@ | |||
1 | From 1400fbf3e8e02eb1efd210a892a0d602061c7ca8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 11:42:13 +0530 | ||
4 | Subject: [PATCH 1/3] AM335x : Adding SGX DT node | ||
5 | |||
6 | This adds the SGX DT node for AM335x. | ||
7 | |||
8 | Signed-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 | |||
13 | diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi | ||
14 | index 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 | -- | ||
33 | 1.7.1 | ||
34 | |||
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 @@ | |||
1 | From 4179cd27a2caa23688646e043e2872e89c9a7bc7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 11:52:03 +0530 | ||
4 | Subject: [PATCH 2/3] AM33XX : Invoke hwmod deassert for SGX(graphics device) | ||
5 | |||
6 | By default reset is asserted for SGX. | ||
7 | Adding gpu.c file introducing omap_sgx_init_of() for deasserting SGX reset. | ||
8 | This calls omap_device_deassert_hardreset() for deasserting the reset for SGX. | ||
9 | |||
10 | Signed-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 | |||
19 | diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile | ||
20 | index 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 \ | ||
32 | diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c | ||
33 | index 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 | ||
53 | diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h | ||
54 | index 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); | ||
65 | diff --git a/arch/arm/mach-omap2/gpu.c b/arch/arm/mach-omap2/gpu.c | ||
66 | new file mode 100644 | ||
67 | index 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 | -- | ||
120 | 1.7.1 | ||
121 | |||
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 @@ | |||
1 | From 0f4e7d4b7d7314b38a9fd3497d7d4e0c36d19bff Mon Sep 17 00:00:00 2001 | ||
2 | From: Prathap M S <msprathap@ti.com> | ||
3 | Date: Mon, 2 Sep 2013 12:05:23 +0530 | ||
4 | Subject: [PATCH 3/3] video: da8xx-fb: Add API to register wait for vsync callback | ||
5 | |||
6 | This patch adds APIs to register and unregister wait for vsync callback. | ||
7 | This is derived from commit id 2d44302545da24fd22912d964102bc31a7489e97 | ||
8 | This commit id was part of 3.2 kernel sources. | ||
9 | |||
10 | Signed-off-by: Prathap M S <msprathap@ti.com> | ||
11 | --- | ||
12 | drivers/video/da8xx-fb.c | 33 +++++++++++++++++++++++++++++++++ | ||
13 | include/video/da8xx-fb.h | 4 ++++ | ||
14 | 2 files changed, 37 insertions(+), 0 deletions(-) | ||
15 | |||
16 | diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c | ||
17 | index 131cf4c..ef06b85 100644 | ||
18 | --- a/drivers/video/da8xx-fb.c | ||
19 | +++ b/drivers/video/da8xx-fb.c | ||
20 | @@ -199,6 +199,9 @@ static struct fb_fix_screeninfo da8xx_fb_fix = { | ||
21 | .accel = FB_ACCEL_NONE | ||
22 | }; | ||
23 | |||
24 | +static vsync_callback_t vsync_cb_handler; | ||
25 | +static void *vsync_cb_arg; | ||
26 | + | ||
27 | static struct fb_videomode known_lcd_panels[] = { | ||
28 | /* Sharp LCD035Q3DG01 */ | ||
29 | [0] = { | ||
30 | @@ -806,6 +809,32 @@ static int lcd_init(struct da8xx_fb_par *par, const struct lcd_ctrl_config *cfg, | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
35 | +{ | ||
36 | + if ((vsync_cb_handler == NULL) && (vsync_cb_arg == NULL)) { | ||
37 | + vsync_cb_arg = arg; | ||
38 | + vsync_cb_handler = handler; | ||
39 | + } else { | ||
40 | + return -EEXIST; | ||
41 | + } | ||
42 | + | ||
43 | + return 0; | ||
44 | +} | ||
45 | +EXPORT_SYMBOL(register_vsync_cb); | ||
46 | + | ||
47 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx) | ||
48 | +{ | ||
49 | + if ((vsync_cb_handler == handler) && (vsync_cb_arg == arg)) { | ||
50 | + vsync_cb_handler = NULL; | ||
51 | + vsync_cb_arg = NULL; | ||
52 | + } else { | ||
53 | + return -ENXIO; | ||
54 | + } | ||
55 | + | ||
56 | + return 0; | ||
57 | +} | ||
58 | +EXPORT_SYMBOL(unregister_vsync_cb); | ||
59 | + | ||
60 | /* IRQ handler for version 2 of LCDC */ | ||
61 | static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
62 | { | ||
63 | @@ -843,6 +872,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg) | ||
64 | LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG); | ||
65 | par->vsync_flag = 1; | ||
66 | wake_up_interruptible(&par->vsync_wait); | ||
67 | + if (vsync_cb_handler) | ||
68 | + vsync_cb_handler(vsync_cb_arg); | ||
69 | } | ||
70 | |||
71 | if (stat & LCD_END_OF_FRAME1) { | ||
72 | @@ -918,6 +949,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg) | ||
73 | LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG); | ||
74 | par->vsync_flag = 1; | ||
75 | wake_up_interruptible(&par->vsync_wait); | ||
76 | + if (vsync_cb_handler) | ||
77 | + vsync_cb_handler(vsync_cb_arg); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | diff --git a/include/video/da8xx-fb.h b/include/video/da8xx-fb.h | ||
82 | index efed3c3..a6cc484 100644 | ||
83 | --- a/include/video/da8xx-fb.h | ||
84 | +++ b/include/video/da8xx-fb.h | ||
85 | @@ -91,5 +91,9 @@ struct lcd_sync_arg { | ||
86 | /* Proprietary FB_SYNC_ flags */ | ||
87 | #define FB_SYNC_CLK_INVERT 0x40000000 | ||
88 | |||
89 | +typedef void (*vsync_callback_t)(void *arg); | ||
90 | +int register_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
91 | +int unregister_vsync_cb(vsync_callback_t handler, void *arg, int idx); | ||
92 | + | ||
93 | #endif /* ifndef DA8XX_FB_H */ | ||
94 | |||
95 | -- | ||
96 | 1.7.1 | ||
97 | |||
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 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | SRC_URI += "\ | ||
3 | file://0001-AM335x-Adding-SGX-DT-node.patch \ | ||
4 | file://0002-AM33XX-Invoke-hwmod-deassert-for-SGX-graphics-device.patch \ | ||
5 | file://0003-video-da8xx-fb-Add-API-to-register-wait-for-vsync-ca.patch \ | ||
6 | " | ||
7 | |||
8 | 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 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://qt.digia.com/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | DESCRIPTION = "U-Boot script to start up BeagleBone Black" | ||
24 | LICENSE = "CLOSED" | ||
25 | PR = "r0" | ||
26 | |||
27 | COMPATIBLE_MACHINE = "(beaglebone)" | ||
28 | PV = "20140225" | ||
29 | |||
30 | SRC_URI = "file://uEnv.txt" | ||
31 | |||
32 | inherit deploy | ||
33 | |||
34 | do_deploy () { | ||
35 | install -d ${DEPLOYDIR} | ||
36 | install ${WORKDIR}/uEnv.txt ${DEPLOYDIR}/uEnv-${MACHINE}-${PV}-${PR}.txt | ||
37 | |||
38 | cd ${DEPLOYDIR} | ||
39 | rm -f uEnv-${MACHINE}.txt | ||
40 | ln -sf uEnv-${MACHINE}-${PV}-${PR}.txt uEnv-${MACHINE}.txt | ||
41 | } | ||
42 | |||
43 | addtask deploy after do_install before do_build | ||
44 | |||
45 | do_compile[noexec] = "1" | ||
46 | do_install[noexec] = "1" | ||
47 | do_populate_sysroot[noexec] = "1" | ||
48 | |||
49 | 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 | |||