diff --git a/platform/broadcom/sonic-platform-modules-dell/common/platform_reboot b/platform/broadcom/sonic-platform-modules-dell/common/platform_reboot new file mode 100755 index 0000000000..3e16563065 --- /dev/null +++ b/platform/broadcom/sonic-platform-modules-dell/common/platform_reboot @@ -0,0 +1,25 @@ +#!/usr/bin/python +import sys +import os +import struct + +PORT_RES = '/dev/port' + + +def portio_reg_write(resource, offset, val): + fd = os.open(resource, os.O_RDWR) + if(fd < 0): + print 'file open failed %s" % resource' + return + if(os.lseek(fd, offset, os.SEEK_SET) != offset): + print 'lseek failed on %s' % resource + return + ret = os.write(fd, struct.pack('B', val)) + if(ret != 1): + print 'write failed %d' % ret + return + os.close(fd) + +if __name__ == "__main__": + portio_reg_write(PORT_RES, 0xcf9, 0xe) + diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install index 7d56aee6e2..0174323d98 100644 --- a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install +++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install @@ -4,6 +4,7 @@ s6100/scripts/s6100_platform.sh usr/local/bin common/dell_i2c_utils.sh usr/local/bin common/fstrim.timer etc/systemd/system common/fstrim.service etc/systemd/system +common/platform_reboot usr/share/sonic/device/x86_64-dell_s6100_c2538-r0 s6100/scripts/platform_sensors.py usr/local/bin s6100/scripts/sensors usr/bin s6100/systemd/platform-modules-s6100.service etc/systemd/system diff --git a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-z9100.install b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-z9100.install index 410dcf16ea..9ee4c2f362 100644 --- a/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-z9100.install +++ b/platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-z9100.install @@ -3,6 +3,7 @@ z9100/scripts/z9100_platform.sh usr/local/bin common/dell_i2c_utils.sh usr/local/bin common/fstrim.timer etc/systemd/system common/fstrim.service etc/systemd/system +common/platform_reboot usr/share/sonic/device/x86_64-dell_z9100_c2538-r0 z9100/scripts/platform_sensors.py usr/local/bin z9100/scripts/sensors usr/bin z9100/cfg/z9100-modules.conf etc/modules-load.d