mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
95 lines
2.3 KiB
Diff
95 lines
2.3 KiB
Diff
--- a/config
|
|
+++ b/config
|
|
@@ -299,6 +299,7 @@ else ifeq (DESS, $(CHIP_TYPE))
|
|
else ifeq (MP, $(CHIP_TYPE))
|
|
IN_QCA803X_PHY=TRUE
|
|
IN_QCA808X_PHY=TRUE
|
|
+ IN_MP_PHY=TRUE
|
|
IN_SFP_PHY=TRUE
|
|
IN_SFP=TRUE
|
|
else ifeq (APPE, $(CHIP_TYPE))
|
|
--- a/make/linux_opt.mk
|
|
+++ b/make/linux_opt.mk
|
|
@@ -183,6 +183,11 @@ endif
|
|
ifeq (TRUE, $(IN_QCA808X_PHY))
|
|
MODULE_CFLAG += -DIN_QCA808X_PHY
|
|
endif
|
|
+
|
|
+ifeq (TRUE, $(IN_MP_PHY))
|
|
+ MODULE_CFLAG += -DIN_MP_PHY
|
|
+endif
|
|
+
|
|
ifeq (TRUE, $(IN_SFP_PHY))
|
|
MODULE_CFLAG += -DIN_SFP_PHY
|
|
endif
|
|
--- a/src/adpt/mp/adpt_mp_portctrl.c
|
|
+++ b/src/adpt/mp/adpt_mp_portctrl.c
|
|
@@ -92,12 +92,15 @@ static sw_error_t
|
|
adpt_mp_port_reset_set(a_uint32_t dev_id, a_uint32_t port_id)
|
|
{
|
|
sw_error_t rv = 0;
|
|
+#ifdef IN_MP_PHY
|
|
a_uint32_t phy_addr;
|
|
hsl_phy_ops_t *phy_drv;
|
|
+#endif
|
|
|
|
ADPT_DEV_ID_CHECK(dev_id);
|
|
|
|
if (port_id == SSDK_PHYSICAL_PORT1) {
|
|
+#ifdef IN_MP_PHY
|
|
/*internal gephy reset*/
|
|
SW_RTN_ON_NULL (phy_drv = hsl_phy_api_ops_get(dev_id,
|
|
port_id));
|
|
@@ -107,6 +110,7 @@ adpt_mp_port_reset_set(a_uint32_t dev_id
|
|
SW_RTN_ON_ERROR (rv);
|
|
rv = phy_drv->phy_function_reset(dev_id, phy_addr, PHY_FIFO_RESET);
|
|
SW_RTN_ON_ERROR (rv);
|
|
+#endif
|
|
} else if (port_id == SSDK_PHYSICAL_PORT2) {
|
|
rv = adpt_mp_uniphy_adapter_port_reset(dev_id, port_id);
|
|
} else {
|
|
--- a/src/hsl/phy/Makefile
|
|
+++ b/src/hsl/phy/Makefile
|
|
@@ -23,7 +23,7 @@ ifeq (ISIS, $(CHIP_TYPE))
|
|
SRC_LIST = f1_phy.c
|
|
endif
|
|
|
|
-ifeq (MP, $(CHIP_TYPE))
|
|
+ifeq (TRUE, $(IN_MP_PHY))
|
|
SRC_LIST = mpge_phy.c
|
|
ifeq (TRUE, $(IN_LED))
|
|
SRC_LIST += mpge_led.c
|
|
@@ -40,12 +40,6 @@ endif
|
|
|
|
ifeq (ALL_CHIP, $(CHIP_TYPE))
|
|
SRC_LIST = f1_phy.c f2_phy.c malibu_phy.c
|
|
-ifneq (,$(filter MP, $(SUPPORT_CHIP)))
|
|
- SRC_LIST += mpge_phy.c
|
|
-ifeq (TRUE, $(IN_LED))
|
|
- SRC_LIST += mpge_led.c
|
|
-endif
|
|
-endif
|
|
endif
|
|
|
|
ifeq (NONHK_CHIP, $(CHIP_TYPE))
|
|
--- a/src/hsl/phy/hsl_phy.c
|
|
+++ b/src/hsl/phy/hsl_phy.c
|
|
@@ -28,7 +28,7 @@
|
|
#if defined(ATHENA) ||defined(SHIVA) ||defined(HORUS)
|
|
#include <f2_phy.h>
|
|
#endif
|
|
-#ifdef MP
|
|
+#ifdef IN_MP_PHY
|
|
#include "mpge_phy.h"
|
|
#endif
|
|
#ifdef IN_MALIBU_PHY
|
|
@@ -94,7 +94,7 @@ phy_driver_instance_t ssdk_phy_driver[]
|
|
#else
|
|
{SFP_PHY_CHIP, {0}, NULL, NULL, NULL},
|
|
#endif
|
|
- #ifdef MP
|
|
+ #ifdef IN_MP_PHY
|
|
{MPGE_PHY_CHIP, {0}, NULL, mpge_phy_init, NULL},
|
|
#else
|
|
{MPGE_PHY_CHIP, {0}, NULL, NULL, NULL},
|