fep 282 arch/mips/include/asm/octeon/cvmx-pciercx-defs.h __BITFIELD_FIELD(uint32_t fep:5, fep 671 drivers/media/dvb-frontends/dib3000mc.c struct dtv_frontend_properties *fep) fep 676 drivers/media/dvb-frontends/dib3000mc.c fep->inversion = INVERSION_AUTO; fep 678 drivers/media/dvb-frontends/dib3000mc.c fep->bandwidth_hz = state->current_bandwidth; fep 681 drivers/media/dvb-frontends/dib3000mc.c case 0: fep->transmission_mode = TRANSMISSION_MODE_2K; break; fep 682 drivers/media/dvb-frontends/dib3000mc.c case 1: fep->transmission_mode = TRANSMISSION_MODE_8K; break; fep 686 drivers/media/dvb-frontends/dib3000mc.c case 0: fep->guard_interval = GUARD_INTERVAL_1_32; break; fep 687 drivers/media/dvb-frontends/dib3000mc.c case 1: fep->guard_interval = GUARD_INTERVAL_1_16; break; fep 688 drivers/media/dvb-frontends/dib3000mc.c case 2: fep->guard_interval = GUARD_INTERVAL_1_8; break; fep 689 drivers/media/dvb-frontends/dib3000mc.c case 3: fep->guard_interval = GUARD_INTERVAL_1_4; break; fep 693 drivers/media/dvb-frontends/dib3000mc.c case 0: fep->modulation = QPSK; break; fep 694 drivers/media/dvb-frontends/dib3000mc.c case 1: fep->modulation = QAM_16; break; fep 696 drivers/media/dvb-frontends/dib3000mc.c default: fep->modulation = QAM_64; break; fep 702 drivers/media/dvb-frontends/dib3000mc.c fep->hierarchy = HIERARCHY_NONE; fep 704 drivers/media/dvb-frontends/dib3000mc.c case 1: fep->code_rate_HP = FEC_1_2; break; fep 705 drivers/media/dvb-frontends/dib3000mc.c case 2: fep->code_rate_HP = FEC_2_3; break; fep 706 drivers/media/dvb-frontends/dib3000mc.c case 3: fep->code_rate_HP = FEC_3_4; break; fep 707 drivers/media/dvb-frontends/dib3000mc.c case 5: fep->code_rate_HP = FEC_5_6; break; fep 709 drivers/media/dvb-frontends/dib3000mc.c default: fep->code_rate_HP = FEC_7_8; break; fep 714 drivers/media/dvb-frontends/dib3000mc.c case 1: fep->code_rate_LP = FEC_1_2; break; fep 715 drivers/media/dvb-frontends/dib3000mc.c case 2: fep->code_rate_LP = FEC_2_3; break; fep 716 drivers/media/dvb-frontends/dib3000mc.c case 3: fep->code_rate_LP = FEC_3_4; break; fep 717 drivers/media/dvb-frontends/dib3000mc.c case 5: fep->code_rate_LP = FEC_5_6; break; fep 719 drivers/media/dvb-frontends/dib3000mc.c default: fep->code_rate_LP = FEC_7_8; break; fep 727 drivers/media/dvb-frontends/dib3000mc.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 733 drivers/media/dvb-frontends/dib3000mc.c state->current_bandwidth = fep->bandwidth_hz; fep 734 drivers/media/dvb-frontends/dib3000mc.c dib3000mc_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->bandwidth_hz)); fep 744 drivers/media/dvb-frontends/dib3000mc.c if (fep->transmission_mode == TRANSMISSION_MODE_AUTO || fep 745 drivers/media/dvb-frontends/dib3000mc.c fep->guard_interval == GUARD_INTERVAL_AUTO || fep 746 drivers/media/dvb-frontends/dib3000mc.c fep->modulation == QAM_AUTO || fep 747 drivers/media/dvb-frontends/dib3000mc.c fep->code_rate_HP == FEC_AUTO) { fep 760 drivers/media/dvb-frontends/dib3000mc.c dib3000mc_get_frontend(fe, fep); fep 1159 drivers/media/dvb-frontends/dib7000m.c struct dtv_frontend_properties *fep) fep 1164 drivers/media/dvb-frontends/dib7000m.c fep->inversion = INVERSION_AUTO; fep 1166 drivers/media/dvb-frontends/dib7000m.c fep->bandwidth_hz = BANDWIDTH_TO_HZ(state->current_bandwidth); fep 1169 drivers/media/dvb-frontends/dib7000m.c case 0: fep->transmission_mode = TRANSMISSION_MODE_2K; break; fep 1170 drivers/media/dvb-frontends/dib7000m.c case 1: fep->transmission_mode = TRANSMISSION_MODE_8K; break; fep 1175 drivers/media/dvb-frontends/dib7000m.c case 0: fep->guard_interval = GUARD_INTERVAL_1_32; break; fep 1176 drivers/media/dvb-frontends/dib7000m.c case 1: fep->guard_interval = GUARD_INTERVAL_1_16; break; fep 1177 drivers/media/dvb-frontends/dib7000m.c case 2: fep->guard_interval = GUARD_INTERVAL_1_8; break; fep 1178 drivers/media/dvb-frontends/dib7000m.c case 3: fep->guard_interval = GUARD_INTERVAL_1_4; break; fep 1182 drivers/media/dvb-frontends/dib7000m.c case 0: fep->modulation = QPSK; break; fep 1183 drivers/media/dvb-frontends/dib7000m.c case 1: fep->modulation = QAM_16; break; fep 1185 drivers/media/dvb-frontends/dib7000m.c default: fep->modulation = QAM_64; break; fep 1191 drivers/media/dvb-frontends/dib7000m.c fep->hierarchy = HIERARCHY_NONE; fep 1193 drivers/media/dvb-frontends/dib7000m.c case 1: fep->code_rate_HP = FEC_1_2; break; fep 1194 drivers/media/dvb-frontends/dib7000m.c case 2: fep->code_rate_HP = FEC_2_3; break; fep 1195 drivers/media/dvb-frontends/dib7000m.c case 3: fep->code_rate_HP = FEC_3_4; break; fep 1196 drivers/media/dvb-frontends/dib7000m.c case 5: fep->code_rate_HP = FEC_5_6; break; fep 1198 drivers/media/dvb-frontends/dib7000m.c default: fep->code_rate_HP = FEC_7_8; break; fep 1203 drivers/media/dvb-frontends/dib7000m.c case 1: fep->code_rate_LP = FEC_1_2; break; fep 1204 drivers/media/dvb-frontends/dib7000m.c case 2: fep->code_rate_LP = FEC_2_3; break; fep 1205 drivers/media/dvb-frontends/dib7000m.c case 3: fep->code_rate_LP = FEC_3_4; break; fep 1206 drivers/media/dvb-frontends/dib7000m.c case 5: fep->code_rate_LP = FEC_5_6; break; fep 1208 drivers/media/dvb-frontends/dib7000m.c default: fep->code_rate_LP = FEC_7_8; break; fep 1218 drivers/media/dvb-frontends/dib7000m.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 1224 drivers/media/dvb-frontends/dib7000m.c dib7000m_set_bandwidth(state, BANDWIDTH_TO_KHZ(fep->bandwidth_hz)); fep 1237 drivers/media/dvb-frontends/dib7000m.c if (fep->transmission_mode == TRANSMISSION_MODE_AUTO || fep 1238 drivers/media/dvb-frontends/dib7000m.c fep->guard_interval == GUARD_INTERVAL_AUTO || fep 1239 drivers/media/dvb-frontends/dib7000m.c fep->modulation == QAM_AUTO || fep 1240 drivers/media/dvb-frontends/dib7000m.c fep->code_rate_HP == FEC_AUTO) { fep 1253 drivers/media/dvb-frontends/dib7000m.c dib7000m_get_frontend(fe, fep); fep 1422 drivers/media/dvb-frontends/dib7000p.c struct dtv_frontend_properties *fep) fep 1427 drivers/media/dvb-frontends/dib7000p.c fep->inversion = INVERSION_AUTO; fep 1429 drivers/media/dvb-frontends/dib7000p.c fep->bandwidth_hz = BANDWIDTH_TO_HZ(state->current_bandwidth); fep 1433 drivers/media/dvb-frontends/dib7000p.c fep->transmission_mode = TRANSMISSION_MODE_2K; fep 1436 drivers/media/dvb-frontends/dib7000p.c fep->transmission_mode = TRANSMISSION_MODE_8K; fep 1443 drivers/media/dvb-frontends/dib7000p.c fep->guard_interval = GUARD_INTERVAL_1_32; fep 1446 drivers/media/dvb-frontends/dib7000p.c fep->guard_interval = GUARD_INTERVAL_1_16; fep 1449 drivers/media/dvb-frontends/dib7000p.c fep->guard_interval = GUARD_INTERVAL_1_8; fep 1452 drivers/media/dvb-frontends/dib7000p.c fep->guard_interval = GUARD_INTERVAL_1_4; fep 1458 drivers/media/dvb-frontends/dib7000p.c fep->modulation = QPSK; fep 1461 drivers/media/dvb-frontends/dib7000p.c fep->modulation = QAM_16; fep 1465 drivers/media/dvb-frontends/dib7000p.c fep->modulation = QAM_64; fep 1472 drivers/media/dvb-frontends/dib7000p.c fep->hierarchy = HIERARCHY_NONE; fep 1475 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_HP = FEC_1_2; fep 1478 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_HP = FEC_2_3; fep 1481 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_HP = FEC_3_4; fep 1484 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_HP = FEC_5_6; fep 1488 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_HP = FEC_7_8; fep 1495 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_LP = FEC_1_2; fep 1498 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_LP = FEC_2_3; fep 1501 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_LP = FEC_3_4; fep 1504 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_LP = FEC_5_6; fep 1508 drivers/media/dvb-frontends/dib7000p.c fep->code_rate_LP = FEC_7_8; fep 1519 drivers/media/dvb-frontends/dib7000p.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 1542 drivers/media/dvb-frontends/dib7000p.c if (fep->transmission_mode == TRANSMISSION_MODE_AUTO || fep 1543 drivers/media/dvb-frontends/dib7000p.c fep->guard_interval == GUARD_INTERVAL_AUTO || fep->modulation == QAM_AUTO || fep->code_rate_HP == FEC_AUTO) { fep 1556 drivers/media/dvb-frontends/dib7000p.c dib7000p_get_frontend(fe, fep); fep 1093 drivers/media/usb/dvb-usb/af9005-fe.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 1098 drivers/media/usb/dvb-usb/af9005-fe.c deb_info("af9005_fe_set_frontend freq %d bw %d\n", fep->frequency, fep 1099 drivers/media/usb/dvb-usb/af9005-fe.c fep->bandwidth_hz); fep 1159 drivers/media/usb/dvb-usb/af9005-fe.c ret = af9005_fe_select_bw(state->d, fep->bandwidth_hz); fep 1162 drivers/media/usb/dvb-usb/af9005-fe.c ret = af9005_fe_program_cfoe(state->d, fep->bandwidth_hz); fep 1218 drivers/media/usb/dvb-usb/af9005-fe.c struct dtv_frontend_properties *fep) fep 1235 drivers/media/usb/dvb-usb/af9005-fe.c fep->modulation = QPSK; fep 1239 drivers/media/usb/dvb-usb/af9005-fe.c fep->modulation = QAM_16; fep 1243 drivers/media/usb/dvb-usb/af9005-fe.c fep->modulation = QAM_64; fep 1258 drivers/media/usb/dvb-usb/af9005-fe.c fep->hierarchy = HIERARCHY_NONE; fep 1262 drivers/media/usb/dvb-usb/af9005-fe.c fep->hierarchy = HIERARCHY_1; fep 1266 drivers/media/usb/dvb-usb/af9005-fe.c fep->hierarchy = HIERARCHY_2; fep 1270 drivers/media/usb/dvb-usb/af9005-fe.c fep->hierarchy = HIERARCHY_4; fep 1294 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_HP = FEC_1_2; fep 1298 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_HP = FEC_2_3; fep 1302 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_HP = FEC_3_4; fep 1306 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_HP = FEC_5_6; fep 1310 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_HP = FEC_7_8; fep 1325 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_LP = FEC_1_2; fep 1329 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_LP = FEC_2_3; fep 1333 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_LP = FEC_3_4; fep 1337 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_LP = FEC_5_6; fep 1341 drivers/media/usb/dvb-usb/af9005-fe.c fep->code_rate_LP = FEC_7_8; fep 1355 drivers/media/usb/dvb-usb/af9005-fe.c fep->guard_interval = GUARD_INTERVAL_1_32; fep 1359 drivers/media/usb/dvb-usb/af9005-fe.c fep->guard_interval = GUARD_INTERVAL_1_16; fep 1363 drivers/media/usb/dvb-usb/af9005-fe.c fep->guard_interval = GUARD_INTERVAL_1_8; fep 1367 drivers/media/usb/dvb-usb/af9005-fe.c fep->guard_interval = GUARD_INTERVAL_1_4; fep 1382 drivers/media/usb/dvb-usb/af9005-fe.c fep->transmission_mode = TRANSMISSION_MODE_2K; fep 1386 drivers/media/usb/dvb-usb/af9005-fe.c fep->transmission_mode = TRANSMISSION_MODE_8K; fep 1398 drivers/media/usb/dvb-usb/af9005-fe.c fep->bandwidth_hz = 6000000; fep 1402 drivers/media/usb/dvb-usb/af9005-fe.c fep->bandwidth_hz = 7000000; fep 1406 drivers/media/usb/dvb-usb/af9005-fe.c fep->bandwidth_hz = 8000000; fep 226 drivers/media/usb/dvb-usb/cinergyT2-fe.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 235 drivers/media/usb/dvb-usb/cinergyT2-fe.c param->tps = cpu_to_le16(compute_tps(fep)); fep 236 drivers/media/usb/dvb-usb/cinergyT2-fe.c param->freq = cpu_to_le32(fep->frequency / 1000); fep 239 drivers/media/usb/dvb-usb/cinergyT2-fe.c switch (fep->bandwidth_hz) { fep 16 drivers/media/usb/dvb-usb/dtt200u-fe.c struct dtv_frontend_properties fep; fep 149 drivers/media/usb/dvb-usb/dtt200u-fe.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 152 drivers/media/usb/dvb-usb/dtt200u-fe.c u16 freq = fep->frequency / 250000; fep 156 drivers/media/usb/dvb-usb/dtt200u-fe.c switch (fep->bandwidth_hz) { fep 188 drivers/media/usb/dvb-usb/dtt200u-fe.c struct dtv_frontend_properties *fep) fep 192 drivers/media/usb/dvb-usb/dtt200u-fe.c memcpy(fep, &state->fep, sizeof(struct dtv_frontend_properties)); fep 137 drivers/media/usb/dvb-usb/vp702x-fe.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 140 drivers/media/usb/dvb-usb/vp702x-fe.c u32 freq = fep->frequency/1000; fep 155 drivers/media/usb/dvb-usb/vp702x-fe.c sr = (u64) (fep->symbol_rate/1000) << 20; fep 162 drivers/media/usb/dvb-usb/vp702x-fe.c fep->frequency, freq, freq, fep->symbol_rate, fep 105 drivers/media/usb/dvb-usb/vp7045-fe.c struct dtv_frontend_properties *fep = &fe->dtv_property_cache; fep 108 drivers/media/usb/dvb-usb/vp7045-fe.c u32 freq = fep->frequency / 1000; fep 115 drivers/media/usb/dvb-usb/vp7045-fe.c switch (fep->bandwidth_hz) { fep 86 drivers/misc/mic/scif/scif_api.c struct scif_endpt *fep = NULL; fep 112 drivers/misc/mic/scif/scif_api.c fep = tmpep; fep 118 drivers/misc/mic/scif/scif_api.c if (!fep) { fep 162 drivers/misc/mic/scif/scif_fd.c struct scif_endpt *fep = NULL; fep 177 drivers/misc/mic/scif/scif_fd.c fep = tmpep; fep 182 drivers/misc/mic/scif/scif_fd.c if (!fep) { fep 336 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 344 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[0]; fep 388 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 414 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 417 drivers/net/ethernet/freescale/fec_main.c SKBTX_HW_TSTAMP && fep->hwts_tx_en)) fep 422 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 423 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) fep 434 drivers/net/ethernet/freescale/fec_main.c if (((unsigned long) bufaddr) & fep->tx_align || fep 435 drivers/net/ethernet/freescale/fec_main.c fep->quirks & FEC_QUIRK_SWAP_FRAME) { fep 439 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_SWAP_FRAME) fep 443 drivers/net/ethernet/freescale/fec_main.c addr = dma_map_single(&fep->pdev->dev, bufaddr, frag_len, fep 445 drivers/net/ethernet/freescale/fec_main.c if (dma_mapping_error(&fep->pdev->dev, addr)) { fep 465 drivers/net/ethernet/freescale/fec_main.c dma_unmap_single(&fep->pdev->dev, fec32_to_cpu(bdp->cbd_bufaddr), fep 474 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 510 drivers/net/ethernet/freescale/fec_main.c if (((unsigned long) bufaddr) & fep->tx_align || fep 511 drivers/net/ethernet/freescale/fec_main.c fep->quirks & FEC_QUIRK_SWAP_FRAME) { fep 515 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_SWAP_FRAME) fep 520 drivers/net/ethernet/freescale/fec_main.c addr = dma_map_single(&fep->pdev->dev, bufaddr, buflen, DMA_TO_DEVICE); fep 521 drivers/net/ethernet/freescale/fec_main.c if (dma_mapping_error(&fep->pdev->dev, addr)) { fep 531 drivers/net/ethernet/freescale/fec_main.c dma_unmap_single(&fep->pdev->dev, addr, fep 538 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 541 drivers/net/ethernet/freescale/fec_main.c SKBTX_HW_TSTAMP && fep->hwts_tx_en)) fep 548 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 553 drivers/net/ethernet/freescale/fec_main.c fep->hwts_tx_en)) fep 556 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) fep 604 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 615 drivers/net/ethernet/freescale/fec_main.c if (((unsigned long) data) & fep->tx_align || fep 616 drivers/net/ethernet/freescale/fec_main.c fep->quirks & FEC_QUIRK_SWAP_FRAME) { fep 620 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_SWAP_FRAME) fep 624 drivers/net/ethernet/freescale/fec_main.c addr = dma_map_single(&fep->pdev->dev, data, size, DMA_TO_DEVICE); fep 625 drivers/net/ethernet/freescale/fec_main.c if (dma_mapping_error(&fep->pdev->dev, addr)) { fep 635 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 636 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) fep 649 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) fep 663 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 677 drivers/net/ethernet/freescale/fec_main.c if (((unsigned long)bufaddr) & fep->tx_align || fep 678 drivers/net/ethernet/freescale/fec_main.c fep->quirks & FEC_QUIRK_SWAP_FRAME) { fep 682 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_SWAP_FRAME) fep 685 drivers/net/ethernet/freescale/fec_main.c dmabuf = dma_map_single(&fep->pdev->dev, bufaddr, fep 687 drivers/net/ethernet/freescale/fec_main.c if (dma_mapping_error(&fep->pdev->dev, dmabuf)) { fep 698 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 699 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) fep 716 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 783 drivers/net/ethernet/freescale/fec_main.c if (!(fep->quirks & FEC_QUIRK_ERR007885) || fep 800 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 808 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[queue]; fep 829 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(dev); fep 836 drivers/net/ethernet/freescale/fec_main.c for (q = 0; q < fep->num_rx_queues; q++) { fep 838 drivers/net/ethernet/freescale/fec_main.c rxq = fep->rx_queue[q]; fep 858 drivers/net/ethernet/freescale/fec_main.c for (q = 0; q < fep->num_tx_queues; q++) { fep 860 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[q]; fep 869 drivers/net/ethernet/freescale/fec_main.c dma_unmap_single(&fep->pdev->dev, fep 890 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 893 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_rx_queues; i++) fep 894 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->rx_queue[i]->bd.reg_desc_active); fep 899 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 904 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_rx_queues; i++) { fep 905 drivers/net/ethernet/freescale/fec_main.c rxq = fep->rx_queue[i]; fep 906 drivers/net/ethernet/freescale/fec_main.c writel(rxq->bd.dma, fep->hwp + FEC_R_DES_START(i)); fep 907 drivers/net/ethernet/freescale/fec_main.c writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_R_BUFF_SIZE(i)); fep 912 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_RCMR(i)); fep 915 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) { fep 916 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[i]; fep 917 drivers/net/ethernet/freescale/fec_main.c writel(txq->bd.dma, fep->hwp + FEC_X_DES_START(i)); fep 922 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_DMA_CFG(i)); fep 928 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 932 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) { fep 933 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[i]; fep 952 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 962 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) { fep 963 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + FEC_ECNTRL); fep 965 drivers/net/ethernet/freescale/fec_main.c writel(1, fep->hwp + FEC_ECNTRL); fep 975 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_ADDR_LOW); fep 977 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_ADDR_HIGH); fep 980 drivers/net/ethernet/freescale/fec_main.c writel(0xffffffff, fep->hwp + FEC_IEVENT); fep 990 drivers/net/ethernet/freescale/fec_main.c if (fep->full_duplex == DUPLEX_FULL) { fep 992 drivers/net/ethernet/freescale/fec_main.c writel(0x04, fep->hwp + FEC_X_CNTRL); fep 996 drivers/net/ethernet/freescale/fec_main.c writel(0x0, fep->hwp + FEC_X_CNTRL); fep 1000 drivers/net/ethernet/freescale/fec_main.c writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); fep 1003 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_RACC) { fep 1004 drivers/net/ethernet/freescale/fec_main.c val = readl(fep->hwp + FEC_RACC); fep 1007 drivers/net/ethernet/freescale/fec_main.c if (fep->csum_flags & FLAG_RX_CSUM_ENABLED) fep 1012 drivers/net/ethernet/freescale/fec_main.c writel(val, fep->hwp + FEC_RACC); fep 1013 drivers/net/ethernet/freescale/fec_main.c writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL); fep 1021 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_ENET_MAC) { fep 1026 drivers/net/ethernet/freescale/fec_main.c if (fep->phy_interface == PHY_INTERFACE_MODE_RGMII || fep 1027 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface == PHY_INTERFACE_MODE_RGMII_ID || fep 1028 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID || fep 1029 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) fep 1031 drivers/net/ethernet/freescale/fec_main.c else if (fep->phy_interface == PHY_INTERFACE_MODE_RMII) fep 1047 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_USE_GASKET) { fep 1050 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + FEC_MIIGSK_ENR); fep 1051 drivers/net/ethernet/freescale/fec_main.c while (readl(fep->hwp + FEC_MIIGSK_ENR) & 4) fep 1059 drivers/net/ethernet/freescale/fec_main.c cfgr = (fep->phy_interface == PHY_INTERFACE_MODE_RMII) fep 1063 drivers/net/ethernet/freescale/fec_main.c writel(cfgr, fep->hwp + FEC_MIIGSK_CFGR); fep 1066 drivers/net/ethernet/freescale/fec_main.c writel(2, fep->hwp + FEC_MIIGSK_ENR); fep 1073 drivers/net/ethernet/freescale/fec_main.c if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) || fep 1074 drivers/net/ethernet/freescale/fec_main.c ((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) && fep 1079 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM); fep 1080 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_RSFL_V, fep->hwp + FEC_R_FIFO_RSFL); fep 1081 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_RAEM_V, fep->hwp + FEC_R_FIFO_RAEM); fep 1082 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_RAFL_V, fep->hwp + FEC_R_FIFO_RAFL); fep 1085 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD); fep 1091 drivers/net/ethernet/freescale/fec_main.c writel(rcntl, fep->hwp + FEC_R_CNTRL); fep 1096 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + FEC_HASH_TABLE_HIGH); fep 1097 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + FEC_HASH_TABLE_LOW); fep 1100 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_ENET_MAC) { fep 1104 drivers/net/ethernet/freescale/fec_main.c writel(1 << 8, fep->hwp + FEC_X_WMRK); fep 1107 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) fep 1112 drivers/net/ethernet/freescale/fec_main.c writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT); fep 1116 drivers/net/ethernet/freescale/fec_main.c writel(ecntl, fep->hwp + FEC_ECNTRL); fep 1119 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) fep 1123 drivers/net/ethernet/freescale/fec_main.c if (fep->link) fep 1124 drivers/net/ethernet/freescale/fec_main.c writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK); fep 1126 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_MII, fep->hwp + FEC_IMASK); fep 1133 drivers/net/ethernet/freescale/fec_main.c static void fec_enet_stop_mode(struct fec_enet_private *fep, bool enabled) fep 1135 drivers/net/ethernet/freescale/fec_main.c struct fec_platform_data *pdata = fep->pdev->dev.platform_data; fep 1136 drivers/net/ethernet/freescale/fec_main.c struct fec_stop_mode_gpr *stop_gpr = &fep->stop_gpr; fep 1154 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1155 drivers/net/ethernet/freescale/fec_main.c u32 rmii_mode = readl(fep->hwp + FEC_R_CNTRL) & (1 << 8); fep 1159 drivers/net/ethernet/freescale/fec_main.c if (fep->link) { fep 1160 drivers/net/ethernet/freescale/fec_main.c writel(1, fep->hwp + FEC_X_CNTRL); /* Graceful transmit stop */ fep 1162 drivers/net/ethernet/freescale/fec_main.c if (!(readl(fep->hwp + FEC_IEVENT) & FEC_ENET_GRA)) fep 1170 drivers/net/ethernet/freescale/fec_main.c if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) { fep 1171 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) { fep 1172 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + FEC_ECNTRL); fep 1174 drivers/net/ethernet/freescale/fec_main.c writel(1, fep->hwp + FEC_ECNTRL); fep 1177 drivers/net/ethernet/freescale/fec_main.c writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK); fep 1179 drivers/net/ethernet/freescale/fec_main.c writel(FEC_DEFAULT_IMASK | FEC_ENET_WAKEUP, fep->hwp + FEC_IMASK); fep 1180 drivers/net/ethernet/freescale/fec_main.c val = readl(fep->hwp + FEC_ECNTRL); fep 1182 drivers/net/ethernet/freescale/fec_main.c writel(val, fep->hwp + FEC_ECNTRL); fep 1183 drivers/net/ethernet/freescale/fec_main.c fec_enet_stop_mode(fep, true); fep 1185 drivers/net/ethernet/freescale/fec_main.c writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); fep 1188 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_ENET_MAC && fep 1189 drivers/net/ethernet/freescale/fec_main.c !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) { fep 1190 drivers/net/ethernet/freescale/fec_main.c writel(2, fep->hwp + FEC_ECNTRL); fep 1191 drivers/net/ethernet/freescale/fec_main.c writel(rmii_mode, fep->hwp + FEC_R_CNTRL); fep 1199 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1205 drivers/net/ethernet/freescale/fec_main.c schedule_work(&fep->tx_timeout_work); fep 1210 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = fep 1212 drivers/net/ethernet/freescale/fec_main.c struct net_device *ndev = fep->netdev; fep 1216 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 1221 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 1227 drivers/net/ethernet/freescale/fec_main.c fec_enet_hwtstamp(struct fec_enet_private *fep, unsigned ts, fep 1233 drivers/net/ethernet/freescale/fec_main.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 1234 drivers/net/ethernet/freescale/fec_main.c ns = timecounter_cyc2time(&fep->tc, ts); fep 1235 drivers/net/ethernet/freescale/fec_main.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 1244 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep; fep 1253 drivers/net/ethernet/freescale/fec_main.c fep = netdev_priv(ndev); fep 1257 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[queue_id]; fep 1277 drivers/net/ethernet/freescale/fec_main.c dma_unmap_single(&fep->pdev->dev, fep 1306 drivers/net/ethernet/freescale/fec_main.c fep->bufdesc_ex) { fep 1310 drivers/net/ethernet/freescale/fec_main.c fec_enet_hwtstamp(fep, fec32_to_cpu(ebdp->ts), &shhwtstamps); fep 1350 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1353 drivers/net/ethernet/freescale/fec_main.c for_each_set_bit(queue_id, &fep->work_tx, FEC_ENET_MAX_TX_QS) { fep 1354 drivers/net/ethernet/freescale/fec_main.c clear_bit(queue_id, &fep->work_tx); fep 1363 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1366 drivers/net/ethernet/freescale/fec_main.c off = ((unsigned long)skb->data) & fep->rx_align; fep 1368 drivers/net/ethernet/freescale/fec_main.c skb_reserve(skb, fep->rx_align + 1 - off); fep 1370 drivers/net/ethernet/freescale/fec_main.c bdp->cbd_bufaddr = cpu_to_fec32(dma_map_single(&fep->pdev->dev, skb->data, FEC_ENET_RX_FRSIZE - fep->rx_align, DMA_FROM_DEVICE)); fep 1371 drivers/net/ethernet/freescale/fec_main.c if (dma_mapping_error(&fep->pdev->dev, fec32_to_cpu(bdp->cbd_bufaddr))) { fep 1383 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1386 drivers/net/ethernet/freescale/fec_main.c if (length > fep->rx_copybreak) fep 1393 drivers/net/ethernet/freescale/fec_main.c dma_sync_single_for_cpu(&fep->pdev->dev, fep 1395 drivers/net/ethernet/freescale/fec_main.c FEC_ENET_RX_FRSIZE - fep->rx_align, fep 1414 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1428 drivers/net/ethernet/freescale/fec_main.c bool need_swap = fep->quirks & FEC_QUIRK_SWAP_FRAME; fep 1434 drivers/net/ethernet/freescale/fec_main.c rxq = fep->rx_queue[queue_id]; fep 1447 drivers/net/ethernet/freescale/fec_main.c writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT); fep 1495 drivers/net/ethernet/freescale/fec_main.c dma_unmap_single(&fep->pdev->dev, fep 1497 drivers/net/ethernet/freescale/fec_main.c FEC_ENET_RX_FRSIZE - fep->rx_align, fep 1509 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_RACC) fep 1515 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) fep 1521 drivers/net/ethernet/freescale/fec_main.c fep->bufdesc_ex && fep 1537 drivers/net/ethernet/freescale/fec_main.c if (fep->hwts_rx_en && fep->bufdesc_ex) fep 1538 drivers/net/ethernet/freescale/fec_main.c fec_enet_hwtstamp(fep, fec32_to_cpu(ebdp->ts), fep 1541 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex && fep 1542 drivers/net/ethernet/freescale/fec_main.c (fep->csum_flags & FLAG_RX_CSUM_ENABLED)) { fep 1557 drivers/net/ethernet/freescale/fec_main.c napi_gro_receive(&fep->napi, skb); fep 1560 drivers/net/ethernet/freescale/fec_main.c dma_sync_single_for_device(&fep->pdev->dev, fep 1562 drivers/net/ethernet/freescale/fec_main.c FEC_ENET_RX_FRSIZE - fep->rx_align, fep 1576 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 1607 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1609 drivers/net/ethernet/freescale/fec_main.c for_each_set_bit(queue_id, &fep->work_rx, FEC_ENET_MAX_RX_QS) { fep 1616 drivers/net/ethernet/freescale/fec_main.c clear_bit(queue_id, &fep->work_rx); fep 1624 drivers/net/ethernet/freescale/fec_main.c fec_enet_collect_events(struct fec_enet_private *fep, uint int_events) fep 1630 drivers/net/ethernet/freescale/fec_main.c fep->work_rx |= (1 << 2); fep 1632 drivers/net/ethernet/freescale/fec_main.c fep->work_rx |= (1 << 0); fep 1634 drivers/net/ethernet/freescale/fec_main.c fep->work_rx |= (1 << 1); fep 1637 drivers/net/ethernet/freescale/fec_main.c fep->work_tx |= (1 << 2); fep 1639 drivers/net/ethernet/freescale/fec_main.c fep->work_tx |= (1 << 0); fep 1641 drivers/net/ethernet/freescale/fec_main.c fep->work_tx |= (1 << 1); fep 1650 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1654 drivers/net/ethernet/freescale/fec_main.c int_events = readl(fep->hwp + FEC_IEVENT); fep 1655 drivers/net/ethernet/freescale/fec_main.c writel(int_events, fep->hwp + FEC_IEVENT); fep 1656 drivers/net/ethernet/freescale/fec_main.c fec_enet_collect_events(fep, int_events); fep 1658 drivers/net/ethernet/freescale/fec_main.c if ((fep->work_tx || fep->work_rx) && fep->link) { fep 1661 drivers/net/ethernet/freescale/fec_main.c if (napi_schedule_prep(&fep->napi)) { fep 1663 drivers/net/ethernet/freescale/fec_main.c writel(FEC_NAPI_IMASK, fep->hwp + FEC_IMASK); fep 1664 drivers/net/ethernet/freescale/fec_main.c __napi_schedule(&fep->napi); fep 1670 drivers/net/ethernet/freescale/fec_main.c complete(&fep->mdio_done); fep 1678 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1687 drivers/net/ethernet/freescale/fec_main.c writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK); fep 1695 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1696 drivers/net/ethernet/freescale/fec_main.c struct fec_platform_data *pdata = dev_get_platdata(&fep->pdev->dev); fep 1711 drivers/net/ethernet/freescale/fec_main.c struct device_node *np = fep->pdev->dev.of_node; fep 1737 drivers/net/ethernet/freescale/fec_main.c cpu_to_be32(readl(fep->hwp + FEC_ADDR_LOW)); fep 1739 drivers/net/ethernet/freescale/fec_main.c cpu_to_be16(readl(fep->hwp + FEC_ADDR_HIGH) >> 16); fep 1748 drivers/net/ethernet/freescale/fec_main.c dev_err(&fep->pdev->dev, "Invalid MAC address: %pM\n", iap); fep 1750 drivers/net/ethernet/freescale/fec_main.c dev_info(&fep->pdev->dev, "Using random MAC address: %pM\n", fep 1759 drivers/net/ethernet/freescale/fec_main.c ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id; fep 1769 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1779 drivers/net/ethernet/freescale/fec_main.c fep->link = 0; fep 1781 drivers/net/ethernet/freescale/fec_main.c if (!fep->link) { fep 1782 drivers/net/ethernet/freescale/fec_main.c fep->link = phy_dev->link; fep 1786 drivers/net/ethernet/freescale/fec_main.c if (fep->full_duplex != phy_dev->duplex) { fep 1787 drivers/net/ethernet/freescale/fec_main.c fep->full_duplex = phy_dev->duplex; fep 1791 drivers/net/ethernet/freescale/fec_main.c if (phy_dev->speed != fep->speed) { fep 1792 drivers/net/ethernet/freescale/fec_main.c fep->speed = phy_dev->speed; fep 1798 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 1803 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 1806 drivers/net/ethernet/freescale/fec_main.c if (fep->link) { fep 1807 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 1811 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 1812 drivers/net/ethernet/freescale/fec_main.c fep->link = phy_dev->link; fep 1823 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = bus->priv; fep 1824 drivers/net/ethernet/freescale/fec_main.c struct device *dev = &fep->pdev->dev; fep 1833 drivers/net/ethernet/freescale/fec_main.c reinit_completion(&fep->mdio_done); fep 1843 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_MII_DATA); fep 1846 drivers/net/ethernet/freescale/fec_main.c time_left = wait_for_completion_timeout(&fep->mdio_done, fep 1849 drivers/net/ethernet/freescale/fec_main.c netdev_err(fep->netdev, "MDIO address write timeout\n"); fep 1866 drivers/net/ethernet/freescale/fec_main.c FEC_MMFR_TA, fep->hwp + FEC_MII_DATA); fep 1869 drivers/net/ethernet/freescale/fec_main.c time_left = wait_for_completion_timeout(&fep->mdio_done, fep 1872 drivers/net/ethernet/freescale/fec_main.c netdev_err(fep->netdev, "MDIO read timeout\n"); fep 1877 drivers/net/ethernet/freescale/fec_main.c ret = FEC_MMFR_DATA(readl(fep->hwp + FEC_MII_DATA)); fep 1889 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = bus->priv; fep 1890 drivers/net/ethernet/freescale/fec_main.c struct device *dev = &fep->pdev->dev; fep 1901 drivers/net/ethernet/freescale/fec_main.c reinit_completion(&fep->mdio_done); fep 1911 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_MII_DATA); fep 1914 drivers/net/ethernet/freescale/fec_main.c time_left = wait_for_completion_timeout(&fep->mdio_done, fep 1917 drivers/net/ethernet/freescale/fec_main.c netdev_err(fep->netdev, "MDIO address write timeout\n"); fep 1931 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_MII_DATA); fep 1934 drivers/net/ethernet/freescale/fec_main.c time_left = wait_for_completion_timeout(&fep->mdio_done, fep 1937 drivers/net/ethernet/freescale/fec_main.c netdev_err(fep->netdev, "MDIO write timeout\n"); fep 1950 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 1954 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_enet_out); fep 1958 drivers/net/ethernet/freescale/fec_main.c if (fep->clk_ptp) { fep 1959 drivers/net/ethernet/freescale/fec_main.c mutex_lock(&fep->ptp_clk_mutex); fep 1960 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_ptp); fep 1962 drivers/net/ethernet/freescale/fec_main.c mutex_unlock(&fep->ptp_clk_mutex); fep 1965 drivers/net/ethernet/freescale/fec_main.c fep->ptp_clk_on = true; fep 1967 drivers/net/ethernet/freescale/fec_main.c mutex_unlock(&fep->ptp_clk_mutex); fep 1970 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_ref); fep 1976 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_enet_out); fep 1977 drivers/net/ethernet/freescale/fec_main.c if (fep->clk_ptp) { fep 1978 drivers/net/ethernet/freescale/fec_main.c mutex_lock(&fep->ptp_clk_mutex); fep 1979 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ptp); fep 1980 drivers/net/ethernet/freescale/fec_main.c fep->ptp_clk_on = false; fep 1981 drivers/net/ethernet/freescale/fec_main.c mutex_unlock(&fep->ptp_clk_mutex); fep 1983 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ref); fep 1989 drivers/net/ethernet/freescale/fec_main.c if (fep->clk_ref) fep 1990 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ref); fep 1992 drivers/net/ethernet/freescale/fec_main.c if (fep->clk_enet_out) fep 1993 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_enet_out); fep 2000 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2005 drivers/net/ethernet/freescale/fec_main.c int dev_id = fep->dev_id; fep 2007 drivers/net/ethernet/freescale/fec_main.c if (fep->phy_node) { fep 2008 drivers/net/ethernet/freescale/fec_main.c phy_dev = of_phy_connect(ndev, fep->phy_node, fep 2010 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface); fep 2018 drivers/net/ethernet/freescale/fec_main.c if (!mdiobus_is_registered_device(fep->mii_bus, phy_id)) fep 2022 drivers/net/ethernet/freescale/fec_main.c strlcpy(mdio_bus_id, fep->mii_bus->id, MII_BUS_ID_SIZE); fep 2035 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface); fep 2044 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_GBIT) { fep 2055 drivers/net/ethernet/freescale/fec_main.c fep->link = 0; fep 2056 drivers/net/ethernet/freescale/fec_main.c fep->full_duplex = 0; fep 2067 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2088 drivers/net/ethernet/freescale/fec_main.c if ((fep->quirks & FEC_QUIRK_SINGLE_MDIO) && fep->dev_id > 0) { fep 2091 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus = fec0_mii_bus; fep 2106 drivers/net/ethernet/freescale/fec_main.c mii_speed = DIV_ROUND_UP(clk_get_rate(fep->clk_ipg), 5000000); fep 2107 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_ENET_MAC) fep 2112 drivers/net/ethernet/freescale/fec_main.c clk_get_rate(fep->clk_ipg)); fep 2129 drivers/net/ethernet/freescale/fec_main.c holdtime = DIV_ROUND_UP(clk_get_rate(fep->clk_ipg), 100000000) - 1; fep 2131 drivers/net/ethernet/freescale/fec_main.c fep->phy_speed = mii_speed << 1 | holdtime << 8; fep 2133 drivers/net/ethernet/freescale/fec_main.c writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED); fep 2135 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus = mdiobus_alloc(); fep 2136 drivers/net/ethernet/freescale/fec_main.c if (fep->mii_bus == NULL) { fep 2141 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus->name = "fec_enet_mii_bus"; fep 2142 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus->read = fec_enet_mdio_read; fep 2143 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus->write = fec_enet_mdio_write; fep 2144 drivers/net/ethernet/freescale/fec_main.c snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", fep 2145 drivers/net/ethernet/freescale/fec_main.c pdev->name, fep->dev_id + 1); fep 2146 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus->priv = fep; fep 2147 drivers/net/ethernet/freescale/fec_main.c fep->mii_bus->parent = &pdev->dev; fep 2150 drivers/net/ethernet/freescale/fec_main.c err = of_mdiobus_register(fep->mii_bus, node); fep 2158 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_SINGLE_MDIO) fep 2159 drivers/net/ethernet/freescale/fec_main.c fec0_mii_bus = fep->mii_bus; fep 2164 drivers/net/ethernet/freescale/fec_main.c mdiobus_free(fep->mii_bus); fep 2169 drivers/net/ethernet/freescale/fec_main.c static void fec_enet_mii_remove(struct fec_enet_private *fep) fep 2172 drivers/net/ethernet/freescale/fec_main.c mdiobus_unregister(fep->mii_bus); fep 2173 drivers/net/ethernet/freescale/fec_main.c mdiobus_free(fep->mii_bus); fep 2180 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2182 drivers/net/ethernet/freescale/fec_main.c strlcpy(info->driver, fep->pdev->dev.driver->name, fep 2190 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2194 drivers/net/ethernet/freescale/fec_main.c r = platform_get_resource(fep->pdev, IORESOURCE_MEM, 0); fep 2253 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2254 drivers/net/ethernet/freescale/fec_main.c u32 __iomem *theregs = (u32 __iomem *)fep->hwp; fep 2255 drivers/net/ethernet/freescale/fec_main.c struct device *dev = &fep->pdev->dev; fep 2272 drivers/net/ethernet/freescale/fec_main.c !(fep->quirks & FEC_QUIRK_HAS_FRREG)) fep 2286 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2288 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 2296 drivers/net/ethernet/freescale/fec_main.c if (fep->ptp_clock) fep 2297 drivers/net/ethernet/freescale/fec_main.c info->phc_index = ptp_clock_index(fep->ptp_clock); fep 2317 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2319 drivers/net/ethernet/freescale/fec_main.c pause->autoneg = (fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) != 0; fep 2320 drivers/net/ethernet/freescale/fec_main.c pause->tx_pause = (fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) != 0; fep 2327 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2338 drivers/net/ethernet/freescale/fec_main.c fep->pause_flag = 0; fep 2341 drivers/net/ethernet/freescale/fec_main.c fep->pause_flag |= pause->rx_pause ? FEC_PAUSE_FLAG_ENABLE : 0; fep 2342 drivers/net/ethernet/freescale/fec_main.c fep->pause_flag |= pause->autoneg ? FEC_PAUSE_FLAG_AUTONEG : 0; fep 2353 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 2358 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 2434 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(dev); fep 2438 drivers/net/ethernet/freescale/fec_main.c fep->ethtool_stats[i] = readl(fep->hwp + fec_stats[i].offset); fep 2444 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(dev); fep 2449 drivers/net/ethernet/freescale/fec_main.c memcpy(data, fep->ethtool_stats, FEC_STATS_SIZE); fep 2477 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(dev); fep 2481 drivers/net/ethernet/freescale/fec_main.c writel(FEC_MIB_CTRLSTAT_DISABLE, fep->hwp + FEC_MIB_CTRLSTAT); fep 2484 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + fec_stats[i].offset); fep 2487 drivers/net/ethernet/freescale/fec_main.c writel(0, fep->hwp + FEC_MIB_CTRLSTAT); fep 2507 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2509 drivers/net/ethernet/freescale/fec_main.c return us * (fep->itr_clk_rate / 64000) / 1000; fep 2515 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2519 drivers/net/ethernet/freescale/fec_main.c if (!fep->rx_time_itr || !fep->rx_pkts_itr || fep 2520 drivers/net/ethernet/freescale/fec_main.c !fep->tx_time_itr || !fep->tx_pkts_itr) fep 2530 drivers/net/ethernet/freescale/fec_main.c rx_itr |= FEC_ITR_ICFT(fep->rx_pkts_itr); fep 2531 drivers/net/ethernet/freescale/fec_main.c rx_itr |= FEC_ITR_ICTT(fec_enet_us_to_itr_clock(ndev, fep->rx_time_itr)); fep 2532 drivers/net/ethernet/freescale/fec_main.c tx_itr |= FEC_ITR_ICFT(fep->tx_pkts_itr); fep 2533 drivers/net/ethernet/freescale/fec_main.c tx_itr |= FEC_ITR_ICTT(fec_enet_us_to_itr_clock(ndev, fep->tx_time_itr)); fep 2538 drivers/net/ethernet/freescale/fec_main.c writel(tx_itr, fep->hwp + FEC_TXIC0); fep 2539 drivers/net/ethernet/freescale/fec_main.c writel(rx_itr, fep->hwp + FEC_RXIC0); fep 2540 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) { fep 2541 drivers/net/ethernet/freescale/fec_main.c writel(tx_itr, fep->hwp + FEC_TXIC1); fep 2542 drivers/net/ethernet/freescale/fec_main.c writel(rx_itr, fep->hwp + FEC_RXIC1); fep 2543 drivers/net/ethernet/freescale/fec_main.c writel(tx_itr, fep->hwp + FEC_TXIC2); fep 2544 drivers/net/ethernet/freescale/fec_main.c writel(rx_itr, fep->hwp + FEC_RXIC2); fep 2551 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2553 drivers/net/ethernet/freescale/fec_main.c if (!(fep->quirks & FEC_QUIRK_HAS_COALESCE)) fep 2556 drivers/net/ethernet/freescale/fec_main.c ec->rx_coalesce_usecs = fep->rx_time_itr; fep 2557 drivers/net/ethernet/freescale/fec_main.c ec->rx_max_coalesced_frames = fep->rx_pkts_itr; fep 2559 drivers/net/ethernet/freescale/fec_main.c ec->tx_coalesce_usecs = fep->tx_time_itr; fep 2560 drivers/net/ethernet/freescale/fec_main.c ec->tx_max_coalesced_frames = fep->tx_pkts_itr; fep 2568 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2569 drivers/net/ethernet/freescale/fec_main.c struct device *dev = &fep->pdev->dev; fep 2572 drivers/net/ethernet/freescale/fec_main.c if (!(fep->quirks & FEC_QUIRK_HAS_COALESCE)) fep 2597 drivers/net/ethernet/freescale/fec_main.c fep->rx_time_itr = ec->rx_coalesce_usecs; fep 2598 drivers/net/ethernet/freescale/fec_main.c fep->rx_pkts_itr = ec->rx_max_coalesced_frames; fep 2600 drivers/net/ethernet/freescale/fec_main.c fep->tx_time_itr = ec->tx_coalesce_usecs; fep 2601 drivers/net/ethernet/freescale/fec_main.c fep->tx_pkts_itr = ec->tx_max_coalesced_frames; fep 2625 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(netdev); fep 2630 drivers/net/ethernet/freescale/fec_main.c *(u32 *)data = fep->rx_copybreak; fep 2644 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(netdev); fep 2649 drivers/net/ethernet/freescale/fec_main.c fep->rx_copybreak = *(u32 *)data; fep 2662 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2664 drivers/net/ethernet/freescale/fec_main.c if (fep->wol_flag & FEC_WOL_HAS_MAGIC_PACKET) { fep 2666 drivers/net/ethernet/freescale/fec_main.c wol->wolopts = fep->wol_flag & FEC_WOL_FLAG_ENABLE ? WAKE_MAGIC : 0; fep 2675 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2677 drivers/net/ethernet/freescale/fec_main.c if (!(fep->wol_flag & FEC_WOL_HAS_MAGIC_PACKET)) fep 2685 drivers/net/ethernet/freescale/fec_main.c fep->wol_flag |= FEC_WOL_FLAG_ENABLE; fep 2686 drivers/net/ethernet/freescale/fec_main.c if (fep->irq[0] > 0) fep 2687 drivers/net/ethernet/freescale/fec_main.c enable_irq_wake(fep->irq[0]); fep 2689 drivers/net/ethernet/freescale/fec_main.c fep->wol_flag &= (~FEC_WOL_FLAG_ENABLE); fep 2690 drivers/net/ethernet/freescale/fec_main.c if (fep->irq[0] > 0) fep 2691 drivers/net/ethernet/freescale/fec_main.c disable_irq_wake(fep->irq[0]); fep 2723 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2732 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 2744 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2752 drivers/net/ethernet/freescale/fec_main.c for (q = 0; q < fep->num_rx_queues; q++) { fep 2753 drivers/net/ethernet/freescale/fec_main.c rxq = fep->rx_queue[q]; fep 2759 drivers/net/ethernet/freescale/fec_main.c dma_unmap_single(&fep->pdev->dev, fep 2761 drivers/net/ethernet/freescale/fec_main.c FEC_ENET_RX_FRSIZE - fep->rx_align, fep 2769 drivers/net/ethernet/freescale/fec_main.c for (q = 0; q < fep->num_tx_queues; q++) { fep 2770 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[q]; fep 2784 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2788 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) fep 2789 drivers/net/ethernet/freescale/fec_main.c if (fep->tx_queue[i] && fep->tx_queue[i]->tso_hdrs) { fep 2790 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[i]; fep 2791 drivers/net/ethernet/freescale/fec_main.c dma_free_coherent(&fep->pdev->dev, fep 2797 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_rx_queues; i++) fep 2798 drivers/net/ethernet/freescale/fec_main.c kfree(fep->rx_queue[i]); fep 2799 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) fep 2800 drivers/net/ethernet/freescale/fec_main.c kfree(fep->tx_queue[i]); fep 2805 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2810 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) { fep 2817 drivers/net/ethernet/freescale/fec_main.c fep->tx_queue[i] = txq; fep 2819 drivers/net/ethernet/freescale/fec_main.c fep->total_tx_ring_size += fep->tx_queue[i]->bd.ring_size; fep 2825 drivers/net/ethernet/freescale/fec_main.c txq->tso_hdrs = dma_alloc_coherent(&fep->pdev->dev, fep 2835 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_rx_queues; i++) { fep 2836 drivers/net/ethernet/freescale/fec_main.c fep->rx_queue[i] = kzalloc(sizeof(*fep->rx_queue[i]), fep 2838 drivers/net/ethernet/freescale/fec_main.c if (!fep->rx_queue[i]) { fep 2843 drivers/net/ethernet/freescale/fec_main.c fep->rx_queue[i]->bd.ring_size = RX_RING_SIZE; fep 2844 drivers/net/ethernet/freescale/fec_main.c fep->total_rx_ring_size += fep->rx_queue[i]->bd.ring_size; fep 2856 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2862 drivers/net/ethernet/freescale/fec_main.c rxq = fep->rx_queue[queue]; fep 2877 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 2898 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2903 drivers/net/ethernet/freescale/fec_main.c txq = fep->tx_queue[queue]; fep 2913 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) { fep 2934 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2937 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_rx_queues; i++) fep 2941 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) fep 2950 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 2954 drivers/net/ethernet/freescale/fec_main.c ret = pm_runtime_get_sync(&fep->pdev->dev); fep 2958 drivers/net/ethernet/freescale/fec_main.c pinctrl_pm_select_default_state(&fep->pdev->dev); fep 2996 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_ERR006687) fep 2999 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 3003 drivers/net/ethernet/freescale/fec_main.c device_set_wakeup_enable(&ndev->dev, fep->wol_flag & fep 3013 drivers/net/ethernet/freescale/fec_main.c pm_runtime_mark_last_busy(&fep->pdev->dev); fep 3014 drivers/net/ethernet/freescale/fec_main.c pm_runtime_put_autosuspend(&fep->pdev->dev); fep 3015 drivers/net/ethernet/freescale/fec_main.c pinctrl_pm_select_sleep_state(&fep->pdev->dev); fep 3022 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3027 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 3034 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_ERR006687) fep 3040 drivers/net/ethernet/freescale/fec_main.c pinctrl_pm_select_sleep_state(&fep->pdev->dev); fep 3041 drivers/net/ethernet/freescale/fec_main.c pm_runtime_mark_last_busy(&fep->pdev->dev); fep 3042 drivers/net/ethernet/freescale/fec_main.c pm_runtime_put_autosuspend(&fep->pdev->dev); fep 3063 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3070 drivers/net/ethernet/freescale/fec_main.c tmp = readl(fep->hwp + FEC_R_CNTRL); fep 3072 drivers/net/ethernet/freescale/fec_main.c writel(tmp, fep->hwp + FEC_R_CNTRL); fep 3076 drivers/net/ethernet/freescale/fec_main.c tmp = readl(fep->hwp + FEC_R_CNTRL); fep 3078 drivers/net/ethernet/freescale/fec_main.c writel(tmp, fep->hwp + FEC_R_CNTRL); fep 3084 drivers/net/ethernet/freescale/fec_main.c writel(0xffffffff, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); fep 3085 drivers/net/ethernet/freescale/fec_main.c writel(0xffffffff, fep->hwp + FEC_GRP_HASH_TABLE_LOW); fep 3106 drivers/net/ethernet/freescale/fec_main.c writel(hash_high, fep->hwp + FEC_GRP_HASH_TABLE_HIGH); fep 3107 drivers/net/ethernet/freescale/fec_main.c writel(hash_low, fep->hwp + FEC_GRP_HASH_TABLE_LOW); fep 3114 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3133 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_ADDR_LOW); fep 3135 drivers/net/ethernet/freescale/fec_main.c fep->hwp + FEC_ADDR_HIGH); fep 3150 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(dev); fep 3153 drivers/net/ethernet/freescale/fec_main.c if (fep->irq[i] > 0) { fep 3154 drivers/net/ethernet/freescale/fec_main.c disable_irq(fep->irq[i]); fep 3155 drivers/net/ethernet/freescale/fec_main.c fec_enet_interrupt(fep->irq[i], dev); fep 3156 drivers/net/ethernet/freescale/fec_main.c enable_irq(fep->irq[i]); fep 3165 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(netdev); fep 3173 drivers/net/ethernet/freescale/fec_main.c fep->csum_flags |= FLAG_RX_CSUM_ENABLED; fep 3175 drivers/net/ethernet/freescale/fec_main.c fep->csum_flags &= ~FLAG_RX_CSUM_ENABLED; fep 3182 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(netdev); fep 3186 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 3193 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 3230 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3235 drivers/net/ethernet/freescale/fec_main.c unsigned dsize = fep->bufdesc_ex ? sizeof(struct bufdesc_ex) : fep 3242 drivers/net/ethernet/freescale/fec_main.c fep->rx_align = 0xf; fep 3243 drivers/net/ethernet/freescale/fec_main.c fep->tx_align = 0xf; fep 3245 drivers/net/ethernet/freescale/fec_main.c fep->rx_align = 0x3; fep 3246 drivers/net/ethernet/freescale/fec_main.c fep->tx_align = 0x3; fep 3250 drivers/net/ethernet/freescale/fec_main.c ret = dma_set_mask_and_coherent(&fep->pdev->dev, DMA_BIT_MASK(32)); fep 3252 drivers/net/ethernet/freescale/fec_main.c dev_warn(&fep->pdev->dev, "No suitable DMA available\n"); fep 3258 drivers/net/ethernet/freescale/fec_main.c bd_size = (fep->total_tx_ring_size + fep->total_rx_ring_size) * dsize; fep 3261 drivers/net/ethernet/freescale/fec_main.c cbd_base = dmam_alloc_coherent(&fep->pdev->dev, bd_size, &bd_dma, fep 3273 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_rx_queues; i++) { fep 3274 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_priv_rx_q *rxq = fep->rx_queue[i]; fep 3283 drivers/net/ethernet/freescale/fec_main.c rxq->bd.reg_desc_active = fep->hwp + offset_des_active_rxq[i]; fep 3289 drivers/net/ethernet/freescale/fec_main.c for (i = 0; i < fep->num_tx_queues; i++) { fep 3290 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_priv_tx_q *txq = fep->tx_queue[i]; fep 3299 drivers/net/ethernet/freescale/fec_main.c txq->bd.reg_desc_active = fep->hwp + offset_des_active_txq[i]; fep 3311 drivers/net/ethernet/freescale/fec_main.c writel(FEC_RX_DISABLED_IMASK, fep->hwp + FEC_IMASK); fep 3312 drivers/net/ethernet/freescale/fec_main.c netif_napi_add(ndev, &fep->napi, fec_enet_rx_napi, NAPI_POLL_WEIGHT); fep 3314 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_VLAN) fep 3318 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_CSUM) { fep 3324 drivers/net/ethernet/freescale/fec_main.c fep->csum_flags |= FLAG_RX_CSUM_ENABLED; fep 3327 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_AVB) { fep 3328 drivers/net/ethernet/freescale/fec_main.c fep->tx_align = 0; fep 3329 drivers/net/ethernet/freescale/fec_main.c fep->rx_align = 0x3f; fep 3336 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_MIB_CLEAR) fep 3454 drivers/net/ethernet/freescale/fec_main.c static int fec_enet_init_stop_mode(struct fec_enet_private *fep, fep 3468 drivers/net/ethernet/freescale/fec_main.c fep->stop_gpr.gpr = syscon_node_to_regmap(gpr_np); fep 3469 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->stop_gpr.gpr)) { fep 3470 drivers/net/ethernet/freescale/fec_main.c dev_err(&fep->pdev->dev, "could not find gpr regmap\n"); fep 3471 drivers/net/ethernet/freescale/fec_main.c ret = PTR_ERR(fep->stop_gpr.gpr); fep 3472 drivers/net/ethernet/freescale/fec_main.c fep->stop_gpr.gpr = NULL; fep 3476 drivers/net/ethernet/freescale/fec_main.c fep->stop_gpr.reg = dev_info->stop_gpr_reg; fep 3477 drivers/net/ethernet/freescale/fec_main.c fep->stop_gpr.bit = dev_info->stop_gpr_bit; fep 3488 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep; fep 3512 drivers/net/ethernet/freescale/fec_main.c fep = netdev_priv(ndev); fep 3519 drivers/net/ethernet/freescale/fec_main.c fep->quirks = dev_info->quirks; fep 3521 drivers/net/ethernet/freescale/fec_main.c fep->netdev = ndev; fep 3522 drivers/net/ethernet/freescale/fec_main.c fep->num_rx_queues = num_rx_qs; fep 3523 drivers/net/ethernet/freescale/fec_main.c fep->num_tx_queues = num_tx_qs; fep 3527 drivers/net/ethernet/freescale/fec_main.c if (fep->quirks & FEC_QUIRK_HAS_GBIT) fep 3528 drivers/net/ethernet/freescale/fec_main.c fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG; fep 3534 drivers/net/ethernet/freescale/fec_main.c fep->hwp = devm_platform_ioremap_resource(pdev, 0); fep 3535 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->hwp)) { fep 3536 drivers/net/ethernet/freescale/fec_main.c ret = PTR_ERR(fep->hwp); fep 3540 drivers/net/ethernet/freescale/fec_main.c fep->pdev = pdev; fep 3541 drivers/net/ethernet/freescale/fec_main.c fep->dev_id = dev_id++; fep 3548 drivers/net/ethernet/freescale/fec_main.c fep->quirks |= FEC_QUIRK_ERR006687; fep 3551 drivers/net/ethernet/freescale/fec_main.c fep->wol_flag |= FEC_WOL_HAS_MAGIC_PACKET; fep 3553 drivers/net/ethernet/freescale/fec_main.c ret = fec_enet_init_stop_mode(fep, dev_info, np); fep 3567 drivers/net/ethernet/freescale/fec_main.c fep->phy_node = phy_node; fep 3573 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface = pdata->phy; fep 3575 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface = PHY_INTERFACE_MODE_MII; fep 3577 drivers/net/ethernet/freescale/fec_main.c fep->phy_interface = ret; fep 3580 drivers/net/ethernet/freescale/fec_main.c fep->clk_ipg = devm_clk_get(&pdev->dev, "ipg"); fep 3581 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->clk_ipg)) { fep 3582 drivers/net/ethernet/freescale/fec_main.c ret = PTR_ERR(fep->clk_ipg); fep 3586 drivers/net/ethernet/freescale/fec_main.c fep->clk_ahb = devm_clk_get(&pdev->dev, "ahb"); fep 3587 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->clk_ahb)) { fep 3588 drivers/net/ethernet/freescale/fec_main.c ret = PTR_ERR(fep->clk_ahb); fep 3592 drivers/net/ethernet/freescale/fec_main.c fep->itr_clk_rate = clk_get_rate(fep->clk_ahb); fep 3595 drivers/net/ethernet/freescale/fec_main.c fep->clk_enet_out = devm_clk_get(&pdev->dev, "enet_out"); fep 3596 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->clk_enet_out)) fep 3597 drivers/net/ethernet/freescale/fec_main.c fep->clk_enet_out = NULL; fep 3599 drivers/net/ethernet/freescale/fec_main.c fep->ptp_clk_on = false; fep 3600 drivers/net/ethernet/freescale/fec_main.c mutex_init(&fep->ptp_clk_mutex); fep 3603 drivers/net/ethernet/freescale/fec_main.c fep->clk_ref = devm_clk_get(&pdev->dev, "enet_clk_ref"); fep 3604 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->clk_ref)) fep 3605 drivers/net/ethernet/freescale/fec_main.c fep->clk_ref = NULL; fep 3607 drivers/net/ethernet/freescale/fec_main.c fep->bufdesc_ex = fep->quirks & FEC_QUIRK_HAS_BUFDESC_EX; fep 3608 drivers/net/ethernet/freescale/fec_main.c fep->clk_ptp = devm_clk_get(&pdev->dev, "ptp"); fep 3609 drivers/net/ethernet/freescale/fec_main.c if (IS_ERR(fep->clk_ptp)) { fep 3610 drivers/net/ethernet/freescale/fec_main.c fep->clk_ptp = NULL; fep 3611 drivers/net/ethernet/freescale/fec_main.c fep->bufdesc_ex = false; fep 3618 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_ipg); fep 3621 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_ahb); fep 3625 drivers/net/ethernet/freescale/fec_main.c fep->reg_phy = devm_regulator_get_optional(&pdev->dev, "phy"); fep 3626 drivers/net/ethernet/freescale/fec_main.c if (!IS_ERR(fep->reg_phy)) { fep 3627 drivers/net/ethernet/freescale/fec_main.c ret = regulator_enable(fep->reg_phy); fep 3634 drivers/net/ethernet/freescale/fec_main.c if (PTR_ERR(fep->reg_phy) == -EPROBE_DEFER) { fep 3638 drivers/net/ethernet/freescale/fec_main.c fep->reg_phy = NULL; fep 3652 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex) fep 3673 drivers/net/ethernet/freescale/fec_main.c fep->irq[i] = irq; fep 3676 drivers/net/ethernet/freescale/fec_main.c init_completion(&fep->mdio_done); fep 3690 drivers/net/ethernet/freescale/fec_main.c device_init_wakeup(&ndev->dev, fep->wol_flag & fep 3693 drivers/net/ethernet/freescale/fec_main.c if (fep->bufdesc_ex && fep->ptp_clock) fep 3694 drivers/net/ethernet/freescale/fec_main.c netdev_info(ndev, "registered PHC device %d\n", fep->dev_id); fep 3696 drivers/net/ethernet/freescale/fec_main.c fep->rx_copybreak = COPYBREAK_DEFAULT; fep 3697 drivers/net/ethernet/freescale/fec_main.c INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work); fep 3705 drivers/net/ethernet/freescale/fec_main.c fec_enet_mii_remove(fep); fep 3710 drivers/net/ethernet/freescale/fec_main.c if (fep->reg_phy) fep 3711 drivers/net/ethernet/freescale/fec_main.c regulator_disable(fep->reg_phy); fep 3716 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ahb); fep 3718 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ipg); fep 3738 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3746 drivers/net/ethernet/freescale/fec_main.c cancel_work_sync(&fep->tx_timeout_work); fep 3749 drivers/net/ethernet/freescale/fec_main.c fec_enet_mii_remove(fep); fep 3750 drivers/net/ethernet/freescale/fec_main.c if (fep->reg_phy) fep 3751 drivers/net/ethernet/freescale/fec_main.c regulator_disable(fep->reg_phy); fep 3755 drivers/net/ethernet/freescale/fec_main.c of_node_put(fep->phy_node); fep 3758 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ahb); fep 3759 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ipg); fep 3769 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3773 drivers/net/ethernet/freescale/fec_main.c if (fep->wol_flag & FEC_WOL_FLAG_ENABLE) fep 3774 drivers/net/ethernet/freescale/fec_main.c fep->wol_flag |= FEC_WOL_FLAG_SLEEP_ON; fep 3776 drivers/net/ethernet/freescale/fec_main.c napi_disable(&fep->napi); fep 3782 drivers/net/ethernet/freescale/fec_main.c if (!(fep->wol_flag & FEC_WOL_FLAG_ENABLE)) fep 3783 drivers/net/ethernet/freescale/fec_main.c pinctrl_pm_select_sleep_state(&fep->pdev->dev); fep 3787 drivers/net/ethernet/freescale/fec_main.c if (fep->reg_phy && !(fep->wol_flag & FEC_WOL_FLAG_ENABLE)) fep 3788 drivers/net/ethernet/freescale/fec_main.c regulator_disable(fep->reg_phy); fep 3793 drivers/net/ethernet/freescale/fec_main.c if (fep->clk_enet_out || fep->reg_phy) fep 3794 drivers/net/ethernet/freescale/fec_main.c fep->link = 0; fep 3802 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3806 drivers/net/ethernet/freescale/fec_main.c if (fep->reg_phy && !(fep->wol_flag & FEC_WOL_FLAG_ENABLE)) { fep 3807 drivers/net/ethernet/freescale/fec_main.c ret = regulator_enable(fep->reg_phy); fep 3819 drivers/net/ethernet/freescale/fec_main.c if (fep->wol_flag & FEC_WOL_FLAG_ENABLE) { fep 3820 drivers/net/ethernet/freescale/fec_main.c fec_enet_stop_mode(fep, false); fep 3822 drivers/net/ethernet/freescale/fec_main.c val = readl(fep->hwp + FEC_ECNTRL); fep 3824 drivers/net/ethernet/freescale/fec_main.c writel(val, fep->hwp + FEC_ECNTRL); fep 3825 drivers/net/ethernet/freescale/fec_main.c fep->wol_flag &= ~FEC_WOL_FLAG_SLEEP_ON; fep 3827 drivers/net/ethernet/freescale/fec_main.c pinctrl_pm_select_default_state(&fep->pdev->dev); fep 3833 drivers/net/ethernet/freescale/fec_main.c napi_enable(&fep->napi); fep 3841 drivers/net/ethernet/freescale/fec_main.c if (fep->reg_phy) fep 3842 drivers/net/ethernet/freescale/fec_main.c regulator_disable(fep->reg_phy); fep 3849 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3851 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ahb); fep 3852 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ipg); fep 3860 drivers/net/ethernet/freescale/fec_main.c struct fec_enet_private *fep = netdev_priv(ndev); fep 3863 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_ahb); fep 3866 drivers/net/ethernet/freescale/fec_main.c ret = clk_prepare_enable(fep->clk_ipg); fep 3873 drivers/net/ethernet/freescale/fec_main.c clk_disable_unprepare(fep->clk_ahb); fep 98 drivers/net/ethernet/freescale/fec_ptp.c static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable) fep 106 drivers/net/ethernet/freescale/fec_ptp.c if (!(fep->hwts_tx_en || fep->hwts_rx_en)) { fep 107 drivers/net/ethernet/freescale/fec_ptp.c dev_err(&fep->pdev->dev, "No ptp stack is running\n"); fep 111 drivers/net/ethernet/freescale/fec_ptp.c if (fep->pps_enable == enable) fep 114 drivers/net/ethernet/freescale/fec_ptp.c fep->pps_channel = DEFAULT_PPS_CHANNEL; fep 115 drivers/net/ethernet/freescale/fec_ptp.c fep->reload_period = PPS_OUPUT_RELOAD_PERIOD; fep 117 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 122 drivers/net/ethernet/freescale/fec_ptp.c writel(FEC_T_TF_MASK, fep->hwp + FEC_TCSR(fep->pps_channel)); fep 128 drivers/net/ethernet/freescale/fec_ptp.c val = readl(fep->hwp + FEC_TCSR(fep->pps_channel)); fep 131 drivers/net/ethernet/freescale/fec_ptp.c writel(val, fep->hwp + FEC_TCSR(fep->pps_channel)); fep 132 drivers/net/ethernet/freescale/fec_ptp.c val = readl(fep->hwp + FEC_TCSR(fep->pps_channel)); fep 136 drivers/net/ethernet/freescale/fec_ptp.c timecounter_read(&fep->tc); fep 144 drivers/net/ethernet/freescale/fec_ptp.c tempval = readl(fep->hwp + FEC_ATIME_CTRL); fep 146 drivers/net/ethernet/freescale/fec_ptp.c writel(tempval, fep->hwp + FEC_ATIME_CTRL); fep 148 drivers/net/ethernet/freescale/fec_ptp.c tempval = readl(fep->hwp + FEC_ATIME); fep 150 drivers/net/ethernet/freescale/fec_ptp.c ns = timecounter_cyc2time(&fep->tc, tempval); fep 177 drivers/net/ethernet/freescale/fec_ptp.c val &= fep->cc.mask; fep 178 drivers/net/ethernet/freescale/fec_ptp.c writel(val, fep->hwp + FEC_TCCR(fep->pps_channel)); fep 181 drivers/net/ethernet/freescale/fec_ptp.c fep->next_counter = (val + fep->reload_period) & fep->cc.mask; fep 184 drivers/net/ethernet/freescale/fec_ptp.c val = readl(fep->hwp + FEC_ATIME_CTRL); fep 186 drivers/net/ethernet/freescale/fec_ptp.c writel(val, fep->hwp + FEC_ATIME_CTRL); fep 189 drivers/net/ethernet/freescale/fec_ptp.c val = readl(fep->hwp + FEC_TCSR(fep->pps_channel)); fep 194 drivers/net/ethernet/freescale/fec_ptp.c writel(val, fep->hwp + FEC_TCSR(fep->pps_channel)); fep 199 drivers/net/ethernet/freescale/fec_ptp.c writel(fep->next_counter, fep->hwp + FEC_TCCR(fep->pps_channel)); fep 200 drivers/net/ethernet/freescale/fec_ptp.c fep->next_counter = (fep->next_counter + fep->reload_period) & fep->cc.mask; fep 202 drivers/net/ethernet/freescale/fec_ptp.c writel(0, fep->hwp + FEC_TCSR(fep->pps_channel)); fep 205 drivers/net/ethernet/freescale/fec_ptp.c fep->pps_enable = enable; fep 206 drivers/net/ethernet/freescale/fec_ptp.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 221 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = fep 224 drivers/net/ethernet/freescale/fec_ptp.c platform_get_device_id(fep->pdev); fep 227 drivers/net/ethernet/freescale/fec_ptp.c tempval = readl(fep->hwp + FEC_ATIME_CTRL); fep 229 drivers/net/ethernet/freescale/fec_ptp.c writel(tempval, fep->hwp + FEC_ATIME_CTRL); fep 234 drivers/net/ethernet/freescale/fec_ptp.c return readl(fep->hwp + FEC_ATIME); fep 247 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = netdev_priv(ndev); fep 251 drivers/net/ethernet/freescale/fec_ptp.c inc = 1000000000 / fep->cycle_speed; fep 254 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 257 drivers/net/ethernet/freescale/fec_ptp.c writel(inc << FEC_T_INC_OFFSET, fep->hwp + FEC_ATIME_INC); fep 260 drivers/net/ethernet/freescale/fec_ptp.c writel(FEC_COUNTER_PERIOD, fep->hwp + FEC_ATIME_EVT_PERIOD); fep 263 drivers/net/ethernet/freescale/fec_ptp.c fep->hwp + FEC_ATIME_CTRL); fep 265 drivers/net/ethernet/freescale/fec_ptp.c memset(&fep->cc, 0, sizeof(fep->cc)); fep 266 drivers/net/ethernet/freescale/fec_ptp.c fep->cc.read = fec_ptp_read; fep 267 drivers/net/ethernet/freescale/fec_ptp.c fep->cc.mask = CLOCKSOURCE_MASK(31); fep 268 drivers/net/ethernet/freescale/fec_ptp.c fep->cc.shift = 31; fep 269 drivers/net/ethernet/freescale/fec_ptp.c fep->cc.mult = FEC_CC_MULT; fep 272 drivers/net/ethernet/freescale/fec_ptp.c timecounter_init(&fep->tc, &fep->cc, ktime_to_ns(ktime_get_real())); fep 274 drivers/net/ethernet/freescale/fec_ptp.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 297 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = fep 313 drivers/net/ethernet/freescale/fec_ptp.c rhs = (u64)ppb * (u64)fep->ptp_inc; fep 314 drivers/net/ethernet/freescale/fec_ptp.c for (i = 1; i <= fep->ptp_inc; i++) { fep 325 drivers/net/ethernet/freescale/fec_ptp.c if (i > fep->ptp_inc) { fep 326 drivers/net/ethernet/freescale/fec_ptp.c corr_inc = fep->ptp_inc; fep 331 drivers/net/ethernet/freescale/fec_ptp.c corr_ns = fep->ptp_inc - corr_inc; fep 333 drivers/net/ethernet/freescale/fec_ptp.c corr_ns = fep->ptp_inc + corr_inc; fep 335 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 337 drivers/net/ethernet/freescale/fec_ptp.c tmp = readl(fep->hwp + FEC_ATIME_INC) & FEC_T_INC_MASK; fep 339 drivers/net/ethernet/freescale/fec_ptp.c writel(tmp, fep->hwp + FEC_ATIME_INC); fep 341 drivers/net/ethernet/freescale/fec_ptp.c writel(corr_period, fep->hwp + FEC_ATIME_CORR); fep 343 drivers/net/ethernet/freescale/fec_ptp.c timecounter_read(&fep->tc); fep 345 drivers/net/ethernet/freescale/fec_ptp.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 359 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = fep 363 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 364 drivers/net/ethernet/freescale/fec_ptp.c timecounter_adjtime(&fep->tc, delta); fep 365 drivers/net/ethernet/freescale/fec_ptp.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 405 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = fep 412 drivers/net/ethernet/freescale/fec_ptp.c mutex_lock(&fep->ptp_clk_mutex); fep 414 drivers/net/ethernet/freescale/fec_ptp.c if (!fep->ptp_clk_on) { fep 415 drivers/net/ethernet/freescale/fec_ptp.c mutex_unlock(&fep->ptp_clk_mutex); fep 423 drivers/net/ethernet/freescale/fec_ptp.c counter = ns & fep->cc.mask; fep 425 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 426 drivers/net/ethernet/freescale/fec_ptp.c writel(counter, fep->hwp + FEC_ATIME); fep 427 drivers/net/ethernet/freescale/fec_ptp.c timecounter_init(&fep->tc, &fep->cc, ns); fep 428 drivers/net/ethernet/freescale/fec_ptp.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 429 drivers/net/ethernet/freescale/fec_ptp.c mutex_unlock(&fep->ptp_clk_mutex); fep 443 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = fep 448 drivers/net/ethernet/freescale/fec_ptp.c ret = fec_ptp_enable_pps(fep, on); fep 457 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = netdev_priv(ndev); fep 470 drivers/net/ethernet/freescale/fec_ptp.c fep->hwts_tx_en = 0; fep 473 drivers/net/ethernet/freescale/fec_ptp.c fep->hwts_tx_en = 1; fep 481 drivers/net/ethernet/freescale/fec_ptp.c if (fep->hwts_rx_en) fep 482 drivers/net/ethernet/freescale/fec_ptp.c fep->hwts_rx_en = 0; fep 487 drivers/net/ethernet/freescale/fec_ptp.c fep->hwts_rx_en = 1; fep 498 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = netdev_priv(ndev); fep 502 drivers/net/ethernet/freescale/fec_ptp.c config.tx_type = fep->hwts_tx_en ? HWTSTAMP_TX_ON : HWTSTAMP_TX_OFF; fep 503 drivers/net/ethernet/freescale/fec_ptp.c config.rx_filter = (fep->hwts_rx_en ? fep 517 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = container_of(dwork, struct fec_enet_private, time_keep); fep 521 drivers/net/ethernet/freescale/fec_ptp.c mutex_lock(&fep->ptp_clk_mutex); fep 522 drivers/net/ethernet/freescale/fec_ptp.c if (fep->ptp_clk_on) { fep 523 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_irqsave(&fep->tmreg_lock, flags); fep 524 drivers/net/ethernet/freescale/fec_ptp.c ns = timecounter_read(&fep->tc); fep 525 drivers/net/ethernet/freescale/fec_ptp.c spin_unlock_irqrestore(&fep->tmreg_lock, flags); fep 527 drivers/net/ethernet/freescale/fec_ptp.c mutex_unlock(&fep->ptp_clk_mutex); fep 529 drivers/net/ethernet/freescale/fec_ptp.c schedule_delayed_work(&fep->time_keep, HZ); fep 536 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = netdev_priv(ndev); fep 538 drivers/net/ethernet/freescale/fec_ptp.c u8 channel = fep->pps_channel; fep 541 drivers/net/ethernet/freescale/fec_ptp.c val = readl(fep->hwp + FEC_TCSR(channel)); fep 546 drivers/net/ethernet/freescale/fec_ptp.c writel(fep->next_counter, fep->hwp + FEC_TCCR(channel)); fep 548 drivers/net/ethernet/freescale/fec_ptp.c writel(val, fep->hwp + FEC_TCSR(channel)); fep 549 drivers/net/ethernet/freescale/fec_ptp.c } while (readl(fep->hwp + FEC_TCSR(channel)) & FEC_T_TF_MASK); fep 552 drivers/net/ethernet/freescale/fec_ptp.c fep->next_counter = (fep->next_counter + fep->reload_period) & fep 553 drivers/net/ethernet/freescale/fec_ptp.c fep->cc.mask; fep 556 drivers/net/ethernet/freescale/fec_ptp.c ptp_clock_event(fep->ptp_clock, &event); fep 575 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = netdev_priv(ndev); fep 579 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.owner = THIS_MODULE; fep 580 drivers/net/ethernet/freescale/fec_ptp.c snprintf(fep->ptp_caps.name, 16, "fec ptp"); fep 582 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.max_adj = 250000000; fep 583 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.n_alarm = 0; fep 584 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.n_ext_ts = 0; fep 585 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.n_per_out = 0; fep 586 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.n_pins = 0; fep 587 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.pps = 1; fep 588 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.adjfreq = fec_ptp_adjfreq; fep 589 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.adjtime = fec_ptp_adjtime; fep 590 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.gettime64 = fec_ptp_gettime; fep 591 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.settime64 = fec_ptp_settime; fep 592 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_caps.enable = fec_ptp_enable; fep 594 drivers/net/ethernet/freescale/fec_ptp.c fep->cycle_speed = clk_get_rate(fep->clk_ptp); fep 595 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_inc = NSEC_PER_SEC / fep->cycle_speed; fep 597 drivers/net/ethernet/freescale/fec_ptp.c spin_lock_init(&fep->tmreg_lock); fep 601 drivers/net/ethernet/freescale/fec_ptp.c INIT_DELAYED_WORK(&fep->time_keep, fec_time_keep); fep 617 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_clock = ptp_clock_register(&fep->ptp_caps, &pdev->dev); fep 618 drivers/net/ethernet/freescale/fec_ptp.c if (IS_ERR(fep->ptp_clock)) { fep 619 drivers/net/ethernet/freescale/fec_ptp.c fep->ptp_clock = NULL; fep 623 drivers/net/ethernet/freescale/fec_ptp.c schedule_delayed_work(&fep->time_keep, HZ); fep 629 drivers/net/ethernet/freescale/fec_ptp.c struct fec_enet_private *fep = netdev_priv(ndev); fep 631 drivers/net/ethernet/freescale/fec_ptp.c cancel_delayed_work_sync(&fep->time_keep); fep 632 drivers/net/ethernet/freescale/fec_ptp.c if (fep->ptp_clock) fep 633 drivers/net/ethernet/freescale/fec_ptp.c ptp_clock_unregister(fep->ptp_clock); fep 72 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 74 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->set_multicast_list)(dev); fep 88 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = container_of(napi, struct fs_enet_private, napi); fep 89 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct net_device *dev = fep->ndev; fep 90 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c const struct fs_platform_info *fpi = fep->fpi; fep 99 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock(&fep->tx_lock); fep 100 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->dirty_tx; fep 103 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->napi_clear_event)(dev); fep 107 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dirtyidx = bdp - fep->tx_bd_base; fep 109 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (fep->tx_free == fep->tx_ring) fep 112 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c skb = fep->tx_skbuff[dirtyidx]; fep 139 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dev_warn(fep->dev, fep 151 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (fep->mapped_as_page[dirtyidx]) fep 152 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_unmap_page(fep->dev, CBDR_BUFADDR(bdp), fep 155 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp), fep 163 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_skbuff[dirtyidx] = NULL; fep 172 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->tx_bd_base; fep 178 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (++fep->tx_free == MAX_SKB_FRAGS) fep 183 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->dirty_tx = bdp; fep 186 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->tx_restart)(dev); fep 188 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock(&fep->tx_lock); fep 197 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->cur_rx; fep 201 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c curidx = bdp - fep->rx_bd_base; fep 208 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dev_warn(fep->dev, "rcv is not +last\n"); fep 229 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c skbn = fep->rx_skbuff[curidx]; fep 231 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c skb = fep->rx_skbuff[curidx]; fep 248 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_sync_single_for_cpu(fep->dev, fep 261 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_unmap_single(fep->dev, fep 266 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma = dma_map_single(fep->dev, fep 285 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_skbuff[curidx] = skbn; fep 295 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->rx_bd_base; fep 297 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->rx_bd_done)(dev); fep 300 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->cur_rx = bdp; fep 305 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->napi_enable)(dev); fep 321 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep; fep 328 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep = netdev_priv(dev); fep 329 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fpi = fep->fpi; fep 332 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c while ((int_events = (*fep->ops->get_int_events)(dev)) != 0) { fep 336 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c int_clr_events &= ~fep->ev_napi; fep 338 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->clear_int_events)(dev, int_clr_events); fep 340 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (int_events & fep->ev_err) fep 341 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->ev_error)(dev, int_events); fep 343 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (int_events & fep->ev) { fep 344 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c napi_ok = napi_schedule_prep(&fep->napi); fep 346 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->napi_disable)(dev); fep 347 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->clear_int_events)(dev, fep->ev_napi); fep 352 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c __napi_schedule(&fep->napi); fep 363 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 370 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->dirty_tx = fep->cur_tx = fep->tx_bd_base; fep 371 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_free = fep->tx_ring; fep 372 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->cur_rx = fep->rx_bd_base; fep 377 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c for (i = 0, bdp = fep->rx_bd_base; i < fep->rx_ring; i++, bdp++) { fep 383 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_skbuff[i] = skb; fep 385 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_map_single(fep->dev, skb->data, fep 390 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c ((i < fep->rx_ring - 1) ? 0 : BD_SC_WRAP)); fep 395 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c for (; i < fep->rx_ring; i++, bdp++) { fep 396 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_skbuff[i] = NULL; fep 397 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c CBDW_SC(bdp, (i < fep->rx_ring - 1) ? 0 : BD_SC_WRAP); fep 403 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c for (i = 0, bdp = fep->tx_bd_base; i < fep->tx_ring; i++, bdp++) { fep 404 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_skbuff[i] = NULL; fep 407 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c CBDW_SC(bdp, (i < fep->tx_ring - 1) ? 0 : BD_SC_WRAP); fep 413 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 421 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c for (i = 0, bdp = fep->tx_bd_base; i < fep->tx_ring; i++, bdp++) { fep 422 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if ((skb = fep->tx_skbuff[i]) == NULL) fep 426 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp), fep 429 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_skbuff[i] = NULL; fep 436 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c for (i = 0, bdp = fep->rx_bd_base; i < fep->rx_ring; i++, bdp++) { fep 437 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if ((skb = fep->rx_skbuff[i]) == NULL) fep 441 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dma_unmap_single(fep->dev, CBDR_BUFADDR(bdp), fep 445 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_skbuff[i] = NULL; fep 487 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 524 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock(&fep->tx_lock); fep 529 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->cur_tx; fep 532 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (fep->tx_free <= nr_frags || (CBDR_SC(bdp) & BD_ENET_TX_READY)) { fep 534 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock(&fep->tx_lock); fep 540 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dev_warn(fep->dev, "tx queue full!.\n"); fep 544 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c curidx = bdp - fep->tx_bd_base; fep 550 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_free -= nr_frags + 1; fep 554 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c CBDW_BUFADDR(bdp, dma_map_single(fep->dev, fep 558 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->mapped_as_page[curidx] = 0; fep 569 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->tx_bd_base, curidx = 0; fep 572 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c CBDW_BUFADDR(bdp, skb_frag_dma_map(fep->dev, frag, 0, len, fep 576 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_skbuff[curidx] = NULL; fep 577 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->mapped_as_page[curidx] = 1; fep 596 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_skbuff[curidx] = skb; fep 602 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c bdp = fep->tx_bd_base; fep 603 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->cur_tx = bdp; fep 605 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (fep->tx_free < MAX_SKB_FRAGS) fep 610 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->tx_kickstart)(dev); fep 612 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock(&fep->tx_lock); fep 619 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = container_of(work, struct fs_enet_private, fep 621 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct net_device *dev = fep->ndev; fep 627 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock_irqsave(&fep->lock, flags); fep 631 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->stop)(dev); fep 632 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->restart)(dev); fep 636 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c wake = fep->tx_free >= MAX_SKB_FRAGS && fep 637 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c !(CBDR_SC(fep->cur_tx) & BD_ENET_TX_READY); fep 638 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock_irqrestore(&fep->lock, flags); fep 646 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 648 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c schedule_work(&fep->timeout_work); fep 656 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 662 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (phydev->duplex != fep->oldduplex) { fep 664 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldduplex = phydev->duplex; fep 667 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (phydev->speed != fep->oldspeed) { fep 669 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldspeed = phydev->speed; fep 672 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (!fep->oldlink) { fep 674 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldlink = 1; fep 678 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops->restart(dev); fep 679 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c } else if (fep->oldlink) { fep 681 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldlink = 0; fep 682 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldspeed = 0; fep 683 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldduplex = -1; fep 686 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (new_state && netif_msg_link(fep)) fep 693 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 696 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock_irqsave(&fep->lock, flags); fep 698 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if(fep->ops->adjust_link) fep 699 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops->adjust_link(dev); fep 703 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock_irqrestore(&fep->lock, flags); fep 708 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 712 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldlink = 0; fep 713 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldspeed = 0; fep 714 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->oldduplex = -1; fep 716 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c iface = fep->fpi->use_rmii ? fep 719 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c phydev = of_phy_connect(dev, fep->fpi->phy_node, &fs_adjust_link, 0, fep 731 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 737 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fs_init_bds(fep->ndev); fep 739 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c napi_enable(&fep->napi); fep 742 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c r = request_irq(fep->interrupt, fs_enet_interrupt, IRQF_SHARED, fep 745 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dev_err(fep->dev, "Could not allocate FS_ENET IRQ!"); fep 746 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c napi_disable(&fep->napi); fep 752 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c free_irq(fep->interrupt, dev); fep 753 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c napi_disable(&fep->napi); fep 765 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 770 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c napi_disable(&fep->napi); fep 771 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c cancel_work_sync(&fep->timeout_work); fep 774 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock_irqsave(&fep->lock, flags); fep 775 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock(&fep->tx_lock); fep 776 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c (*fep->ops->stop)(dev); fep 777 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock(&fep->tx_lock); fep 778 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock_irqrestore(&fep->lock, flags); fep 782 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c free_irq(fep->interrupt, dev); fep 798 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 800 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c return (*fep->ops->get_regs_len)(dev); fep 806 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 812 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock_irqsave(&fep->lock, flags); fep 813 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c r = (*fep->ops->get_regs)(dev, p, &len); fep 814 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_unlock_irqrestore(&fep->lock, flags); fep 822 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 823 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c return fep->msg_enable; fep 828 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 829 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->msg_enable = value; fep 835 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 836 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_platform_info *fpi = fep->fpi; fep 854 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(dev); fep 855 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_platform_info *fpi = fep->fpi; fep 923 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep; fep 984 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c privsize = sizeof(*fep) + fep 998 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep = netdev_priv(ndev); fep 999 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->dev = &ofdev->dev; fep 1000 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ndev = ndev; fep 1001 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->fpi = fpi; fep 1002 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops = match->data; fep 1004 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c ret = fep->ops->setup_data(ndev); fep 1008 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_skbuff = (struct sk_buff **)&fep[1]; fep 1009 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_skbuff = fep->rx_skbuff + fpi->rx_ring; fep 1010 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->mapped_as_page = (char *)(fep->rx_skbuff + fpi->rx_ring + fep 1013 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock_init(&fep->lock); fep 1014 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c spin_lock_init(&fep->tx_lock); fep 1020 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c ret = fep->ops->allocate_bd(ndev); fep 1024 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_bd_base = fep->ring_base; fep 1025 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_bd_base = fep->rx_bd_base + fpi->rx_ring; fep 1027 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->tx_ring = fpi->tx_ring; fep 1028 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->rx_ring = fpi->rx_ring; fep 1032 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c INIT_WORK(&fep->timeout_work, fs_timeout_work); fep 1033 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c netif_napi_add(ndev, &fep->napi, fs_enet_napi, fpi->napi_weight); fep 1050 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops->free_bd(ndev); fep 1052 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops->cleanup_data(ndev); fep 1070 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c struct fs_enet_private *fep = netdev_priv(ndev); fep 1074 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops->free_bd(ndev); fep 1075 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c fep->ops->cleanup_data(ndev); fep 1076 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c dev_set_drvdata(fep->dev, NULL); fep 1077 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c of_node_put(fep->fpi->phy_node); fep 1078 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c if (fep->fpi->clk_per) fep 1079 drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c clk_disable_unprepare(fep->fpi->clk_per); fep 79 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op) fep 81 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c const struct fs_platform_info *fpi = fep->fpi; fep 86 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c static int do_pd_setup(struct fs_enet_private *fep) fep 88 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct platform_device *ofdev = to_platform_device(fep->dev); fep 89 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_platform_info *fpi = fep->fpi; fep 92 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0); fep 93 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (!fep->interrupt) fep 96 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0); fep 97 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (!fep->fcc.fccp) fep 100 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1); fep 101 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (!fep->fcc.ep) fep 104 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2); fep 105 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (!fep->fcc.fcccp) fep 108 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->fcc.mem = (void __iomem *)cpm2_immr; fep 118 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c iounmap(fep->fcc.fcccp); fep 120 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c iounmap(fep->fcc.ep); fep 122 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c iounmap(fep->fcc.fccp); fep 133 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 135 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (do_pd_setup(fep) != 0) fep 138 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->ev_napi = FCC_NAPI_EVENT_MSK; fep 139 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->ev = FCC_EVENT; fep 140 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->ev_err = FCC_ERR_EVENT_MSK; fep 147 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 148 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c const struct fs_platform_info *fpi = fep->fpi; fep 150 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->ring_base = (void __iomem __force *)dma_alloc_coherent(fep->dev, fep 152 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c sizeof(cbd_t), &fep->ring_mem_addr, fep 154 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (fep->ring_base == NULL) fep 162 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 163 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c const struct fs_platform_info *fpi = fep->fpi; fep 165 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c if (fep->ring_base) fep 166 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c dma_free_coherent(fep->dev, fep 168 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c (void __force *)fep->ring_base, fep->ring_mem_addr); fep 178 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 179 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 186 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 187 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_enet_t __iomem *ep = fep->fcc.ep; fep 195 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 196 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_enet_t __iomem *ep = fep->fcc.ep; fep 206 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_cr_cmd(fep, CPM_CR_SET_GADDR); fep 211 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 212 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 213 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_enet_t __iomem *ep = fep->fcc.ep; fep 227 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->fcc.gaddrh = R32(ep, fen_gaddrh); fep 228 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->fcc.gaddrl = R32(ep, fen_gaddrl); fep 246 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 247 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c const struct fs_platform_info *fpi = fep->fpi; fep 248 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 249 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_c_t __iomem *fcccp = fep->fcc.fcccp; fep 250 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_enet_t __iomem *ep = fep->fcc.ep; fep 263 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c rx_bd_base_phys = fep->ring_mem_addr; fep 290 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c memset_io(fep->fcc.mem + fpi->dpram_offset + 64, 0x88, 32); fep 313 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c W32(ep, fen_gaddrh, fep->fcc.gaddrh); fep 314 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c W32(ep, fen_gaddrl, fep->fcc.gaddrh); fep 375 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_cr_cmd(fep, CPM_CR_INIT_TRX); fep 408 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 409 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 425 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 426 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 433 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 434 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 441 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 442 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 454 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 455 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 462 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 463 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 470 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 471 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 478 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 480 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c dev_warn(fep->dev, "FS_ENET ERROR(s) 0x%x\n", int_events); fep 485 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 490 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c memcpy_fromio(p, fep->fcc.fccp, sizeof(fcc_t)); fep 493 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c memcpy_fromio(p, fep->fcc.ep, sizeof(fcc_enet_t)); fep 496 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c memcpy_fromio(p, fep->fcc.fcccp, 1); fep 518 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c struct fs_enet_private *fep = netdev_priv(dev); fep 519 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_t __iomem *fccp = fep->fcc.fccp; fep 520 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c const struct fs_platform_info *fpi = fep->fpi; fep 521 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_enet_t __iomem *ep = fep->fcc.ep; fep 527 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c last_tx_bd = fep->tx_bd_base + (fpi->tx_ring - 1); fep 531 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c ((R32(ep, fen_genfcc.fcc_tbptr) - fep->ring_mem_addr) + fep 532 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->ring_base); fep 534 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c prev_bd = (recheck_bd == fep->tx_bd_base) ? last_tx_bd : recheck_bd - 1; fep 543 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c prev_bd = (prev_bd == fep->tx_bd_base) ? last_tx_bd : prev_bd - 1; fep 551 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c (uint) (((void *)recheck_bd - fep->ring_base) + fep 552 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->ring_mem_addr)); fep 553 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fep->dirty_tx = recheck_bd; fep 559 drivers/net/ethernet/freescale/fs_enet/mac-fcc.c fcc_cr_cmd(fep, CPM_CR_RESTART_TX); fep 92 drivers/net/ethernet/freescale/fs_enet/mac-fec.c static int do_pd_setup(struct fs_enet_private *fep) fep 94 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct platform_device *ofdev = to_platform_device(fep->dev); fep 96 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0); fep 97 drivers/net/ethernet/freescale/fs_enet/mac-fec.c if (!fep->interrupt) fep 100 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); fep 101 drivers/net/ethernet/freescale/fs_enet/mac-fec.c if (!fep->fcc.fccp) fep 114 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 116 drivers/net/ethernet/freescale/fs_enet/mac-fec.c if (do_pd_setup(fep) != 0) fep 119 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.hthi = 0; fep 120 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.htlo = 0; fep 122 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->ev_napi = FEC_NAPI_EVENT_MSK; fep 123 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->ev = FEC_EVENT; fep 124 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->ev_err = FEC_ERR_EVENT_MSK; fep 131 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 132 drivers/net/ethernet/freescale/fs_enet/mac-fec.c const struct fs_platform_info *fpi = fep->fpi; fep 134 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->ring_base = (void __force __iomem *)dma_alloc_coherent(fep->dev, fep 136 drivers/net/ethernet/freescale/fs_enet/mac-fec.c sizeof(cbd_t), &fep->ring_mem_addr, fep 138 drivers/net/ethernet/freescale/fs_enet/mac-fec.c if (fep->ring_base == NULL) fep 146 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 147 drivers/net/ethernet/freescale/fs_enet/mac-fec.c const struct fs_platform_info *fpi = fep->fpi; fep 149 drivers/net/ethernet/freescale/fs_enet/mac-fec.c if(fep->ring_base) fep 150 drivers/net/ethernet/freescale/fs_enet/mac-fec.c dma_free_coherent(fep->dev, (fpi->tx_ring + fpi->rx_ring) fep 152 drivers/net/ethernet/freescale/fs_enet/mac-fec.c (void __force *)fep->ring_base, fep 153 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->ring_mem_addr); fep 163 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 164 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 171 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 173 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.hthi = 0; fep 174 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.htlo = 0; fep 179 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 193 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.hthi |= csrVal; fep 195 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.htlo |= csrVal; fep 200 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 201 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 206 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.hthi = 0xffffffffU; fep 207 drivers/net/ethernet/freescale/fs_enet/mac-fec.c fep->fec.htlo = 0xffffffffU; fep 211 drivers/net/ethernet/freescale/fs_enet/mac-fec.c FW(fecp, grp_hash_table_high, fep->fec.hthi); fep 212 drivers/net/ethernet/freescale/fs_enet/mac-fec.c FW(fecp, grp_hash_table_low, fep->fec.htlo); fep 230 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 231 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 232 drivers/net/ethernet/freescale/fs_enet/mac-fec.c const struct fs_platform_info *fpi = fep->fpi; fep 240 drivers/net/ethernet/freescale/fs_enet/mac-fec.c r = whack_reset(fep->fec.fecp); fep 242 drivers/net/ethernet/freescale/fs_enet/mac-fec.c dev_err(fep->dev, "FEC Reset FAILED!\n"); fep 258 drivers/net/ethernet/freescale/fs_enet/mac-fec.c FW(fecp, grp_hash_table_high, fep->fec.hthi); fep 259 drivers/net/ethernet/freescale/fs_enet/mac-fec.c FW(fecp, grp_hash_table_low, fep->fec.htlo); fep 272 drivers/net/ethernet/freescale/fs_enet/mac-fec.c rx_bd_base_phys = fep->ring_mem_addr; fep 302 drivers/net/ethernet/freescale/fs_enet/mac-fec.c FW(fecp, ivec, (virq_to_hw(fep->interrupt) / 2) << 29); fep 342 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 343 drivers/net/ethernet/freescale/fs_enet/mac-fec.c const struct fs_platform_info *fpi = fep->fpi; fep 344 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 359 drivers/net/ethernet/freescale/fs_enet/mac-fec.c dev_warn(fep->dev, "FEC timeout on graceful transmit stop\n"); fep 381 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 382 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 389 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 390 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 397 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 398 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 405 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 406 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 413 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 414 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 421 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 422 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 429 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 430 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fec __iomem *fecp = fep->fec.fecp; fep 437 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 439 drivers/net/ethernet/freescale/fs_enet/mac-fec.c dev_warn(fep->dev, "FEC ERROR(s) 0x%x\n", int_events); fep 444 drivers/net/ethernet/freescale/fs_enet/mac-fec.c struct fs_enet_private *fep = netdev_priv(dev); fep 449 drivers/net/ethernet/freescale/fs_enet/mac-fec.c memcpy_fromio(p, fep->fec.fecp, sizeof(struct fec)); fep 84 drivers/net/ethernet/freescale/fs_enet/mac-scc.c static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op) fep 86 drivers/net/ethernet/freescale/fs_enet/mac-scc.c const struct fs_platform_info *fpi = fep->fpi; fep 91 drivers/net/ethernet/freescale/fs_enet/mac-scc.c static int do_pd_setup(struct fs_enet_private *fep) fep 93 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct platform_device *ofdev = to_platform_device(fep->dev); fep 95 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0); fep 96 drivers/net/ethernet/freescale/fs_enet/mac-scc.c if (!fep->interrupt) fep 99 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0); fep 100 drivers/net/ethernet/freescale/fs_enet/mac-scc.c if (!fep->scc.sccp) fep 103 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->scc.ep = of_iomap(ofdev->dev.of_node, 1); fep 104 drivers/net/ethernet/freescale/fs_enet/mac-scc.c if (!fep->scc.ep) { fep 105 drivers/net/ethernet/freescale/fs_enet/mac-scc.c iounmap(fep->scc.sccp); fep 118 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 120 drivers/net/ethernet/freescale/fs_enet/mac-scc.c do_pd_setup(fep); fep 122 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->scc.hthi = 0; fep 123 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->scc.htlo = 0; fep 125 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->ev_napi = SCC_NAPI_EVENT_MSK; fep 126 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->ev = SCC_EVENT | SCCE_ENET_TXE; fep 127 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->ev_err = SCC_ERR_EVENT_MSK; fep 134 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 135 drivers/net/ethernet/freescale/fs_enet/mac-scc.c const struct fs_platform_info *fpi = fep->fpi; fep 137 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->ring_mem_addr = cpm_dpalloc((fpi->tx_ring + fpi->rx_ring) * fep 139 drivers/net/ethernet/freescale/fs_enet/mac-scc.c if (IS_ERR_VALUE(fep->ring_mem_addr)) fep 142 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->ring_base = (void __iomem __force*) fep 143 drivers/net/ethernet/freescale/fs_enet/mac-scc.c cpm_dpram_addr(fep->ring_mem_addr); fep 150 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 152 drivers/net/ethernet/freescale/fs_enet/mac-scc.c if (fep->ring_base) fep 153 drivers/net/ethernet/freescale/fs_enet/mac-scc.c cpm_dpfree(fep->ring_mem_addr); fep 163 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 164 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 171 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 172 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_enet_t __iomem *ep = fep->scc.ep; fep 182 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 183 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_enet_t __iomem *ep = fep->scc.ep; fep 193 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_cr_cmd(fep, CPM_CR_SET_GADDR); fep 198 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 199 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 200 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_enet_t __iomem *ep = fep->scc.ep; fep 236 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 237 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 238 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_enet_t __iomem *ep = fep->scc.ep; fep 239 drivers/net/ethernet/freescale/fs_enet/mac-scc.c const struct fs_platform_info *fpi = fep->fpi; fep 251 drivers/net/ethernet/freescale/fs_enet/mac-scc.c W16(ep, sen_genscc.scc_rbase, fep->ring_mem_addr); fep 253 drivers/net/ethernet/freescale/fs_enet/mac-scc.c fep->ring_mem_addr + sizeof(cbd_t) * fpi->rx_ring); fep 319 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_cr_cmd(fep, CPM_CR_INIT_TRX); fep 356 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 357 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 364 drivers/net/ethernet/freescale/fs_enet/mac-scc.c dev_warn(fep->dev, "SCC timeout on graceful transmit stop\n"); fep 374 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 375 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 382 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 383 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 390 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 391 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 408 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 409 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 416 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 417 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_t __iomem *sccp = fep->scc.sccp; fep 424 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 426 drivers/net/ethernet/freescale/fs_enet/mac-scc.c dev_warn(fep->dev, "SCC ERROR(s) 0x%x\n", int_events); fep 431 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 436 drivers/net/ethernet/freescale/fs_enet/mac-scc.c memcpy_fromio(p, fep->scc.sccp, sizeof(scc_t)); fep 439 drivers/net/ethernet/freescale/fs_enet/mac-scc.c memcpy_fromio(p, fep->scc.ep, sizeof(scc_enet_t __iomem *)); fep 451 drivers/net/ethernet/freescale/fs_enet/mac-scc.c struct fs_enet_private *fep = netdev_priv(dev); fep 453 drivers/net/ethernet/freescale/fs_enet/mac-scc.c scc_cr_cmd(fep, CPM_CR_RESTART_TX);