summaryrefslogtreecommitdiffstats
path: root/recipes-ti/local-power-manager
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-ti/local-power-manager')
-rw-r--r--recipes-ti/local-power-manager/ti-local-power-manager.inc133
-rw-r--r--recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch24
-rw-r--r--recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch72
-rw-r--r--recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb10
4 files changed, 0 insertions, 239 deletions
diff --git a/recipes-ti/local-power-manager/ti-local-power-manager.inc b/recipes-ti/local-power-manager/ti-local-power-manager.inc
deleted file mode 100644
index 9155c761..00000000
--- a/recipes-ti/local-power-manager/ti-local-power-manager.inc
+++ /dev/null
@@ -1,133 +0,0 @@
1DESCRIPTION = "TI Local Power Manager (LPM)"
2HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/lpm"
3SECTION = "devel"
4LICENSE = "GPLv2"
5
6LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=ebb5c50ab7cab4baeffba14977030c07"
7
8# TODO : Hardcoded path to evm3530 - need to fix when adding omap24xx/dm6446 (other lpm targets)
9
10require ../includes/ti-paths.inc
11require ../includes/ti-staging.inc
12
13PROVIDES = "ti-lpm-module"
14PROVIDES += "ti-lpm-utils"
15
16# This package builds a kernel module, use kernel PR as base and append a local version
17PR = "${MACHINE_KERNEL_PR}"
18PR_append = "e"
19
20S = "${WORKDIR}/local_power_manager_linux_${PV}"
21
22SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/lpm/${PV}/exports/local_power_manager_linux_${PV}.tar.gz;name=lpmtarball"
23
24DEPENDS = "ti-dsplink ti-xdctools"
25DEPENDS += "virtual/kernel"
26
27# SOC_FAMILY configuration
28
29LPMDSPPOWERSOC_omap3 = "omap3530"
30LPMDSPPOWERSOC_dm6446 = "dm6446"
31LPMDSPPOWERSOC ?= "UNDEFINED_LPMDSPPOWERSOC"
32
33XDC_PLATFORM_dm6446 = "ti.platforms.evmDM6446"
34XDC_PLATFORM_omap3 = "ti.platforms.evm3530"
35XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM"
36
37do_configure () {
38
39 # Generate a config.bld for XDC
40
41 cat > ${S}/config.bld <<EOF
42
43/* Generated by ti-local-power-manager.inc OE recipe */
44
45var Build = xdc.useModule('xdc.bld.BuildEnvironment');
46
47var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T');
48GCArmv5T.LONGNAME = "${TARGET_PREFIX}gcc";
49GCArmv5T.rootDir = "${TOOLCHAIN_PATH}";
50GCArmv5T.ccOpts.prefix += " -Wall -fno-strict-aliasing ";
51GCArmv5T.lnkOpts.suffix = GCArmv5T.lnkOpts.suffix.replace("-lstdc++", "");
52GCArmv5T.lnkOpts.suffix += " -lpthread ";
53GCArmv5T.platform = null;
54GCArmv5T.platforms = [
55 "${XDC_PLATFORM}"
56];
57
58/* remove profiles we don't use */
59delete GCArmv5T.profiles["coverage"];
60delete GCArmv5T.profiles["profile"];
61
62Build.targets.\$add(GCArmv5T);
63EOF
64
65}
66
67do_prepsources () {
68
69 # Prepare the tree for rebuiling - generate makefiles and clean
70 XDCPATH=${S} ${XDC_INSTALL_DIR}/xdc .make -PR .
71 XDCPATH=${S} ${XDC_INSTALL_DIR}/xdc clean -PR .
72}
73
74addtask prepsources after do_configure before do_compile
75
76do_compile () {
77
78 # Build the LPM kernel module
79 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
80 cd ${S}/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm
81 make \
82 DSPLINK_REPO="${LINK_INSTALL_DIR}" \
83 LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
84 MVTOOL_PREFIX="${TARGET_PREFIX}" \
85 clean default
86
87 # Build the user space library
88 # TODO
89
90 # Build the utilities (lpmON/OFF)
91 cd ${S}
92 XDCPATH=${S} ${XDC_INSTALL_DIR}/xdc -PR .
93}
94
95KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
96
97do_install () {
98
99 # Install the kernel module
100 install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
101 install -m 0755 ${S}/packages/ti/bios/power/modules/${LPMDSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
102
103 # Install the Utilities
104 install -d ${D}/${installdir}/ti-lpm-utils
105 install -m 0755 ${S}/packages/ti/bios/power/utils/bin/$(echo ${XDC_PLATFORM} | tr . _)/linux/release/* ${D}/${installdir}/ti-lpm-utils
106
107 # Install/Stage the Source Tree
108 install -d ${D}${LPM_INSTALL_DIR_RECIPE}
109 cp -pPrf ${S}/* ${D}${LPM_INSTALL_DIR_RECIPE}
110}
111
112PACKAGE_ARCH = "${MACHINE_ARCH}"
113PACKAGES += "ti-lpm-module"
114FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko"
115RDEPENDS_ti-lpm-module += "ti-dsplink-module"
116RDEPENDS_ti-lpm-module += "update-modules"
117
118pkg_postinst_ti-lpm-module_append () {
119 if [ -n "$D" ]; then
120 exit 1
121 fi
122 depmod -a
123 update-modules || true
124}
125
126pkg_postrm_ti-lpm-module_append () {
127 update-modules || true
128}
129
130PACKAGES += "ti-lpm-utils"
131RDEPENDS_ti-lpm-utils += "ti-lpm-module"
132FILES_ti-lpm-utils = "${installdir}/ti-lpm-utils/*"
133INSANE_SKIP_ti-lpm-utils = "1"
diff --git a/recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch b/recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch
deleted file mode 100644
index 120792b8..00000000
--- a/recipes-ti/local-power-manager/ti-local-power-manager/lpm-1_24_01-replace-define-OPT.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1diff -uNr local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/dm6446/lpm/Makefile local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/dm6446/lpm/Makefile
2--- local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/dm6446/lpm/Makefile 2009-07-22 23:10:04.000000000 -0500
3+++ local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/dm6446/lpm/Makefile 2010-04-16 15:26:14.000000000 -0500
4@@ -54,7 +54,7 @@
5 endif
6
7 MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX)
8-CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL \
9+CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL -DOPT="" \
10 $(LINK_DEFS) $(LINK_INCS) $(LINK_INCS_INTERNAL)
11
12 # Invoke the kernel build system
13diff -uNr local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/omap3530/lpm/Makefile local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/omap3530/lpm/Makefile
14--- local_power_manager_linux_1_24_01_orig/packages/ti/bios/power/modules/omap3530/lpm/Makefile 2009-07-22 23:10:05.000000000 -0500
15+++ local_power_manager_linux_1_24_01/packages/ti/bios/power/modules/omap3530/lpm/Makefile 2010-04-16 15:26:38.000000000 -0500
16@@ -54,7 +54,7 @@
17 endif
18
19 MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX)
20-CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL \
21+CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL -DOPT="" \
22 $(LINK_DEFS) $(LINK_INCS) $(LINK_INCS_INTERNAL)
23
24 # Invoke the kernel build system
diff --git a/recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch b/recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch
deleted file mode 100644
index 4b5a537a..00000000
--- a/recipes-ti/local-power-manager/ti-local-power-manager/lpm-BKL-fix.patch
+++ /dev/null
@@ -1,72 +0,0 @@
1From b7e83000f316f5f109b9237fde4d1c576534aa1a Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Tue, 4 Jan 2011 14:21:02 +0100
4Subject: [PATCH] Fix build with 2.6.37rcX
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 .../bios/power/modules/omap3530/lpm/lpm_driver.c | 12 +++++++++---
9 1 files changed, 9 insertions(+), 3 deletions(-)
10
11diff --git a/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c b/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c
12index fa22ea3..4663fc9 100644
13--- a/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c
14+++ b/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c
15@@ -40,6 +40,7 @@
16 #include <asm/semaphore.h>
17 #endif
18 #include <linux/io.h>
19+#include <linux/slab.h>
20
21 #include "lpm_driver.h"
22 #include "lpm_dev.h"
23@@ -95,7 +96,7 @@ static int enablevicp = -1;
24 module_param(enablevicp, int, S_IRUGO);
25
26 /* forward declaration of system calls (used by Linux driver) */
27-static int lpm_ioctl (struct inode *inode, struct file *filp,
28+static long lpm_ioctl (struct file *filp,
29 unsigned int cmd, unsigned long args);
30 static int lpm_open (struct inode *inode, struct file *filp);
31 static int lpm_release (struct inode *inode, struct file *filp);
32@@ -111,7 +112,7 @@ static void lpm_os_trace (char *fmt, ...);
33
34 static struct file_operations lpm_fops = {
35 .owner = THIS_MODULE,
36- .ioctl = lpm_ioctl,
37+ .unlocked_ioctl = lpm_ioctl,
38 .open = lpm_open,
39 .release = lpm_release,
40 };
41@@ -244,7 +245,11 @@ static int __init lpm_init(void)
42 lpm->inst[i].major = MAJOR(lpm->first);
43 lpm->inst[i].minor = MINOR(lpm->first) + i;
44 INIT_LIST_HEAD(&lpm->inst[i].clients);
45+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
46 init_MUTEX(&lpm->inst[i].sem);
47+#else
48+ sema_init(&lpm->inst[i].sem,1);
49+#endif
50 init_completion(&lpm->inst[i].event);
51 lpm_devAttrs.os_instance = (void *)&lpm->inst[i];
52 LPM_init(i, &lpm->inst[i].lpm, &lpm_devAttrs);
53@@ -320,7 +325,7 @@ fail_02:
54 /*
55 * ======== lpm_ioctl ========
56 */
57-static int lpm_ioctl(struct inode *inode, struct file *filp,
58+static long lpm_ioctl(struct file *filp,
59 unsigned int cmd, unsigned long args)
60 {
61 struct LPM_Dev *dev;
62@@ -328,6 +333,7 @@ static int lpm_ioctl(struct inode *inode, struct file *filp,
63 LPM_Client *client;
64 LPM_Status lpmStat = LPM_SOK;
65 int stat = 0;
66+ struct inode *inode = filp->f_dentry->d_inode;
67
68 TRACE(KERN_ALERT "--> lpm_ioctl, cmd: 0x%X\n", cmd);
69
70--
711.6.6.1
72
diff --git a/recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb b/recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb
deleted file mode 100644
index 759561f3..00000000
--- a/recipes-ti/local-power-manager/ti-local-power-manager_1.24.02.09.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require ti-local-power-manager.inc
2
3PV = "1_24_02_09"
4PE = "1"
5
6SRC_URI += "file://lpm-BKL-fix.patch"
7
8SRC_URI[lpmtarball.md5sum] = "3d05453df26dfc811de04839d74c2f2b"
9SRC_URI[lpmtarball.sha256sum] = "7335959a6217df17289f81839e6c6948f31cc0797ebc5389edef7190ed3ea589"
10