misc: mic: add support for loading/unloading SCIF driver
modprobe SCIF driver upon start and remove it upon unload Reviewed-by: Nikhil Rao <nikhil.rao@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Sudeep Dutt <sudeep.dutt@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>hifive-unleashed-5.1
parent
dd8d8d44df
commit
f5c48149b9
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
exec=/usr/sbin/mpssd
|
exec=/usr/sbin/mpssd
|
||||||
sysfs="/sys/class/mic"
|
sysfs="/sys/class/mic"
|
||||||
|
mic_modules="mic_host mic_x100_dma scif"
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
|
@ -48,18 +49,15 @@ start()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e $"Starting MPSS Stack"
|
echo -e $"Starting MPSS Stack"
|
||||||
echo -e $"Loading MIC_X100_DMA & MIC_HOST Modules"
|
echo -e $"Loading MIC drivers:" $mic_modules
|
||||||
|
|
||||||
for f in "mic_host" "mic_x100_dma"
|
modprobe -a $mic_modules
|
||||||
do
|
RETVAL=$?
|
||||||
modprobe $f
|
if [ $RETVAL -ne 0 ]; then
|
||||||
RETVAL=$?
|
failure
|
||||||
if [ $RETVAL -ne 0 ]; then
|
echo
|
||||||
failure
|
return $RETVAL
|
||||||
echo
|
fi
|
||||||
return $RETVAL
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Start the daemon
|
# Start the daemon
|
||||||
echo -n $"Starting MPSSD "
|
echo -n $"Starting MPSSD "
|
||||||
|
@ -170,8 +168,8 @@ unload()
|
||||||
stop
|
stop
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
echo -n $"Removing MIC_HOST & MIC_X100_DMA Modules: "
|
echo -n $"Removing MIC drivers:" $mic_modules
|
||||||
modprobe -r mic_host mic_x100_dma
|
modprobe -r $mic_modules
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
[ $RETVAL -ne 0 ] && failure || success
|
[ $RETVAL -ne 0 ] && failure || success
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue