[DellEMC][201911] S6100 CPLD upgrade support in 201911 branch porting changes (#10686)
Why I did it Porting changes from DellEMC: S6100 CPLD upgrade #4299 and DellEMC S6100 CPLD upgrade support #3834 to 201911 branch Added CPLD upgrade support for DellEMC S6100 platform.
This commit is contained in:
parent
ac35a62747
commit
9093feb113
BIN
device/dell/x86_64-dell_s6100_c2538-r0/s6100_cpld_upgrade
Executable file
BIN
device/dell/x86_64-dell_s6100_c2538-r0/s6100_cpld_upgrade
Executable file
Binary file not shown.
@ -5,6 +5,7 @@ import subprocess
|
||||
import struct
|
||||
|
||||
PORT_RES = '/dev/port'
|
||||
POWER_CYCLE = '/tmp/powercycle'
|
||||
|
||||
|
||||
def log_software_reboot():
|
||||
@ -28,5 +29,11 @@ def portio_reg_write(resource, offset, val):
|
||||
|
||||
if __name__ == "__main__":
|
||||
log_software_reboot()
|
||||
|
||||
# power-cycle the switch
|
||||
if os.path.exists(POWER_CYCLE):
|
||||
print "CPLD upgrade detected. Power-cycling the unit.."
|
||||
os.system('io_rd_wr.py --set --val 05 --offset 210; io_rd_wr.py --set --val 00 --offset 211; io_rd_wr.py --set --val 03 --offset 213')
|
||||
|
||||
portio_reg_write(PORT_RES, 0xcf9, 0xe)
|
||||
|
||||
|
Reference in New Issue
Block a user