Lines Matching refs:eth_priv
192 struct eth_priv_t *eth_priv = (struct eth_priv_t *)dev->priv; in keystone2_eth_gigabit_enable() local
195 data = keystone2_mdio_read(mdio_bus, eth_priv->phy_addr, in keystone2_eth_gigabit_enable()
206 writel(readl(DEVICE_EMACSL_BASE(eth_priv->slave_port - 1) + in keystone2_eth_gigabit_enable()
209 DEVICE_EMACSL_BASE(eth_priv->slave_port - 1) + CPGMACSL_REG_CTL); in keystone2_eth_gigabit_enable()
504 struct eth_priv_t *eth_priv; in keystone2_eth_read_mac_addr() local
508 eth_priv = (struct eth_priv_t *)dev->priv; in keystone2_eth_read_mac_addr()
511 if (eth_priv->slave_port == 1) { in keystone2_eth_read_mac_addr()
538 struct eth_priv_t *eth_priv = (struct eth_priv_t *)dev->priv; in keystone2_eth_open() local
539 struct phy_device *phy_dev = eth_priv->phy_dev; in keystone2_eth_open()
543 net_rx_buffs.rx_flow = eth_priv->rx_flow; in keystone2_eth_open()
546 (eth_priv->sgmii_link_type == SGMII_LINK_MAC_PHY) ? 1 : 0; in keystone2_eth_open()
554 keystone_sgmii_config(phy_dev, eth_priv->slave_port - 1, in keystone2_eth_open()
555 eth_priv->sgmii_link_type); in keystone2_eth_open()
606 struct eth_priv_t *eth_priv = (struct eth_priv_t *)dev->priv; in keystone2_eth_close() local
607 struct phy_device *phy_dev = eth_priv->phy_dev; in keystone2_eth_close()
633 struct eth_priv_t *eth_priv = (struct eth_priv_t *)dev->priv; in keystone2_eth_send_packet() local
634 struct phy_device *phy_dev = eth_priv->phy_dev; in keystone2_eth_send_packet()
640 if (cpmac_drv_send((u32 *)packet, length, eth_priv->slave_port) != 0) in keystone2_eth_send_packet()
676 int keystone2_emac_initialize(struct eth_priv_t *eth_priv) in keystone2_emac_initialize() argument
689 strcpy(dev->name, eth_priv->int_name); in keystone2_emac_initialize()
690 dev->priv = eth_priv; in keystone2_emac_initialize()
725 phy_dev = phy_connect(mdio_bus, eth_priv->phy_addr, in keystone2_emac_initialize()
726 dev, eth_priv->phy_if); in keystone2_emac_initialize()
729 phy_dev = phy_find_by_mask(mdio_bus, 1 << eth_priv->phy_addr, in keystone2_emac_initialize()
730 eth_priv->phy_if); in keystone2_emac_initialize()
733 eth_priv->phy_dev = phy_dev; in keystone2_emac_initialize()