[devices]: platform_reboot support for Dell S6100/Z9100 platforms (#2420)

This commit is contained in:
paavaanan 2019-01-08 08:46:31 +05:30 committed by lguohan
parent 584842db6c
commit ab6a52f122
3 changed files with 27 additions and 0 deletions

View File

@ -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)

View File

@ -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

View File

@ -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