[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:
Santhosh Kumar T 2022-04-28 21:53:38 +05:30 committed by GitHub
parent ac35a62747
commit 9093feb113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

Binary file not shown.

View File

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