diff options
author | Roger Monk <r-monk@ti.com> | 2009-02-21 00:20:37 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-02-21 11:11:03 +0100 |
commit | def6b6c43d06c72846ace18f619dc3c625bb813c (patch) | |
tree | 2e7978b36dcfbc1742ab2d508ebcd002f33588e6 /packages | |
parent | 7fb50539fbb2d619951ad35b72e4d5c1503ee80c (diff) |
dsplink: Added class device create support to dsplink to allow udev to create the device node.
* Removed awk/manual devnode creation/deletion from load/unload scripts.
* Bump PR
Signed-off-by: Koen Kooi <koen@openembedded.org>
Diffstat (limited to 'packages')
8 files changed, 66 insertions, 10 deletions
diff --git a/packages/dsplink/files/dsplink-add-class-device-create-support.patch b/packages/dsplink/files/dsplink-add-class-device-create-support.patch new file mode 100644 index 0000000000..b43c3481e1 --- /dev/null +++ b/packages/dsplink/files/dsplink-add-class-device-create-support.patch @@ -0,0 +1,55 @@ +diff -uNr codec_engine_2_21/cetools/packages/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c codec_engine_2_21_fix/cetools/packages/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c +--- codec_engine_2_21/cetools/packages/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c 2008-10-24 20:58:01.000000000 +0100 ++++ codec_engine_2_21_fix/cetools/packages/dsplink/gpp/src/pmgr/Linux/2.6.18/drv_pmgr.c 2009-02-20 23:46:42.000000000 +0000 +@@ -37,6 +37,10 @@ + #endif
+
+ /* ----------------------------------- OS Specific Headers */
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#include <linux/device.h>
++#endif
+ #include <linux/autoconf.h>
+ #include <linux/spinlock.h>
+ #include <linux/module.h>
+@@ -190,6 +194,16 @@ + */
+ STATIC Int32 major = 230 ;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++/** ----------------------------------------------------------------------------
++ * @name dsplink_class
++ *
++ * @desc class struct for device create.
++ * ----------------------------------------------------------------------------
++ */
++STATIC struct class *dsplink_class;
++#endif
++
+ /** ----------------------------------------------------------------------------
+ * @name DRV_IsInitialized
+ *
+@@ -673,6 +687,11 @@ + }
+ #endif /* if defined (CHNL_COMPONENT) */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++ dsplink_class = class_create(THIS_MODULE, "dsplink");
++ device_create(dsplink_class, NULL, MKDEV(major, 0), NULL, "dsplink");
++#endif
++
+ if (DSP_SUCCEEDED (status)) {
+ DRV_IsInitialized = TRUE ;
+ }
+@@ -717,6 +736,11 @@ + }
+ #endif /* if defined (CHNL_COMPONENT) */
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++ device_destroy(dsplink_class, MKDEV(major, 0));
++ class_destroy(dsplink_class);
++#endif
++
+ unregister_chrdev (major, "dsplink") ;
+
+ DRV_IsInitialized = FALSE ;
diff --git a/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh b/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh index 743a07ebba..9f9233d12b 100755 --- a/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh +++ b/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh @@ -29,8 +29,8 @@ modprobe cmemk phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,8x131072, modprobe dsplinkk # make /dev/dsplink -rm -f /dev/dsplink -mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 +#rm -f /dev/dsplink +#mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 # insert Local Power Manager driver # diff --git a/packages/dsplink/files/loadmodules-ti-dmai-apps.sh b/packages/dsplink/files/loadmodules-ti-dmai-apps.sh index af4cef9f3f..7120b74483 100755 --- a/packages/dsplink/files/loadmodules-ti-dmai-apps.sh +++ b/packages/dsplink/files/loadmodules-ti-dmai-apps.sh @@ -29,8 +29,8 @@ modprobe cmemk phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072, modprobe dsplinkk # make /dev/dsplink -rm -f /dev/dsplink -mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 +#rm -f /dev/dsplink +#mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 # insert Local Power Manager driver # diff --git a/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh b/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh index c93b637867..9cfb19d5c1 100755 --- a/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh +++ b/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh @@ -21,5 +21,5 @@ awk '/MemTotal:/ { modprobe dsplinkk # make /dev/dsplink -rm -f /dev/dsplink -mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 +#rm -f /dev/dsplink +#mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 diff --git a/packages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh b/packages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh index 17436a5937..f990d99771 100755 --- a/packages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh +++ b/packages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh @@ -5,7 +5,7 @@ rmmod lpm_omap3530 # remove DSP/BIOS Link driver rmmod dsplinkk -rm -f /dev/dsplink +#rm -f /dev/dsplink # remove cmem module rmmod cmemk diff --git a/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh b/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh index 2465c43fe9..793d727f39 100755 --- a/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh +++ b/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh @@ -5,7 +5,7 @@ rmmod lpm_omap3530 # remove DSP/BIOS Link driver rmmod dsplinkk -rm -f /dev/dsplink +#rm -f /dev/dsplink # remove cmem module rmmod cmemk diff --git a/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh b/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh index 8694114a70..48fa84b03d 100755 --- a/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh +++ b/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh @@ -2,4 +2,4 @@ # remove DSP/BIOS Link driver rmmod dsplinkk -rm -f /dev/dsplink +#rm -f /dev/dsplink diff --git a/packages/dsplink/ti-codec-engine_2.21.bb b/packages/dsplink/ti-codec-engine_2.21.bb index c2055c1495..607cbd06ee 100644 --- a/packages/dsplink/ti-codec-engine_2.21.bb +++ b/packages/dsplink/ti-codec-engine_2.21.bb @@ -8,7 +8,7 @@ RDEPENDS = "update-modules" inherit module # tconf from xdctools dislikes '.' in pwd :/ -PR = "r15" +PR = "r16" PV = "221" # Get CE tarball from TI website, place in sources and calculate @@ -19,6 +19,7 @@ SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21.tar.gz \ file://cmem-class-device-27-and-sched-include-fix.patch;patch=1 \ file://sdma-class-device-and-includes-fix.patch;patch=1 \ file://dsplink-semaphore-27.patch;patch=1 \ + file://dsplink-add-class-device-create-support.patch;patch=1 \ file://lpm-device-create-and-semaphore-include-fix.patch;patch=1 \ file://lpm-make-symbol-warnings-fix.patch;patch=1 \ file://Makefile-dsplink-gpp \ |