summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/apmd/apm-tosa-suspendfix_0.1.bb10
-rw-r--r--packages/apmd/files/50-tmio-ohci-unbind19
2 files changed, 29 insertions, 0 deletions
diff --git a/packages/apmd/apm-tosa-suspendfix_0.1.bb b/packages/apmd/apm-tosa-suspendfix_0.1.bb
new file mode 100644
index 0000000000..ad223c1959
--- /dev/null
+++ b/packages/apmd/apm-tosa-suspendfix_0.1.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "Workaround for bug 2134 (Tosa Angstrom x11 image suspend/resume failure)"
+AUTHOR = "Dmitry Baryshkov"
+PR = "r0"
+
+SRC_URI = "file://50-tmio-ohci-unbind"
+
+do_install() {
+ install -d ${D}${sysconfdir}/apm/event.d
+ install -m 0755 ${WORKDIR}/50-tmio-ohci-unbind ${D}${sysconfdir}/apm/event.d
+}
diff --git a/packages/apmd/files/50-tmio-ohci-unbind b/packages/apmd/files/50-tmio-ohci-unbind
new file mode 100644
index 0000000000..f65e0b37d3
--- /dev/null
+++ b/packages/apmd/files/50-tmio-ohci-unbind
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+TOPATH=/sys/bus/platform/drivers/tmio-ohci
+
+case "$1" in
+ suspend)
+ if [ -d $TOPATH ]
+ then
+ echo -n tmio-ohci > $TOPATH/unbind
+ fi
+ ;;
+ resume)
+ if [ -d $TOPATH ]
+ then
+ echo -n tmio-ohci > $TOPATH/bind
+ fi
+ ;;
+esac
+