Skip to content

Commit

Permalink
Remove exsiting sonic-platform-modules-accton and apply submodule add… (
Browse files Browse the repository at this point in the history
#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
roylee123 authored and lguohan committed Jun 21, 2017
1 parent c4133e1 commit 6685938
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 3,290 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@
[submodule "src/sonic-platform-daemons"]
path = src/sonic-platform-daemons
url = https://github.com/Azure/sonic-platform-daemons
[submodule "platform/broadcom/sonic-platform-modules-accton"]
path = platform/broadcom/sonic-platform-modules-accton
url = https://github.com/edge-core/sonic-platform-modules-accton.git
24 changes: 24 additions & 0 deletions device/accton/x86_64-accton_as7712_32x-r0/plugins/eeprom.py
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 device/accton/x86_64-accton_as7712_32x-r0/plugins/sfputil.py
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)
5 changes: 1 addition & 4 deletions platform/broadcom/platform-modules-accton.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION = 1.0

export ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION

ACCTON_AS7712_32X_PLATFORM_MODULE = platform-modules-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb
ACCTON_AS7712_32X_PLATFORM_MODULE = sonic-platform-accton-as7712-32x_$(ACCTON_AS7712_32X_PLATFORM_MODULE_VERSION)_amd64.deb
$(ACCTON_AS7712_32X_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-accton
$(ACCTON_AS7712_32X_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(ACCTON_AS7712_32X_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as7712_32x-r0
SONIC_DPKG_DEBS += $(ACCTON_AS7712_32X_PLATFORM_MODULE)

$(eval $(call add_extra_package,$(ACCTON_AS7712_32X_PLATFORM_MODULE)))

1 change: 1 addition & 0 deletions platform/broadcom/sonic-platform-modules-accton
33 changes: 0 additions & 33 deletions platform/broadcom/sonic-platform-modules-accton/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions platform/broadcom/sonic-platform-modules-accton/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion platform/broadcom/sonic-platform-modules-accton/README.md

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6685938

Please sign in to comment.