Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: move stmmac_axi_blen_to_mask() to axi_blen init sites

Move stmmac_axi_blen_to_mask() to the axi->axi_blen array init sites
to prepare for the removal of axi_blen. For sites which initialise
axi->axi_blen with constant data, initialise axi->axi_blen_regval
using the DMA_AXI_BLENx constants.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vLfLb-0000000FMb7-1SgG@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
e676cc85 6ff3310c

+10 -5
+3
drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
··· 88 88 if (burst_map & (1 << bit_index)) 89 89 plat_dat->axi->axi_blen[a_index++] = 4 << bit_index; 90 90 91 + stmmac_axi_blen_to_mask(&plat_dat->axi->axi_blen_regval, 92 + plat_dat->axi->axi_blen, a_index); 93 + 91 94 /* dwc-qos needs GMAC4, AAL, TSO and PMT */ 92 95 plat_dat->core_type = DWMAC_CORE_GMAC4; 93 96 plat_dat->dma_cfg->aal = 1;
+2
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
··· 650 650 plat->axi->axi_xit_frm = 0; 651 651 plat->axi->axi_wr_osr_lmt = 1; 652 652 plat->axi->axi_rd_osr_lmt = 1; 653 + plat->axi->axi_blen_regval = DMA_AXI_BLEN4 | DMA_AXI_BLEN8 | 654 + DMA_AXI_BLEN16; 653 655 plat->axi->axi_blen[0] = 4; 654 656 plat->axi->axi_blen[1] = 8; 655 657 plat->axi->axi_blen[2] = 16;
+2 -5
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 225 225 226 226 *regval = FIELD_PREP(DMA_AXI_BLEN_MASK, val); 227 227 } 228 + EXPORT_SYMBOL_GPL(stmmac_axi_blen_to_mask); 228 229 229 230 /** 230 231 * stmmac_verify_args - verify the driver parameters. ··· 3213 3212 /* DMA Configuration */ 3214 3213 stmmac_dma_init(priv, priv->ioaddr, priv->plat->dma_cfg); 3215 3214 3216 - if (priv->plat->axi) { 3217 - /* Encode the AXI burst length to a register value */ 3218 - stmmac_axi_blen_to_mask(&priv->plat->axi->axi_blen_regval, 3219 - priv->plat->axi->axi_blen, AXI_BLEN); 3215 + if (priv->plat->axi) 3220 3216 stmmac_axi(priv, priv->ioaddr, priv->plat->axi); 3221 - } 3222 3217 3223 3218 /* DMA CSR Channel configuration */ 3224 3219 for (chan = 0; chan < dma_csr_ch; chan++) {
+2
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
··· 92 92 plat->axi->axi_rd_osr_lmt = 31; 93 93 94 94 plat->axi->axi_fb = false; 95 + plat->axi->axi_blen_regval = DMA_AXI_BLEN4 | DMA_AXI_BLEN8 | 96 + DMA_AXI_BLEN16 | DMA_AXI_BLEN32; 95 97 plat->axi->axi_blen[0] = 4; 96 98 plat->axi->axi_blen[1] = 8; 97 99 plat->axi->axi_blen[2] = 16;
+1
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
··· 118 118 if (of_property_read_u32(np, "snps,rd_osr_lmt", &axi->axi_rd_osr_lmt)) 119 119 axi->axi_rd_osr_lmt = 1; 120 120 of_property_read_u32_array(np, "snps,blen", axi->axi_blen, AXI_BLEN); 121 + stmmac_axi_blen_to_mask(&axi->axi_blen_regval, axi->axi_blen, AXI_BLEN); 121 122 of_node_put(np); 122 123 123 124 return axi;