-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove exsiting sonic-platform-modules-accton and apply submodule add… #717
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
2b0d4e6
Remove exsiting sonic-platform-modules-accton and apply submodule add…
roylee123 aeede71
Remove redundant commnet
roylee123 212778f
Remove folder platform/broadcom/sonic-platform-modules-accton.
roylee123 fa54ba1
Add this dir for submodule.
roylee123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
34 changes: 34 additions & 0 deletions
34
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,34 @@ | ||
#!/usr/bin/env python | ||
|
||
############################################################################# | ||
# Cavium | ||
# | ||
# Platform and model specific eeprom subclass, inherits from the base class, | ||
# and provides the followings: | ||
# - the eeprom format definition | ||
# - specific encoder/decoder if there is special need | ||
############################################################################# | ||
|
||
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" | ||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this Cavium platform?