-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove exsiting sonic-platform-modules-accton and apply submodule add… (
#717) * Remove exsiting sonic-platform-modules-accton and apply submodule adding on this folder. * Remove redundant commnet * Remove folder platform/broadcom/sonic-platform-modules-accton. * Add this dir for submodule.
- Loading branch information
Showing
23 changed files
with
89 additions
and
3,290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
device/accton/x86_64-accton_as7712_32x-r0/plugins/eeprom.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
|
||
try: | ||
import exceptions | ||
import binascii | ||
import time | ||
import optparse | ||
import warnings | ||
import os | ||
import sys | ||
from sonic_eeprom import eeprom_base | ||
from sonic_eeprom import eeprom_tlvinfo | ||
import subprocess | ||
except ImportError, e: | ||
raise ImportError (str(e) + "- required module not found") | ||
|
||
class board(eeprom_tlvinfo.TlvInfoDecoder): | ||
_TLV_INFO_MAX_LEN = 256 | ||
def __init__(self, name, path, cpld_root, ro): | ||
self.eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom" | ||
#Two i2c buses might get flipped order, check them both. | ||
if not os.path.exists(self.eeprom_path): | ||
self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom" | ||
super(board, self).__init__(self.eeprom_path, 0, '', True) |
60 changes: 60 additions & 0 deletions
60
device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env python | ||
|
||
try: | ||
from sonic_sfp.sfputilbase import sfputilbase | ||
except ImportError, e: | ||
raise ImportError (str(e) + "- required module not found") | ||
|
||
|
||
class sfputil(sfputilbase): | ||
"""Platform specific sfputil class""" | ||
|
||
port_start = 0 | ||
port_end = 31 | ||
ports_in_block = 32 | ||
|
||
port_to_eeprom_mapping = {} | ||
port_to_i2c_mapping = { | ||
9 : 18, | ||
10 : 19, | ||
11 : 20, | ||
12 : 21, | ||
1 : 22, | ||
2 : 23, | ||
3 : 24, | ||
4 : 25, | ||
6 : 26, | ||
5 : 27, | ||
8 : 28, | ||
7 : 29, | ||
13 : 30, | ||
14 : 31, | ||
15 : 32, | ||
16 : 33, | ||
17 : 34, | ||
18 : 35, | ||
19 : 36, | ||
20 : 37, | ||
25 : 38, | ||
26 : 39, | ||
27 : 40, | ||
28 : 41, | ||
29 : 42, | ||
30 : 43, | ||
31 : 44, | ||
32 : 45, | ||
21 : 46, | ||
22 : 47, | ||
23 : 48, | ||
24 : 49, | ||
} | ||
|
||
_qsfp_ports = range(0, ports_in_block + 1) | ||
|
||
def __init__(self, port_num): | ||
# Override port_to_eeprom_mapping for class initialization | ||
eeprom_path = '/sys/bus/i2c/devices/{0}-0050/sfp_eeprom' | ||
for x in range(self.port_start, self.port_end + 1): | ||
port_eeprom_path = eeprom_path.format(self.port_to_i2c_mapping[x+1]) | ||
self.port_to_eeprom_mapping[x] = port_eeprom_path | ||
sfputilbase.__init__(self, port_num) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sonic-platform-modules-accton
added at
99607d
33 changes: 0 additions & 33 deletions
33
platform/broadcom/sonic-platform-modules-accton/.gitignore
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
platform/broadcom/sonic-platform-modules-accton/as7712-32x/cfg/as7712_32x-modules.conf
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
platform/broadcom/sonic-platform-modules-accton/as7712-32x/modules/Makefile
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.