Skip to content

Commit 4f737f8

Browse files
paavaananlguohan
authored andcommitted
[devices]: DellEMC S6100 Watchdog support (sonic-net#2835)
1 parent 9b0d1b7 commit 4f737f8

4 files changed

Lines changed: 28 additions & 0 deletions

File tree

platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ common/io_rd_wr.py usr/local/bin
55
common/dell_lpc_mon.sh usr/local/bin
66
common/platform_reboot usr/share/sonic/device/x86_64-dell_s6100_c2538-r0
77
s6100/scripts/platform_sensors.py usr/local/bin
8+
s6100/scripts/platform_watchdog_enable.sh usr/local/bin
9+
s6100/scripts/platform_watchdog_disable.sh usr/local/bin
810
s6100/scripts/sensors usr/bin
911
s6100/systemd/platform-modules-s6100.service etc/systemd/system
1012
s6100/systemd/s6100-lpc-monitor.service etc/systemd/system
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
#This script is used to disable SMF Watchdog Timer
3+
4+
wd_status=-1
5+
enabled=0
6+
7+
# Disable Watchdog if enabled
8+
wd_status=$(io_rd_wr.py --get --offset 0x207 | cut -d " " -f3)
9+
10+
if [[ $wd_status -eq $enabled ]]; then
11+
echo "Disabling Watchdog Timer.."
12+
io_rd_wr.py --set --val 1 --offset 0x207
13+
fi
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
#This script is used to enable SMF Watchdog Timer
3+
4+
# Set watchdog to 180 seconds
5+
io_rd_wr.py --set --val 3 --offset 0x206
6+
7+
# Enable watchdog timer
8+
io_rd_wr.py --set --val 0 --offset 0x207

platform/broadcom/sonic-platform-modules-dell/s6100/scripts/s6100_platform.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ if [[ "$1" == "init" ]]; then
226226
modprobe dell_s6100_iom_cpld
227227
modprobe dell_s6100_lpc
228228

229+
# Disable Watchdog Timer
230+
if [[ -e /usr/local/bin/platform_watchdog_disable.sh ]]; then
231+
/usr/local/bin/platform_watchdog_disable.sh
232+
fi
233+
229234
cpu_board_mux "new_device"
230235
switch_board_mux "new_device"
231236
sys_eeprom "new_device"

0 commit comments

Comments
 (0)