summaryrefslogtreecommitdiff
path: root/packages/dsplink/files
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dsplink/files')
-rw-r--r--packages/dsplink/files/dsplink-add-class-device-create-support.patch55
-rwxr-xr-xpackages/dsplink/files/loadmodules-ti-codec-engine-apps.sh4
-rwxr-xr-xpackages/dsplink/files/loadmodules-ti-dmai-apps.sh4
-rwxr-xr-xpackages/dsplink/files/loadmodules-ti-dsplink-apps.sh4
-rwxr-xr-xpackages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh2
-rwxr-xr-xpackages/dsplink/files/unloadmodules-ti-dmai-apps.sh2
-rwxr-xr-xpackages/dsplink/files/unloadmodules-ti-dsplink-apps.sh2
7 files changed, 64 insertions, 9 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