Lines Matching refs:txgbe

23 static int txgbe_swnodes_register(struct txgbe *txgbe)
25 struct txgbe_nodes *nodes = &txgbe->nodes;
26 struct pci_dev *pdev = txgbe->wx->pdev;
122 static int txgbe_mdio_pcs_init(struct txgbe *txgbe)
130 wx = txgbe->wx;
154 txgbe->xpcs = xpcs;
163 struct txgbe *txgbe = wx->priv;
166 return &txgbe->xpcs->pcs;
251 static int txgbe_phylink_init(struct txgbe *txgbe)
255 struct wx *wx = txgbe->wx;
270 fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_PHYLINK]);
297 struct txgbe *txgbe = data;
298 struct wx *wx = txgbe->wx;
305 phylink_pcs_change(&txgbe->xpcs->pcs, up);
455 .name = "txgbe-gpio-irq",
466 struct txgbe *txgbe = data;
467 struct wx *wx = txgbe->wx;
475 gc = txgbe->gpio;
496 struct txgbe *txgbe = wx->priv;
505 gc = txgbe->gpio;
521 static int txgbe_gpio_init(struct txgbe *txgbe)
529 wx = txgbe->wx;
547 gc->fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_GPIO]);
562 txgbe->gpio = gc;
567 static int txgbe_clock_register(struct txgbe *txgbe)
569 struct pci_dev *pdev = txgbe->wx->pdev;
587 txgbe->clk = clk;
588 txgbe->clock = clock;
619 static int txgbe_i2c_register(struct txgbe *txgbe)
627 wx = txgbe->wx;
636 info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_I2C]);
646 txgbe->i2c_dev = i2c_dev;
651 static int txgbe_sfp_register(struct txgbe *txgbe)
653 struct pci_dev *pdev = txgbe->wx->pdev;
658 info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_SFP]);
665 txgbe->sfp_dev = sfp_dev;
670 static int txgbe_ext_phy_init(struct txgbe *txgbe)
678 wx = txgbe->wx;
691 snprintf(mii_bus->id, MII_BUS_ID_SIZE, "txgbe-%x",
713 ret = txgbe_phylink_init(txgbe);
722 int txgbe_init_phy(struct txgbe *txgbe)
724 struct wx *wx = txgbe->wx;
727 if (txgbe->wx->media_type == sp_media_copper)
728 return txgbe_ext_phy_init(txgbe);
730 ret = txgbe_swnodes_register(txgbe);
736 ret = txgbe_mdio_pcs_init(txgbe);
742 ret = txgbe_phylink_init(txgbe);
748 ret = txgbe_gpio_init(txgbe);
754 ret = txgbe_clock_register(txgbe);
760 ret = txgbe_i2c_register(txgbe);
766 ret = txgbe_sfp_register(txgbe);
775 platform_device_unregister(txgbe->i2c_dev);
777 clkdev_drop(txgbe->clock);
778 clk_unregister(txgbe->clk);
782 xpcs_destroy(txgbe->xpcs);
784 software_node_unregister_node_group(txgbe->nodes.group);
789 void txgbe_remove_phy(struct txgbe *txgbe)
791 if (txgbe->wx->media_type == sp_media_copper) {
792 phylink_disconnect_phy(txgbe->wx->phylink);
793 phylink_destroy(txgbe->wx->phylink);
797 platform_device_unregister(txgbe->sfp_dev);
798 platform_device_unregister(txgbe->i2c_dev);
799 clkdev_drop(txgbe->clock);
800 clk_unregister(txgbe->clk);
801 phylink_destroy(txgbe->wx->phylink);
802 xpcs_destroy(txgbe->xpcs);
803 software_node_unregister_node_group(txgbe->nodes.group);