-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding pmon2.0 support for amd platform
- Loading branch information
Showing
40 changed files
with
5,027 additions
and
18 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
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
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
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,12 @@ | ||
# FALCON Platform | ||
|
||
FALCON_VERSION = 1.0 | ||
export FALCON_VERSION | ||
|
||
FALCON_DB98CX8540_16CD_PLATFORM = sonic-platform-db98cx8540-16cd-db98cx8540_$(FALCON_VERSION)_$(CONFIGURED_ARCH).deb | ||
$(FALCON_DB98CX8540_16CD_PLATFORM)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-db98cx8540-16cd | ||
$(FALCON_DB98CX8540_16CD_PLATFORM)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) | ||
$(FALCON_DB98CX8540_16CD_PLATFORM)_PLATFORM = x86_64-marvell_db98cx8540_16cd-r0 | ||
|
||
SONIC_DPKG_DEBS += $(FALCON_DB98CX8540_16CD_PLATFORM) | ||
|
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,12 @@ | ||
# FALCON Platform | ||
|
||
FALCON_VERSION = 1.0 | ||
export FALCON_VERSION | ||
|
||
FALCON_DB98CX8580_32CD_PLATFORM = sonic-platform-db98cx8580-32cd-db98cx8580_$(FALCON_VERSION)_$(CONFIGURED_ARCH).deb | ||
$(FALCON_DB98CX8580_32CD_PLATFORM)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-db98cx8580-32cd | ||
$(FALCON_DB98CX8580_32CD_PLATFORM)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON) | ||
$(FALCON_DB98CX8580_32CD_PLATFORM)_PLATFORM = x86_64-marvell_db98cx8580_32cd-r0 | ||
|
||
SONIC_DPKG_DEBS += $(FALCON_DB98CX8580_32CD_PLATFORM) | ||
|
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
35 changes: 35 additions & 0 deletions
35
platform/marvell/sonic-platform-db98cx8540-16cd/db98cx8540/scripts/db98cx8540-16cd-init.sh
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,35 @@ | ||
#!/bin/bash | ||
|
||
# Platform init script for db98cx8540-16cd | ||
|
||
# Load required kernel-mode drivers | ||
load_kernel_drivers() { | ||
# Remove modules loaded during Linux init | ||
# FIX-ME: This will be removed in the future when Linux init no longer loads these | ||
rmmod i2c_mux_gpio | ||
rmmod i2c_dev | ||
rmmod i2c_mv64xxx | ||
|
||
# Carefully control the load order here to ensure consistent i2c bus numbering | ||
modprobe i2c_mv64xxx | ||
modprobe i2c_dev | ||
modprobe i2c_mux_gpio | ||
modprobe eeprom | ||
} | ||
|
||
# - Main entry | ||
|
||
# Install kernel drivers required for i2c bus access | ||
load_kernel_drivers | ||
|
||
# LOGIC to enumerate SFP eeprom devices - send 0x50 to kernel i2c driver - initialize devices | ||
# the mux may be enumerated at number 4 or 5 so we check for the mux and skip if needed | ||
# Get list of the mux channels | ||
ismux_bus=$(i2cdetect -l|grep mux|cut -f1) | ||
# Enumerate the SFP eeprom device on each mux channel | ||
for mux in ${ismux_bus} | ||
do | ||
echo optoe2 0x50 > /sys/class/i2c-adapter/${mux}/new_device | ||
done | ||
|
||
exit 0 |
14 changes: 14 additions & 0 deletions
14
...rm/marvell/sonic-platform-db98cx8540-16cd/db98cx8540/service/db98cx8540-16cd-init.service
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,14 @@ | ||
[Unit] | ||
Description=Platform db98cx8540-16cd Service | ||
Before=pmon.service | ||
After=sysinit.target | ||
DefaultDependencies=no | ||
|
||
[Service] | ||
ExecStart=/usr/local/bin/db98cx8540-16cd-init.sh | ||
KillSignal=SIGKILL | ||
SuccessExitStatus=SIGKILL | ||
#StandardOutput=tty | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
15 changes: 15 additions & 0 deletions
15
platform/marvell/sonic-platform-db98cx8540-16cd/db98cx8540/setup.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,15 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
from setuptools import setup | ||
os.listdir | ||
|
||
setup( | ||
name='sonic_platform', | ||
version='1.0', | ||
description='Module to initialize platforms', | ||
|
||
packages=['sonic_platform'], | ||
package_dir={'sonic_platform': 'db98cx8540/sonic_platform'}, | ||
) | ||
|
Empty file.
Oops, something went wrong.