Lines Matching refs:mac_dev

702 	struct mac_device *mac_dev = fman_config_to_mac(config);  in memac_mac_config()  local
703 struct memac_regs __iomem *regs = mac_dev->fman_mac->regs; in memac_mac_config()
717 struct mac_device *mac_dev = fman_config_to_mac(config); in memac_link_up() local
718 struct fman_mac *memac = mac_dev->fman_mac; in memac_link_up()
758 mac_dev->update_speed(mac_dev, speed); in memac_link_up()
1002 static struct fman_mac *memac_config(struct mac_device *mac_dev, in memac_config() argument
1025 memac->addr = ENET_ADDR_TO_UINT64(mac_dev->addr); in memac_config()
1027 memac->regs = mac_dev->vaddr; in memac_config()
1033 memac->dev_id = mac_dev; in memac_config()
1064 static bool memac_supports(struct mac_device *mac_dev, phy_interface_t iface) in memac_supports() argument
1069 if (!mac_dev->fman_mac->serdes) in memac_supports()
1070 return mac_dev->phy_if == iface; in memac_supports()
1072 return !phy_validate(mac_dev->fman_mac->serdes, PHY_MODE_ETHERNET, in memac_supports()
1076 int memac_initialization(struct mac_device *mac_dev, in memac_initialization() argument
1087 mac_dev->phylink_ops = &memac_mac_ops; in memac_initialization()
1088 mac_dev->set_promisc = memac_set_promiscuous; in memac_initialization()
1089 mac_dev->change_addr = memac_modify_mac_address; in memac_initialization()
1090 mac_dev->add_hash_mac_addr = memac_add_hash_mac_address; in memac_initialization()
1091 mac_dev->remove_hash_mac_addr = memac_del_hash_mac_address; in memac_initialization()
1092 mac_dev->set_exception = memac_set_exception; in memac_initialization()
1093 mac_dev->set_allmulti = memac_set_allmulti; in memac_initialization()
1094 mac_dev->set_tstamp = memac_set_tstamp; in memac_initialization()
1095 mac_dev->set_multi = fman_set_multi; in memac_initialization()
1096 mac_dev->enable = memac_enable; in memac_initialization()
1097 mac_dev->disable = memac_disable; in memac_initialization()
1099 mac_dev->fman_mac = memac_config(mac_dev, params); in memac_initialization()
1100 if (!mac_dev->fman_mac) in memac_initialization()
1103 memac = mac_dev->fman_mac; in memac_initialization()
1112 dev_err_probe(mac_dev->dev, err, "missing xfi pcs\n"); in memac_initialization()
1124 dev_err_probe(mac_dev->dev, err, in memac_initialization()
1145 dev_err_probe(mac_dev->dev, err, "missing pcs\n"); in memac_initialization()
1153 if (err && mac_dev->phy_if == PHY_INTERFACE_MODE_XGMII) in memac_initialization()
1158 memac->serdes = devm_of_phy_optional_get(mac_dev->dev, mac_node, in memac_initialization()
1161 dev_dbg(mac_dev->dev, "could not get (optional) serdes\n"); in memac_initialization()
1172 if (mac_dev->phy_if == PHY_INTERFACE_MODE_XGMII) in memac_initialization()
1173 mac_dev->phy_if = PHY_INTERFACE_MODE_10GBASER; in memac_initialization()
1181 supported = mac_dev->phylink_config.supported_interfaces; in memac_initialization()
1186 (memac_supports(mac_dev, PHY_INTERFACE_MODE_SGMII) || in memac_initialization()
1187 memac_supports(mac_dev, PHY_INTERFACE_MODE_1000BASEX))) { in memac_initialization()
1193 memac_supports(mac_dev, PHY_INTERFACE_MODE_2500BASEX)) in memac_initialization()
1197 memac_supports(mac_dev, PHY_INTERFACE_MODE_QSGMII)) in memac_initialization()
1199 else if (mac_dev->phy_if == PHY_INTERFACE_MODE_QSGMII) in memac_initialization()
1200 dev_warn(mac_dev->dev, "no QSGMII pcs specified\n"); in memac_initialization()
1203 memac_supports(mac_dev, PHY_INTERFACE_MODE_10GBASER)) { in memac_initialization()
1223 mac_dev->phylink_config.mac_capabilities = capabilities; in memac_initialization()
1245 mac_dev->phy_if != PHY_INTERFACE_MODE_MII && in memac_initialization()
1246 !phy_interface_mode_is_rgmii(mac_dev->phy_if)) in memac_initialization()
1247 mac_dev->phylink_config.ovr_an_inband = true; in memac_initialization()
1250 err = memac_init(mac_dev->fman_mac); in memac_initialization()
1254 dev_info(mac_dev->dev, "FMan MEMAC\n"); in memac_initialization()
1259 memac_free(mac_dev->fman_mac); in memac_initialization()