Fix as4630 mgt port patch and sysi cpld sysfs

This commit is contained in:
Jostar Yang
2019-02-26 14:27:12 +08:00
parent d26aa27be3
commit 45d6ea3c7a
3 changed files with 9 additions and 22 deletions

View File

@@ -1,9 +1,3 @@
add to support external PHY
Copyright (C) 2018 Accton Technology Corporation
SPDX-License-Identifier: GPL-2.0
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index 654a402..9714687 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

View File

@@ -1,3 +1,3 @@
*x86*64*accton*as7816*64x*.mk
*x86*64*accton*as4630*54pe*.mk
onlpdump.mk

View File

@@ -37,7 +37,8 @@
#include "x86_64_accton_as4630_54pe_log.h"
#define PREFIX_PATH_ON_CPLD_DEV "/sys/bus/i2c/devices/"
#define PREFIX_PATH_ON_CPLD_DEV "/sys/bus/i2c/devices/3-0060/"
#define NUM_OF_CPLD 3
#define FAN_DUTY_CYCLE_MAX (100)
#define FAN_DUTY_CYCLE_DEFAULT (32)
@@ -53,12 +54,8 @@ typedef struct fan_ctrl_policy {
int step_dn_thermal; /* In mini-Celsius */
} fan_ctrl_policy_t;
static char arr_cplddev_name[NUM_OF_CPLD][10] =
{
"4-0060",
"5-0062",
"6-0064"
};
const char*
onlp_sysi_platform_get(void)
@@ -116,16 +113,12 @@ onlp_sysi_oids_get(onlp_oid_t* table, int max)
int
onlp_sysi_platform_info_get(onlp_platform_info_t* pi)
{
int i, v[NUM_OF_CPLD]={0};
int ver=0;
for (i = 0; i < NUM_OF_CPLD; i++) {
v[i] = 0;
if(onlp_file_read_int(&ver, "%s/version", PREFIX_PATH_ON_CPLD_DEV) < 0)
return ONLP_STATUS_E_INTERNAL;
if(onlp_file_read_int(v+i, "%s%s/version", PREFIX_PATH_ON_CPLD_DEV, arr_cplddev_name[i]) < 0) {
return ONLP_STATUS_E_INTERNAL;
}
}
pi->cpld_versions = aim_fstrdup("%d.%d.%d", v[0], v[1], v[2]);
pi->cpld_versions = aim_fstrdup("%d", ver);
return 0;
}