Skip to content

Commit

Permalink
[devices]: platform_reboot support for Dell S6100/Z9100 platforms (#2420
Browse files Browse the repository at this point in the history
)
  • Loading branch information
paavaanan authored and lguohan committed Jan 8, 2019
1 parent 584842d commit ab6a52f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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)

Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab6a52f

Please sign in to comment.