@@ -263,7 +263,7 @@ fman_if_init(const struct device_node *dpa_node)
fman_dealloc_bufs_mask_hi = 0;
fman_dealloc_bufs_mask_lo = 0;
}
- /* Is the MAC node 1G, 10G? */
+ /* Is the MAC node 1G, 2.5G, 10G? */
__if->__if.is_memac = 0;
if (of_device_is_compatible(mac_node, "fsl,fman-1g-mac"))
@@ -279,7 +279,9 @@ fman_if_init(const struct device_node *dpa_node)
/* Right now forcing memac to 1g in case of error*/
__if->__if.mac_type = fman_mac_1g;
} else {
- if (strstr(char_prop, "sgmii"))
+ if (strstr(char_prop, "sgmii-2500"))
+ __if->__if.mac_type = fman_mac_2_5g;
+ else if (strstr(char_prop, "sgmii"))
__if->__if.mac_type = fman_mac_1g;
else if (strstr(char_prop, "rgmii")) {
__if->__if.mac_type = fman_mac_1g;
@@ -44,7 +44,8 @@ dump_netcfg(struct netcfg_info *cfg_ptr)
printf("\n+ Fman %d, MAC %d (%s);\n",
__if->fman_idx, __if->mac_idx,
- (__if->mac_type == fman_mac_1g) ? "1G" : "10G");
+ (__if->mac_type == fman_mac_1g) ? "1G" :
+ (__if->mac_type == fman_mac_2_5g) ? "2.5G" : "10G");
printf("\tmac_addr: %02x:%02x:%02x:%02x:%02x:%02x\n",
(&__if->mac_addr)->addr_bytes[0],
@@ -71,6 +71,7 @@ TAILQ_HEAD(rte_fman_if_list, __fman_if);
enum fman_mac_type {
fman_offline = 0,
fman_mac_1g,
+ fman_mac_2_5g,
fman_mac_10g,
};
@@ -356,8 +356,13 @@ static int dpaa_eth_dev_info(struct rte_eth_dev *dev,
if (dpaa_intf->fif->mac_type == fman_mac_1g) {
dev_info->speed_capa = ETH_LINK_SPEED_1G;
+ } else if (dpaa_intf->fif->mac_type == fman_mac_2_5g) {
+ dev_info->speed_capa = ETH_LINK_SPEED_1G
+ | ETH_LINK_SPEED_2_5G;
} else if (dpaa_intf->fif->mac_type == fman_mac_10g) {
- dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G);
+ dev_info->speed_capa = ETH_LINK_SPEED_1G
+ | ETH_LINK_SPEED_2_5G
+ | ETH_LINK_SPEED_10G;
} else {
DPAA_PMD_ERR("invalid link_speed: %s, %d",
dpaa_intf->name, dpaa_intf->fif->mac_type);
@@ -384,6 +389,8 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev,
if (dpaa_intf->fif->mac_type == fman_mac_1g)
link->link_speed = ETH_SPEED_NUM_1G;
+ else if (dpaa_intf->fif->mac_type == fman_mac_2_5g)
+ link->link_speed = ETH_SPEED_NUM_2_5G;
else if (dpaa_intf->fif->mac_type == fman_mac_10g)
link->link_speed = ETH_SPEED_NUM_10G;
else