aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2019-11-28 15:06:15 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2019-11-28 15:06:15 +0000
commit3745cee489b181d3860f87ff1995353eddb456b0 (patch)
tree3064473147e7f4bee669802429b9bc7b94779a28 /common
parentf820cb32ee5d7edb1f3c0ad8198805ba79e63b7b (diff)
parent77e208ad5e1b21868c3369a93b5460f568d9e6f7 (diff)
Merge "SPEC-2996: handle rcar_can"
Diffstat (limited to 'common')
-rwxr-xr-xcommon/scripts/test_can_modules.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/common/scripts/test_can_modules.sh b/common/scripts/test_can_modules.sh
index 3b317af..1a46034 100755
--- a/common/scripts/test_can_modules.sh
+++ b/common/scripts/test_can_modules.sh
@@ -1,5 +1,7 @@
#!/bin/sh
+RCAR_CAN=0
+
if [ ! -e /sys/class/net/can1 ];then
lava-test-case show_can_modules --result skip
lava-test-case unload_can_raw_module --result skip
@@ -48,7 +50,13 @@ remove_module c_can_platform
remove_module c_can
-remove_module can_dev unload_can_dev_module
+lsmod | grep -q rcar_can
+if [ $? -eq 0 ];then
+ RCAR_CAN=1
+ remove_module rcar_can
+fi
+
+remove_module can_dev
ip -V 2>&1 | grep -q -i BusyBox
if [ $? -eq 0 ];then
@@ -72,6 +80,10 @@ modprobe_module c_can_platform
modprobe_module can_dev
+if [ $RCAR_CAN -eq 1 ];then
+ modprobe_module rcar_can
+fi
+
#Make sure always that the can interface is down before
#starting the config step.
ip link set can0 down