Lines Matching +full:mixed +full:- +full:burst

1 // SPDX-License-Identifier: GPL-2.0-only
3 * This is the driver for the GMAC on-chip Ethernet controller for ST SoCs.
22 pr_info("dwmac4: Master AXI performs %s burst length\n", in dwmac4_dma_axi()
25 if (axi->axi_lpi_en) in dwmac4_dma_axi()
27 if (axi->axi_xit_frm) in dwmac4_dma_axi()
31 value |= (axi->axi_wr_osr_lmt & DMA_AXI_OSR_MAX) << in dwmac4_dma_axi()
35 value |= (axi->axi_rd_osr_lmt & DMA_AXI_OSR_MAX) << in dwmac4_dma_axi()
38 /* Depending on the UNDEF bit the Master AXI will perform any burst in dwmac4_dma_axi()
43 switch (axi->axi_blen[i]) { in dwmac4_dma_axi()
76 u32 rxpbl = dma_cfg->rxpbl ?: dma_cfg->pbl; in dwmac4_dma_init_rx_chan()
82 if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT) && likely(dma_cfg->eame)) in dwmac4_dma_init_rx_chan()
94 u32 txpbl = dma_cfg->txpbl ?: dma_cfg->pbl; in dwmac4_dma_init_tx_chan()
104 if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT) && likely(dma_cfg->eame)) in dwmac4_dma_init_tx_chan()
118 if (dma_cfg->pblx8) in dwmac4_dma_init_channel()
134 if (dma_cfg->pblx8) in dwmac410_dma_init_channel()
149 /* Set the Fixed burst mode */ in dwmac4_dma_init()
150 if (dma_cfg->fixed_burst) in dwmac4_dma_init()
153 /* Mixed Burst has no effect when fb is set */ in dwmac4_dma_init()
154 if (dma_cfg->mixed_burst) in dwmac4_dma_init()
157 if (dma_cfg->aal) in dwmac4_dma_init()
160 if (dma_cfg->eame) in dwmac4_dma_init()
167 if (dma_cfg->multi_msi_en) { in dwmac4_dma_init()
172 if (dma_cfg->dche) in dwmac4_dma_init()
234 unsigned int rqs = fifosz / 256 - 1; in dwmac4_dma_rx_chan_op_mode()
278 rfd = 0x03; /* Full-2.5K */ in dwmac4_dma_rx_chan_op_mode()
279 rfa = 0x01; /* Full-1.5K */ in dwmac4_dma_rx_chan_op_mode()
283 rfd = 0x07; /* Full-4.5K */ in dwmac4_dma_rx_chan_op_mode()
284 rfa = 0x04; /* Full-3K */ in dwmac4_dma_rx_chan_op_mode()
302 unsigned int tqs = fifosz / 256 - 1; in dwmac4_dma_tx_chan_op_mode()
306 /* Transmit COE type 2 cannot be done in cut-through mode. */ in dwmac4_dma_tx_chan_op_mode()
335 * TXQEN must be written for multi-channel operation and TQS must in dwmac4_dma_tx_chan_op_mode()
356 dma_cap->mbps_10_100 = (hw_cap & GMAC_HW_FEAT_MIISEL); in dwmac4_get_hw_feature()
357 dma_cap->mbps_1000 = (hw_cap & GMAC_HW_FEAT_GMIISEL) >> 1; in dwmac4_get_hw_feature()
358 dma_cap->half_duplex = (hw_cap & GMAC_HW_FEAT_HDSEL) >> 2; in dwmac4_get_hw_feature()
359 dma_cap->vlhash = (hw_cap & GMAC_HW_FEAT_VLHASH) >> 4; in dwmac4_get_hw_feature()
360 dma_cap->multi_addr = (hw_cap & GMAC_HW_FEAT_ADDMAC) >> 18; in dwmac4_get_hw_feature()
361 dma_cap->pcs = (hw_cap & GMAC_HW_FEAT_PCSSEL) >> 3; in dwmac4_get_hw_feature()
362 dma_cap->sma_mdio = (hw_cap & GMAC_HW_FEAT_SMASEL) >> 5; in dwmac4_get_hw_feature()
363 dma_cap->pmt_remote_wake_up = (hw_cap & GMAC_HW_FEAT_RWKSEL) >> 6; in dwmac4_get_hw_feature()
364 dma_cap->pmt_magic_frame = (hw_cap & GMAC_HW_FEAT_MGKSEL) >> 7; in dwmac4_get_hw_feature()
366 dma_cap->rmon = (hw_cap & GMAC_HW_FEAT_MMCSEL) >> 8; in dwmac4_get_hw_feature()
367 /* IEEE 1588-2008 */ in dwmac4_get_hw_feature()
368 dma_cap->atime_stamp = (hw_cap & GMAC_HW_FEAT_TSSEL) >> 12; in dwmac4_get_hw_feature()
369 /* 802.3az - Energy-Efficient Ethernet (EEE) */ in dwmac4_get_hw_feature()
370 dma_cap->eee = (hw_cap & GMAC_HW_FEAT_EEESEL) >> 13; in dwmac4_get_hw_feature()
372 dma_cap->tx_coe = (hw_cap & GMAC_HW_FEAT_TXCOSEL) >> 14; in dwmac4_get_hw_feature()
373 dma_cap->rx_coe = (hw_cap & GMAC_HW_FEAT_RXCOESEL) >> 16; in dwmac4_get_hw_feature()
374 dma_cap->vlins = (hw_cap & GMAC_HW_FEAT_SAVLANINS) >> 27; in dwmac4_get_hw_feature()
375 dma_cap->arpoffsel = (hw_cap & GMAC_HW_FEAT_ARPOFFSEL) >> 9; in dwmac4_get_hw_feature()
379 dma_cap->l3l4fnum = (hw_cap & GMAC_HW_FEAT_L3L4FNUM) >> 27; in dwmac4_get_hw_feature()
380 dma_cap->hash_tb_sz = (hw_cap & GMAC_HW_HASH_TB_SZ) >> 24; in dwmac4_get_hw_feature()
381 dma_cap->av = (hw_cap & GMAC_HW_FEAT_AVSEL) >> 20; in dwmac4_get_hw_feature()
382 dma_cap->tsoen = (hw_cap & GMAC_HW_TSOEN) >> 18; in dwmac4_get_hw_feature()
383 dma_cap->sphen = (hw_cap & GMAC_HW_FEAT_SPHEN) >> 17; in dwmac4_get_hw_feature()
385 dma_cap->addr64 = (hw_cap & GMAC_HW_ADDR64) >> 14; in dwmac4_get_hw_feature()
386 switch (dma_cap->addr64) { in dwmac4_get_hw_feature()
388 dma_cap->addr64 = 32; in dwmac4_get_hw_feature()
391 dma_cap->addr64 = 40; in dwmac4_get_hw_feature()
394 dma_cap->addr64 = 48; in dwmac4_get_hw_feature()
397 dma_cap->addr64 = 32; in dwmac4_get_hw_feature()
404 dma_cap->tx_fifo_size = 128 << ((hw_cap & GMAC_HW_TXFIFOSIZE) >> 6); in dwmac4_get_hw_feature()
405 dma_cap->rx_fifo_size = 128 << ((hw_cap & GMAC_HW_RXFIFOSIZE) >> 0); in dwmac4_get_hw_feature()
409 dma_cap->number_rx_channel = in dwmac4_get_hw_feature()
411 dma_cap->number_tx_channel = in dwmac4_get_hw_feature()
414 dma_cap->number_rx_queues = in dwmac4_get_hw_feature()
416 dma_cap->number_tx_queues = in dwmac4_get_hw_feature()
419 dma_cap->pps_out_num = (hw_cap & GMAC_HW_FEAT_PPSOUTNUM) >> 24; in dwmac4_get_hw_feature()
421 /* IEEE 1588-2002 */ in dwmac4_get_hw_feature()
422 dma_cap->time_stamp = 0; in dwmac4_get_hw_feature()
424 dma_cap->aux_snapshot_n = (hw_cap & GMAC_HW_FEAT_AUXSNAPNUM) >> 28; in dwmac4_get_hw_feature()
430 dma_cap->asp = (hw_cap & GMAC_HW_FEAT_ASP) >> 28; in dwmac4_get_hw_feature()
431 dma_cap->tbssel = (hw_cap & GMAC_HW_FEAT_TBSSEL) >> 27; in dwmac4_get_hw_feature()
432 dma_cap->fpesel = (hw_cap & GMAC_HW_FEAT_FPESEL) >> 26; in dwmac4_get_hw_feature()
433 dma_cap->estwid = (hw_cap & GMAC_HW_FEAT_ESTWID) >> 20; in dwmac4_get_hw_feature()
434 dma_cap->estdep = (hw_cap & GMAC_HW_FEAT_ESTDEP) >> 17; in dwmac4_get_hw_feature()
435 dma_cap->estsel = (hw_cap & GMAC_HW_FEAT_ESTSEL) >> 16; in dwmac4_get_hw_feature()
436 dma_cap->frpes = (hw_cap & GMAC_HW_FEAT_FRPES) >> 13; in dwmac4_get_hw_feature()
437 dma_cap->frpbs = (hw_cap & GMAC_HW_FEAT_FRPBS) >> 11; in dwmac4_get_hw_feature()
438 dma_cap->frpsel = (hw_cap & GMAC_HW_FEAT_FRPSEL) >> 10; in dwmac4_get_hw_feature()
439 dma_cap->dvlan = (hw_cap & GMAC_HW_FEAT_DVLAN) >> 5; in dwmac4_get_hw_feature()
514 return -EIO; in dwmac4_enable_tbs()