Merge "[qca-ssdk]: merge hawkeye all UCI related codes to master"
diff --git a/config b/config
index eda34b4..32f20d0 100755
--- a/config
+++ b/config
@@ -213,3 +213,6 @@
IN_BM=TRUE
IN_SHAPER=TRUE
IN_POLICER=TRUE
+ifneq ($(HK_CHIP), enable)
+CHIP_TYPE=NONHK_CHIP
+endif
diff --git a/make/config.mk b/make/config.mk
index adb85a8..bfb9844 100755
--- a/make/config.mk
+++ b/make/config.mk
@@ -66,6 +66,13 @@
SUPPORT_CHIP = ISIS ISISC SHIVA DESS HPPE
endif
+ ifeq (NONHK_CHIP, $(CHIP_TYPE))
+ ifneq (TRUE, $(FAL))
+ $(error FAL must be TRUE when CHIP_TYPE is defined as ALL_CHIP!)
+ endif
+ SUPPORT_CHIP = ISIS ISISC SHIVA DESS
+ endif
+
ifndef SUPPORT_CHIP
$(error defined CHIP_TYPE isn't supported!)
endif
diff --git a/src/adpt/adpt.c b/src/adpt/adpt.c
index f084afb..9f96a58 100755
--- a/src/adpt/adpt.c
+++ b/src/adpt/adpt.c
@@ -13,8 +13,10 @@
*/
#include "adpt.h"
-#include "adpt_hppe.h"
#include "ssdk_init.h"
+#if defined(HPPE)
+#include "adpt_hppe.h"
+#endif
adpt_api_t *g_adpt_api[SW_MAX_NR_DEV] = {NULL};
ssdk_chip_type g_chip_type = 0;
@@ -27,6 +29,7 @@
return g_adpt_api[dev_id];
}
+#if defined(HPPE)
static sw_error_t adpt_hppe_module_func_register(a_uint32_t dev_id, a_uint32_t module)
{
sw_error_t rv= SW_OK;
@@ -102,7 +105,7 @@
return rv;
}
-
+#endif
sw_error_t adpt_module_func_ctrl_set(a_uint32_t dev_id,
a_uint32_t module, fal_func_ctrl_t *func_ctrl)
@@ -164,14 +167,16 @@
switch (g_chip_type)
{
+ #if defined(HPPE)
case CHIP_HPPE:
rv = adpt_hppe_module_func_register(dev_id, module);
break;
+ #endif
default:
break;
}
- return SW_OK;
+ return rv;
}
sw_error_t adpt_module_func_ctrl_get(a_uint32_t dev_id,
@@ -240,6 +245,7 @@
switch (cfg->chip_type)
{
+ #if defined(HPPE)
case CHIP_HPPE:
g_adpt_api[dev_id] = aos_mem_alloc(sizeof(adpt_api_t));
if(g_adpt_api[dev_id] == NULL)
@@ -335,6 +341,7 @@
rv = adpt_hppe_module_func_register(dev_id, FAL_MODULE_MISC);
SW_RTN_ON_ERROR(rv);
break;
+ #endif
default:
break;
}
@@ -347,6 +354,7 @@
switch (cfg->chip_type)
{
+ #if defined(HPPE)
case CHIP_HPPE:
g_adpt_api[dev_id]->adpt_mirror_func_bitmap = 0;
adpt_hppe_mirror_func_bitmap_init(dev_id);
@@ -453,6 +461,7 @@
SW_RTN_ON_ERROR(rv);
break;
+ #endif
default:
break;
}
diff --git a/src/hsl/Makefile b/src/hsl/Makefile
index f7d2bde..8fabf4c 100755
--- a/src/hsl/Makefile
+++ b/src/hsl/Makefile
@@ -15,6 +15,9 @@
ifeq (ALL_CHIP, $(CHIP_TYPE))
SRC_LIST += hsl_acl.c
endif
+ ifeq (NONHK_CHIP, $(CHIP_TYPE))
+ SRC_LIST += hsl_acl.c
+ endif
endif
ifeq (linux, $(OS))
diff --git a/src/hsl/phy/Makefile b/src/hsl/phy/Makefile
index 7bd5c22..82dbfb8 100755
--- a/src/hsl/phy/Makefile
+++ b/src/hsl/phy/Makefile
@@ -35,6 +35,10 @@
SRC_LIST = f1_phy.c f2_phy.c malibu_phy.c
endif
+ifeq (NONHK_CHIP, $(CHIP_TYPE))
+ SRC_LIST = f1_phy.c f2_phy.c malibu_phy.c
+endif
+
SRC_LIST += hsl_phy.c
ifeq (linux, $(OS))
diff --git a/src/init/ssdk_init.c b/src/init/ssdk_init.c
index e9d05bb..fe73894 100755
--- a/src/init/ssdk_init.c
+++ b/src/init/ssdk_init.c
@@ -91,10 +91,13 @@
#include "fal_rfs.h"
#endif
#endif
+
+#if defined(HPPE)
#include "hppe_reg_access.h"
#include "hppe_fdb_reg.h"
#include "hppe_fdb.h"
#include "hppe_init.h"
+#endif
#include "adpt.h"
@@ -3783,53 +3786,58 @@
ssdk_dev_notifier.priority = 1;
register_netdevice_notifier(&ssdk_dev_notifier);
- #if defined(DESS) || defined(HPPE)
if(ssdk_dt_global.switch_reg_access_mode == HSL_REG_LOCAL_BUS) {
+ #if defined(HPPE)
if(cfg.chip_type == CHIP_HPPE)
{
printk("Initializing HPPE!!\n");
qca_hppe_hw_init(&cfg);
printk("Initializing HPPE Done!!\n");
}
- /*Do Malibu self test to fix packet drop issue firstly*/
- if ((cfg.chip_type == CHIP_DESS) && (ssdk_dt_global.mac_mode == PORT_WRAPPER_PSGMII)) {
- ssdk_psgmii_self_test(A_FALSE, 100, &psgmii_result);
- clear_self_test_config();
+ #endif
+ #if defined(DESS)
+ if(cfg.chip_type == CHIP_DESS)
+ {
+ /*Do Malibu self test to fix packet drop issue firstly*/
+ if ((cfg.chip_type == CHIP_DESS) && (ssdk_dt_global.mac_mode == PORT_WRAPPER_PSGMII)) {
+ ssdk_psgmii_self_test(A_FALSE, 100, &psgmii_result);
+ clear_self_test_config();
+ }
+
+ qca_dess_hw_init(&cfg);
+
+ #if defined (CONFIG_NF_FLOW_COOKIE)
+ #ifdef IN_NAT
+ #ifdef IN_SFE
+ sfe_register_flow_cookie_cb(ssdk_flow_cookie_set);
+ #endif
+ #endif
+ #endif
+
+ #ifdef IN_RFS
+ memset(&rfs_dev, 0, sizeof(rfs_dev));
+ rfs_dev.name = NULL;
+ #ifdef IN_FDB
+ rfs_dev.mac_rule_cb = ssdk_rfs_mac_rule_set;
+ #endif
+ #ifdef IN_IP
+ rfs_dev.ip4_rule_cb = ssdk_rfs_ip4_rule_set;
+ rfs_dev.ip6_rule_cb = ssdk_rfs_ip6_rule_set;
+ #endif
+ rfs_ess_device_register(&rfs_dev);
+ #if defined(CONFIG_RFS_ACCEL)
+ #endif
+ ssdk_inet_notifier.notifier_call = ssdk_inet_event;
+ ssdk_inet_notifier.priority = 1;
+ register_inetaddr_notifier(&ssdk_inet_notifier);
+ #endif
+
+ /* Setup Cpu port for Dakota platform. */
+ switch_cpuport_setup();
}
-
+ #endif
rv = ssdk_switch_register();
- qca_dess_hw_init(&cfg);
-
- #if defined (CONFIG_NF_FLOW_COOKIE)
- #ifdef IN_NAT
- #ifdef IN_SFE
- sfe_register_flow_cookie_cb(ssdk_flow_cookie_set);
- #endif
- #endif
- #endif
-
- #ifdef IN_RFS
- memset(&rfs_dev, 0, sizeof(rfs_dev));
- rfs_dev.name = NULL;
- #ifdef IN_FDB
- rfs_dev.mac_rule_cb = ssdk_rfs_mac_rule_set;
- #endif
- #ifdef IN_IP
- rfs_dev.ip4_rule_cb = ssdk_rfs_ip4_rule_set;
- rfs_dev.ip6_rule_cb = ssdk_rfs_ip6_rule_set;
- #endif
- rfs_ess_device_register(&rfs_dev);
- #if defined(CONFIG_RFS_ACCEL)
- #endif
- ssdk_inet_notifier.notifier_call = ssdk_inet_event;
- ssdk_inet_notifier.priority = 1;
- register_inetaddr_notifier(&ssdk_inet_notifier);
- #endif
-
- /* Setup Cpu port for Dakota platform. */
- switch_cpuport_setup();
}
- #endif
out:
fal_module_func_init(0, &cfg);