[devices]: platform_reboot support for Dell S6100/Z9100 platforms (#2420)
This commit is contained in:
parent
584842db6c
commit
ab6a52f122
25
platform/broadcom/sonic-platform-modules-dell/common/platform_reboot
Executable file
25
platform/broadcom/sonic-platform-modules-dell/common/platform_reboot
Executable 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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user