Lines Matching refs:pp
428 static void mvreg_write(struct mvneta_port *pp, u32 offset, u32 data) in mvreg_write() argument
430 writel(data, pp->base + offset); in mvreg_write()
434 static u32 mvreg_read(struct mvneta_port *pp, u32 offset) in mvreg_read() argument
436 return readl(pp->base + offset); in mvreg_read()
440 static void mvneta_mib_counters_clear(struct mvneta_port *pp) in mvneta_mib_counters_clear() argument
446 mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i)); in mvneta_mib_counters_clear()
463 static void mvneta_rxq_non_occup_desc_add(struct mvneta_port *pp, in mvneta_rxq_non_occup_desc_add() argument
471 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), in mvneta_rxq_non_occup_desc_add()
477 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), in mvneta_rxq_non_occup_desc_add()
482 static int mvneta_rxq_busy_desc_num_get(struct mvneta_port *pp, in mvneta_rxq_busy_desc_num_get() argument
487 val = mvreg_read(pp, MVNETA_RXQ_STATUS_REG(rxq->id)); in mvneta_rxq_busy_desc_num_get()
494 static void mvneta_rxq_desc_num_update(struct mvneta_port *pp, in mvneta_rxq_desc_num_update() argument
503 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), val); in mvneta_rxq_desc_num_update()
523 mvreg_write(pp, MVNETA_RXQ_STATUS_UPDATE_REG(rxq->id), val); in mvneta_rxq_desc_num_update()
540 static void mvneta_txq_pend_desc_add(struct mvneta_port *pp, in mvneta_txq_pend_desc_add() argument
550 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); in mvneta_txq_pend_desc_add()
564 static void mvneta_rxq_buf_size_set(struct mvneta_port *pp, in mvneta_rxq_buf_size_set() argument
570 val = mvreg_read(pp, MVNETA_RXQ_SIZE_REG(rxq->id)); in mvneta_rxq_buf_size_set()
575 mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), val); in mvneta_rxq_buf_size_set()
578 static int mvneta_port_is_fixed_link(struct mvneta_port *pp) in mvneta_port_is_fixed_link() argument
581 return pp->phyaddr > PHY_MAX_ADDR; in mvneta_port_is_fixed_link()
586 static void mvneta_port_up(struct mvneta_port *pp) in mvneta_port_up() argument
592 mvneta_mib_counters_clear(pp); in mvneta_port_up()
595 struct mvneta_tx_queue *txq = &pp->txqs[queue]; in mvneta_port_up()
599 mvreg_write(pp, MVNETA_TXQ_CMD, q_map); in mvneta_port_up()
604 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; in mvneta_port_up()
608 mvreg_write(pp, MVNETA_RXQ_CMD, q_map); in mvneta_port_up()
612 static void mvneta_port_down(struct mvneta_port *pp) in mvneta_port_down() argument
618 val = mvreg_read(pp, MVNETA_RXQ_CMD) & MVNETA_RXQ_ENABLE_MASK; in mvneta_port_down()
622 mvreg_write(pp, MVNETA_RXQ_CMD, in mvneta_port_down()
629 dev_warn(pp->phydev->dev, in mvneta_port_down()
636 val = mvreg_read(pp, MVNETA_RXQ_CMD); in mvneta_port_down()
642 val = (mvreg_read(pp, MVNETA_TXQ_CMD)) & MVNETA_TXQ_ENABLE_MASK; in mvneta_port_down()
645 mvreg_write(pp, MVNETA_TXQ_CMD, in mvneta_port_down()
652 dev_warn(pp->phydev->dev, in mvneta_port_down()
660 val = mvreg_read(pp, MVNETA_TXQ_CMD); in mvneta_port_down()
668 dev_warn(pp->phydev->dev, in mvneta_port_down()
675 val = mvreg_read(pp, MVNETA_PORT_STATUS); in mvneta_port_down()
683 static void mvneta_port_enable(struct mvneta_port *pp) in mvneta_port_enable() argument
688 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); in mvneta_port_enable()
690 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); in mvneta_port_enable()
694 static void mvneta_port_disable(struct mvneta_port *pp) in mvneta_port_disable() argument
699 val = mvreg_read(pp, MVNETA_GMAC_CTRL_0); in mvneta_port_disable()
701 mvreg_write(pp, MVNETA_GMAC_CTRL_0, val); in mvneta_port_disable()
709 static void mvneta_set_ucast_table(struct mvneta_port *pp, int queue) in mvneta_set_ucast_table() argument
722 mvreg_write(pp, MVNETA_DA_FILT_UCAST_BASE + offset, val); in mvneta_set_ucast_table()
726 static void mvneta_set_special_mcast_table(struct mvneta_port *pp, int queue) in mvneta_set_special_mcast_table() argument
739 mvreg_write(pp, MVNETA_DA_FILT_SPEC_MCAST + offset, val); in mvneta_set_special_mcast_table()
743 static void mvneta_set_other_mcast_table(struct mvneta_port *pp, int queue) in mvneta_set_other_mcast_table() argument
749 memset(pp->mcast_count, 0, sizeof(pp->mcast_count)); in mvneta_set_other_mcast_table()
752 memset(pp->mcast_count, 1, sizeof(pp->mcast_count)); in mvneta_set_other_mcast_table()
758 mvreg_write(pp, MVNETA_DA_FILT_OTH_MCAST + offset, val); in mvneta_set_other_mcast_table()
770 static void mvneta_defaults_set(struct mvneta_port *pp) in mvneta_defaults_set() argument
777 mvreg_write(pp, MVNETA_INTR_NEW_CAUSE, 0); in mvneta_defaults_set()
778 mvreg_write(pp, MVNETA_INTR_OLD_CAUSE, 0); in mvneta_defaults_set()
779 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0); in mvneta_defaults_set()
782 mvreg_write(pp, MVNETA_INTR_NEW_MASK, 0); in mvneta_defaults_set()
783 mvreg_write(pp, MVNETA_INTR_OLD_MASK, 0); in mvneta_defaults_set()
784 mvreg_write(pp, MVNETA_INTR_MISC_MASK, 0); in mvneta_defaults_set()
785 mvreg_write(pp, MVNETA_INTR_ENABLE, 0); in mvneta_defaults_set()
788 mvreg_write(pp, MVNETA_MBUS_RETRY, 0x20); in mvneta_defaults_set()
794 mvreg_write(pp, MVNETA_CPU_MAP(cpu), in mvneta_defaults_set()
799 mvreg_write(pp, MVNETA_PORT_RX_RESET, MVNETA_PORT_RX_DMA_RESET); in mvneta_defaults_set()
800 mvreg_write(pp, MVNETA_PORT_TX_RESET, MVNETA_PORT_TX_DMA_RESET); in mvneta_defaults_set()
803 mvreg_write(pp, MVNETA_TXQ_CMD_1, 0); in mvneta_defaults_set()
805 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(queue), 0); in mvneta_defaults_set()
806 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(queue), 0); in mvneta_defaults_set()
809 mvreg_write(pp, MVNETA_PORT_TX_RESET, 0); in mvneta_defaults_set()
810 mvreg_write(pp, MVNETA_PORT_RX_RESET, 0); in mvneta_defaults_set()
814 mvreg_write(pp, MVNETA_ACC_MODE, val); in mvneta_defaults_set()
818 mvreg_write(pp, MVNETA_PORT_CONFIG, val); in mvneta_defaults_set()
821 mvreg_write(pp, MVNETA_PORT_CONFIG_EXTEND, val); in mvneta_defaults_set()
822 mvreg_write(pp, MVNETA_RX_MIN_FRAME_SIZE, 64); in mvneta_defaults_set()
833 mvreg_write(pp, MVNETA_SDMA_CONFIG, val); in mvneta_defaults_set()
836 if (!mvneta_port_is_fixed_link(pp)) { in mvneta_defaults_set()
837 val = mvreg_read(pp, MVNETA_UNIT_CONTROL); in mvneta_defaults_set()
839 mvreg_write(pp, MVNETA_UNIT_CONTROL, val); in mvneta_defaults_set()
842 mvneta_set_ucast_table(pp, -1); in mvneta_defaults_set()
843 mvneta_set_special_mcast_table(pp, -1); in mvneta_defaults_set()
844 mvneta_set_other_mcast_table(pp, -1); in mvneta_defaults_set()
848 static void mvneta_set_ucast_addr(struct mvneta_port *pp, u8 last_nibble, in mvneta_set_ucast_addr() argument
864 unicast_reg = mvreg_read(pp, (MVNETA_DA_FILT_UCAST_BASE + tbl_offset)); in mvneta_set_ucast_addr()
874 mvreg_write(pp, (MVNETA_DA_FILT_UCAST_BASE + tbl_offset), unicast_reg); in mvneta_set_ucast_addr()
878 static void mvneta_mac_addr_set(struct mvneta_port *pp, unsigned char *addr, in mvneta_mac_addr_set() argument
889 mvreg_write(pp, MVNETA_MAC_ADDR_LOW, mac_l); in mvneta_mac_addr_set()
890 mvreg_write(pp, MVNETA_MAC_ADDR_HIGH, mac_h); in mvneta_mac_addr_set()
894 mvneta_set_ucast_addr(pp, addr[5], queue); in mvneta_mac_addr_set()
915 static void mvneta_txq_sent_desc_dec(struct mvneta_port *pp, in mvneta_txq_sent_desc_dec() argument
924 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); in mvneta_txq_sent_desc_dec()
929 mvreg_write(pp, MVNETA_TXQ_UPDATE_REG(txq->id), val); in mvneta_txq_sent_desc_dec()
933 static int mvneta_txq_sent_desc_num_get(struct mvneta_port *pp, in mvneta_txq_sent_desc_num_get() argument
939 val = mvreg_read(pp, MVNETA_TXQ_STATUS_REG(txq->id)); in mvneta_txq_sent_desc_num_get()
947 static void mvneta_rx_error(struct mvneta_port *pp, in mvneta_rx_error() argument
953 dev_err(pp->phydev->dev, in mvneta_rx_error()
961 dev_err(pp->phydev->dev, in mvneta_rx_error()
966 dev_err(pp->phydev->dev, in mvneta_rx_error()
971 dev_err(pp->phydev->dev, in mvneta_rx_error()
976 dev_err(pp->phydev->dev, in mvneta_rx_error()
983 static struct mvneta_rx_queue *mvneta_rxq_handle_get(struct mvneta_port *pp, in mvneta_rxq_handle_get() argument
986 return &pp->rxqs[rxq]; in mvneta_rxq_handle_get()
991 static void mvneta_rxq_drop_pkts(struct mvneta_port *pp, in mvneta_rxq_drop_pkts() argument
996 rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); in mvneta_rxq_drop_pkts()
998 mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done); in mvneta_rxq_drop_pkts()
1002 static int mvneta_rxq_fill(struct mvneta_port *pp, struct mvneta_rx_queue *rxq, in mvneta_rxq_fill() argument
1018 mvneta_rxq_non_occup_desc_add(pp, rxq, i); in mvneta_rxq_fill()
1026 static int mvneta_rxq_init(struct mvneta_port *pp, in mvneta_rxq_init() argument
1030 rxq->size = pp->rx_ring_size; in mvneta_rxq_init()
1042 mvreg_write(pp, MVNETA_RXQ_BASE_ADDR_REG(rxq->id), rxq->descs_phys); in mvneta_rxq_init()
1043 mvreg_write(pp, MVNETA_RXQ_SIZE_REG(rxq->id), rxq->size); in mvneta_rxq_init()
1046 mvneta_rxq_buf_size_set(pp, rxq, RX_BUFFER_SIZE); in mvneta_rxq_init()
1047 mvneta_rxq_fill(pp, rxq, rxq->size); in mvneta_rxq_init()
1053 static void mvneta_rxq_deinit(struct mvneta_port *pp, in mvneta_rxq_deinit() argument
1056 mvneta_rxq_drop_pkts(pp, rxq); in mvneta_rxq_deinit()
1065 static int mvneta_txq_init(struct mvneta_port *pp, in mvneta_txq_init() argument
1068 txq->size = pp->tx_ring_size; in mvneta_txq_init()
1080 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(txq->id), 0x03ffffff); in mvneta_txq_init()
1081 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(txq->id), 0x3fffffff); in mvneta_txq_init()
1084 mvreg_write(pp, MVNETA_TXQ_BASE_ADDR_REG(txq->id), txq->descs_phys); in mvneta_txq_init()
1085 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), txq->size); in mvneta_txq_init()
1091 static void mvneta_txq_deinit(struct mvneta_port *pp, in mvneta_txq_deinit() argument
1100 mvreg_write(pp, MVETH_TXQ_TOKEN_CFG_REG(txq->id), 0); in mvneta_txq_deinit()
1101 mvreg_write(pp, MVETH_TXQ_TOKEN_COUNT_REG(txq->id), 0); in mvneta_txq_deinit()
1104 mvreg_write(pp, MVNETA_TXQ_BASE_ADDR_REG(txq->id), 0); in mvneta_txq_deinit()
1105 mvreg_write(pp, MVNETA_TXQ_SIZE_REG(txq->id), 0); in mvneta_txq_deinit()
1109 static void mvneta_cleanup_txqs(struct mvneta_port *pp) in mvneta_cleanup_txqs() argument
1114 mvneta_txq_deinit(pp, &pp->txqs[queue]); in mvneta_cleanup_txqs()
1118 static void mvneta_cleanup_rxqs(struct mvneta_port *pp) in mvneta_cleanup_rxqs() argument
1123 mvneta_rxq_deinit(pp, &pp->rxqs[queue]); in mvneta_cleanup_rxqs()
1128 static int mvneta_setup_rxqs(struct mvneta_port *pp) in mvneta_setup_rxqs() argument
1133 int err = mvneta_rxq_init(pp, &pp->rxqs[queue]); in mvneta_setup_rxqs()
1135 dev_err(pp->phydev->dev, "%s: can't create rxq=%d\n", in mvneta_setup_rxqs()
1137 mvneta_cleanup_rxqs(pp); in mvneta_setup_rxqs()
1146 static int mvneta_setup_txqs(struct mvneta_port *pp) in mvneta_setup_txqs() argument
1151 int err = mvneta_txq_init(pp, &pp->txqs[queue]); in mvneta_setup_txqs()
1153 dev_err(pp->phydev->dev, "%s: can't create txq=%d\n", in mvneta_setup_txqs()
1155 mvneta_cleanup_txqs(pp); in mvneta_setup_txqs()
1163 static void mvneta_start_dev(struct mvneta_port *pp) in mvneta_start_dev() argument
1166 mvneta_port_enable(pp); in mvneta_start_dev()
1171 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_adjust_link() local
1172 struct phy_device *phydev = pp->phydev; in mvneta_adjust_link()
1175 if (mvneta_port_is_fixed_link(pp)) { in mvneta_adjust_link()
1181 if ((pp->speed != phydev->speed) || in mvneta_adjust_link()
1182 (pp->duplex != phydev->duplex)) { in mvneta_adjust_link()
1185 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); in mvneta_adjust_link()
1200 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); in mvneta_adjust_link()
1202 pp->duplex = phydev->duplex; in mvneta_adjust_link()
1203 pp->speed = phydev->speed; in mvneta_adjust_link()
1207 if (phydev->link != pp->link) { in mvneta_adjust_link()
1209 pp->duplex = -1; in mvneta_adjust_link()
1210 pp->speed = 0; in mvneta_adjust_link()
1213 pp->link = phydev->link; in mvneta_adjust_link()
1219 u32 val = mvreg_read(pp, MVNETA_GMAC_AUTONEG_CONFIG); in mvneta_adjust_link()
1222 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); in mvneta_adjust_link()
1223 mvneta_port_up(pp); in mvneta_adjust_link()
1225 mvneta_port_down(pp); in mvneta_adjust_link()
1232 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_open() local
1235 ret = mvneta_setup_rxqs(pp); in mvneta_open()
1239 ret = mvneta_setup_txqs(pp); in mvneta_open()
1245 mvneta_start_dev(pp); in mvneta_open()
1251 static int mvneta_init2(struct mvneta_port *pp) in mvneta_init2() argument
1256 mvneta_port_disable(pp); in mvneta_init2()
1259 mvneta_defaults_set(pp); in mvneta_init2()
1261 pp->txqs = kzalloc(txq_number * sizeof(struct mvneta_tx_queue), in mvneta_init2()
1263 if (!pp->txqs) in mvneta_init2()
1267 pp->txqs[0].descs = buffer_loc.tx_descs; in mvneta_init2()
1271 struct mvneta_tx_queue *txq = &pp->txqs[queue]; in mvneta_init2()
1273 txq->size = pp->tx_ring_size; in mvneta_init2()
1276 pp->rxqs = kzalloc(rxq_number * sizeof(struct mvneta_rx_queue), in mvneta_init2()
1278 if (!pp->rxqs) { in mvneta_init2()
1279 kfree(pp->txqs); in mvneta_init2()
1284 pp->rxqs[0].descs = buffer_loc.rx_descs; in mvneta_init2()
1288 struct mvneta_rx_queue *rxq = &pp->rxqs[queue]; in mvneta_init2()
1290 rxq->size = pp->rx_ring_size; in mvneta_init2()
1306 static void mvneta_bypass_mbus_windows(struct mvneta_port *pp) in mvneta_bypass_mbus_windows() argument
1312 mvreg_write(pp, MVNETA_WIN_SIZE(0), MVNETA_WIN_SIZE_MASK); in mvneta_bypass_mbus_windows()
1315 clrbits_le32(pp->base + MVNETA_BASE_ADDR_ENABLE, in mvneta_bypass_mbus_windows()
1319 setbits_le32(pp->base + MVNETA_PORT_ACCESS_PROTECT, in mvneta_bypass_mbus_windows()
1323 static void mvneta_conf_mbus_windows(struct mvneta_port *pp) in mvneta_conf_mbus_windows() argument
1332 mvreg_write(pp, MVNETA_WIN_BASE(i), 0); in mvneta_conf_mbus_windows()
1333 mvreg_write(pp, MVNETA_WIN_SIZE(i), 0); in mvneta_conf_mbus_windows()
1336 mvreg_write(pp, MVNETA_WIN_REMAP(i), 0); in mvneta_conf_mbus_windows()
1344 mvreg_write(pp, MVNETA_WIN_BASE(i), (cs->base & 0xffff0000) | in mvneta_conf_mbus_windows()
1347 mvreg_write(pp, MVNETA_WIN_SIZE(i), in mvneta_conf_mbus_windows()
1354 mvreg_write(pp, MVNETA_BASE_ADDR_ENABLE, win_enable); in mvneta_conf_mbus_windows()
1358 static int mvneta_port_power_up(struct mvneta_port *pp, int phy_mode) in mvneta_port_power_up() argument
1363 mvreg_write(pp, MVNETA_UNIT_INTR_CAUSE, 0); in mvneta_port_power_up()
1365 ctrl = mvreg_read(pp, MVNETA_GMAC_CTRL_2); in mvneta_port_power_up()
1372 mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_QSGMII_SERDES_PROTO); in mvneta_port_power_up()
1376 mvreg_write(pp, MVNETA_SERDES_CFG, MVNETA_SGMII_SERDES_PROTO); in mvneta_port_power_up()
1389 mvreg_write(pp, MVNETA_GMAC_CTRL_2, ctrl); in mvneta_port_power_up()
1391 while ((mvreg_read(pp, MVNETA_GMAC_CTRL_2) & in mvneta_port_power_up()
1402 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_init() local
1405 pp->tx_ring_size = MVNETA_MAX_TXD; in mvneta_init()
1406 pp->rx_ring_size = MVNETA_MAX_RXD; in mvneta_init()
1408 err = mvneta_init2(pp); in mvneta_init()
1414 mvneta_mac_addr_set(pp, pdata->enetaddr, rxq_def); in mvneta_init()
1416 err = mvneta_port_power_up(pp, pp->phy_interface); in mvneta_init()
1432 static int smi_wait_ready(struct mvneta_port *pp) in smi_wait_ready() argument
1440 smi_reg = mvreg_read(pp, MVNETA_SMI); in smi_wait_ready()
1457 struct mvneta_port *pp = bus->priv; in mvneta_mdio_read() local
1473 if (smi_wait_ready(pp) < 0) in mvneta_mdio_read()
1482 mvreg_write(pp, MVNETA_SMI, smi_reg); in mvneta_mdio_read()
1489 smi_reg = mvreg_read(pp, MVNETA_SMI); in mvneta_mdio_read()
1500 return mvreg_read(pp, MVNETA_SMI) & MVNETA_SMI_DATA_MASK; in mvneta_mdio_read()
1512 struct mvneta_port *pp = bus->priv; in mvneta_mdio_write() local
1527 if (smi_wait_ready(pp) < 0) in mvneta_mdio_write()
1537 mvreg_write(pp, MVNETA_SMI, smi_reg); in mvneta_mdio_write()
1544 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_start() local
1547 mvneta_port_power_up(pp, pp->phy_interface); in mvneta_start()
1549 if (!pp->init || pp->link == 0) { in mvneta_start()
1550 if (mvneta_port_is_fixed_link(pp)) { in mvneta_start()
1553 pp->init = 1; in mvneta_start()
1554 pp->link = 1; in mvneta_start()
1563 if (pp->duplex) in mvneta_start()
1566 if (pp->speed == SPEED_1000) in mvneta_start()
1568 else if (pp->speed == SPEED_100) in mvneta_start()
1571 mvreg_write(pp, MVNETA_GMAC_AUTONEG_CONFIG, val); in mvneta_start()
1574 mvreg_write(pp, MVNETA_PHY_ADDR, pp->phyaddr); in mvneta_start()
1576 phydev = phy_connect(pp->bus, pp->phyaddr, dev, in mvneta_start()
1577 pp->phy_interface); in mvneta_start()
1583 pp->phydev = phydev; in mvneta_start()
1593 pp->init = 1; in mvneta_start()
1599 mvneta_port_up(pp); in mvneta_start()
1600 mvneta_port_enable(pp); in mvneta_start()
1607 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_send() local
1608 struct mvneta_tx_queue *txq = &pp->txqs[0]; in mvneta_send()
1623 mvneta_txq_pend_desc_add(pp, txq, 1); in mvneta_send()
1626 sent_desc = mvneta_txq_sent_desc_num_get(pp, txq); in mvneta_send()
1632 sent_desc = mvneta_txq_sent_desc_num_get(pp, txq); in mvneta_send()
1636 mvneta_txq_sent_desc_dec(pp, txq, sent_desc); in mvneta_send()
1643 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_recv() local
1649 rxq = mvneta_rxq_handle_get(pp, rxq_def); in mvneta_recv()
1650 rx_done = mvneta_rxq_busy_desc_num_get(pp, rxq); in mvneta_recv()
1666 mvneta_rx_error(pp, rx_desc); in mvneta_recv()
1686 mvneta_rxq_desc_num_update(pp, rxq, 1, 1); in mvneta_recv()
1695 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_probe() local
1728 pp->base = (void __iomem *)pdata->iobase; in mvneta_probe()
1732 mvneta_bypass_mbus_windows(pp); in mvneta_probe()
1734 mvneta_conf_mbus_windows(pp); in mvneta_probe()
1737 pp->phy_interface = pdata->phy_interface; in mvneta_probe()
1743 pp->phyaddr = PHY_MAX_ADDR + 1; in mvneta_probe()
1744 pp->duplex = fdtdec_get_bool(blob, fl_node, "full-duplex"); in mvneta_probe()
1745 pp->speed = fdtdec_get_int(blob, fl_node, "speed", 0); in mvneta_probe()
1750 pp->phyaddr = fdtdec_get_int(blob, addr, "reg", 0); in mvneta_probe()
1762 bus->priv = (void *)pp; in mvneta_probe()
1763 pp->bus = bus; in mvneta_probe()
1771 &pp->phy_reset_gpio, GPIOD_IS_OUT); in mvneta_probe()
1773 if (dm_gpio_is_valid(&pp->phy_reset_gpio)) { in mvneta_probe()
1774 dm_gpio_set_value(&pp->phy_reset_gpio, 1); in mvneta_probe()
1776 dm_gpio_set_value(&pp->phy_reset_gpio, 0); in mvneta_probe()
1785 struct mvneta_port *pp = dev_get_priv(dev); in mvneta_stop() local
1787 mvneta_port_down(pp); in mvneta_stop()
1788 mvneta_port_disable(pp); in mvneta_stop()