summaryrefslogtreecommitdiff
path: root/recipes-kernel/rs9113
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-11-22 15:17:40 -0600
committerJohn Klug <john.klug@multitech.com>2021-12-29 08:35:07 -0600
commit6f49bdfbae7cf1826cbd34fc7363a052f8a36796 (patch)
treec177b4643cb1a57dce533ab2fca1f83c24c20faa /recipes-kernel/rs9113
parent8dd278f6a285b8a3843f9a03646c1cb8d36f193c (diff)
downloadmeta-multitech-atmel-6f49bdfbae7cf1826cbd34fc7363a052f8a36796.tar.gz
meta-multitech-atmel-6f49bdfbae7cf1826cbd34fc7363a052f8a36796.tar.bz2
meta-multitech-atmel-6f49bdfbae7cf1826cbd34fc7363a052f8a36796.zip
Add a reset loop in case rs9113 does not appear on USB Hub
Diffstat (limited to 'recipes-kernel/rs9113')
-rwxr-xr-xrecipes-kernel/rs9113/files/rs9113/rs9113.init62
-rw-r--r--recipes-kernel/rs9113/rs9113_1.6.5.bb2
2 files changed, 36 insertions, 28 deletions
diff --git a/recipes-kernel/rs9113/files/rs9113/rs9113.init b/recipes-kernel/rs9113/files/rs9113/rs9113.init
index 4ef6f4b..d9fb21e 100755
--- a/recipes-kernel/rs9113/files/rs9113/rs9113.init
+++ b/recipes-kernel/rs9113/files/rs9113/rs9113.init
@@ -28,33 +28,41 @@ case "$1" in
exit 0
fi
# Reset the RS9113 chip is ready, and
- # wait for it to settle.
- if [ -f "$RS9113_RESET" ] ; then
- echo 1 >$RS9113_RESET
- usleep $SLEEPTIME
- echo 0 >$RS9113_RESET
- usleep $SLEEPTIME
- echo 1 >$RS9113_RESET
- N=1
- while [ $N -lt 20 ] ; do
- INT=$(cat $RS9113_INT)
- WKUP=$(cat $RS9113_WKUP)
- if [ $INT -ne 1 -o $WKUP -ne 1 ] ; then
- usleep $INTSLEEPTIME
- else
- break
- fi
- done
- if [ $INT -ne 1 ] ; then
- logger -t rs9113 -p error -s "$RS9113_INT is $INT"
- fi
- if [ $WKUP -ne 1 ] ; then
- logger -t rs9113 -p error -s "$RS9113_WKUP is $WKUP"
- fi
- else
- # No WiFi BT, so exit quietly
- exit 0
- fi
+ # wait for it to settle.
+ count=0
+ while : ; do
+ if [ -f "$RS9113_RESET" ] ; then
+ echo 1 >$RS9113_RESET
+ usleep $SLEEPTIME
+ echo 0 >$RS9113_RESET
+ usleep $SLEEPTIME
+ echo 1 >$RS9113_RESET
+ N=1
+ while [ $N -lt 20 ] ; do
+ INT=$(cat $RS9113_INT)
+ if ((INT != 1)) ; then
+ usleep $INTSLEEPTIME
+ else
+ break
+ fi
+ done
+ if [ $INT -ne 1 ] ; then
+ logger -t rs9113 -p error -s "$RS9113_INT is $INT"
+ fi
+ else
+ # No WiFi BT, so exit quietly
+ exit 0
+ fi
+ if /usr/bin/lsusb -d 1618:9113 >/dev/null ; then
+ break
+ fi
+ sleep 15
+ ((count++))
+ if ((count > 5)) ; then
+ logger -t rs9113 -p error -s "RS9113 not found after $count resets"
+ break
+ fi
+ done
/usr/bin/logger -t "rs9113" -p info -s "Loading rs9113 modules with COEX=$COEX_MODE and Country=$SET_COUNTRY_CODE"
/usr/sbin/rs9113_load_modules.sh $CONFIG
RETVAL=$?
diff --git a/recipes-kernel/rs9113/rs9113_1.6.5.bb b/recipes-kernel/rs9113/rs9113_1.6.5.bb
index 54a1ca5..0627dcb 100644
--- a/recipes-kernel/rs9113/rs9113_1.6.5.bb
+++ b/recipes-kernel/rs9113/rs9113_1.6.5.bb
@@ -17,7 +17,7 @@ COMPATIBLE_MACHINE = "(mtcdt|mtrv1)"
# To update this, manually copy ipk from Jenkin's job to
# git://git@${MTS_INTERNAL_GIT}/mlinux/ipk.git;protocol=ssh;branch=${PV}
#
-PR = "r11${KERNEL_MODULE_PACKAGE_SUFFIX}"
+PR = "r12${KERNEL_MODULE_PACKAGE_SUFFIX}"
SRC_URI = " \
file://rs9113/rs9113.init \
file://rs9113/rs9113.default \