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.

Merge branch 'net-stmmac-remove-unnecessary-initialisation-of-1-s-tic-counter'

Russell King says:

====================
net: stmmac: remove unnecessary initialisation of 1µs TIC counter

In commit 8efbdbfa9938 ("net: stmmac: Initialize MAC_ONEUS_TIC_COUNTER
register"), code to initialise the LPI 1us counter in dwmac4's
initialisation was added, making the initialisation in glue drivers
unnecessary. This series cleans up the now redundant initialisation.
====================

Link: https://patch.msgid.link/Z_oe0U5E0i3uZbop@shell.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+1 -42
+1 -23
drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c
··· 29 29 void __iomem *regs; 30 30 31 31 struct reset_control *rst; 32 - struct clk *clk_slave; 33 32 34 33 struct gpio_desc *reset; 35 34 }; ··· 198 199 } 199 200 } 200 201 201 - static int tegra_eqos_init(struct platform_device *pdev, void *priv) 202 - { 203 - struct tegra_eqos *eqos = priv; 204 - unsigned long rate; 205 - u32 value; 206 - 207 - rate = clk_get_rate(eqos->clk_slave); 208 - 209 - value = (rate / 1000000) - 1; 210 - writel(value, eqos->regs + GMAC_1US_TIC_COUNTER); 211 - 212 - return 0; 213 - } 214 - 215 202 static int tegra_eqos_probe(struct platform_device *pdev, 216 203 struct plat_stmmacenet_data *plat_dat, 217 204 struct stmmac_resources *res) ··· 212 227 213 228 eqos->dev = &pdev->dev; 214 229 eqos->regs = res->addr; 215 - eqos->clk_slave = plat_dat->stmmac_clk; 216 230 217 231 if (!is_of_node(dev->fwnode)) 218 232 goto bypass_clk_reset_gpio; ··· 251 267 bypass_clk_reset_gpio: 252 268 plat_dat->fix_mac_speed = tegra_eqos_fix_speed; 253 269 plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate; 254 - plat_dat->init = tegra_eqos_init; 255 270 plat_dat->bsp_priv = eqos; 256 271 plat_dat->flags |= STMMAC_FLAG_SPH_DISABLE; 257 272 258 - err = tegra_eqos_init(pdev, eqos); 259 - if (err < 0) 260 - goto reset; 261 - 262 273 return 0; 263 - reset: 264 - reset_control_assert(eqos->rst); 274 + 265 275 reset_phy: 266 276 gpiod_set_value(eqos->reset, 1); 267 277
-9
drivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c
··· 113 113 114 114 plat_dat->clk_tx_i = dwmac->tx_clk; 115 115 plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate; 116 - 117 116 plat_dat->bsp_priv = dwmac; 118 - plat_dat->eee_usecs_rate = plat_dat->clk_ptp_rate; 119 - 120 - if (plat_dat->eee_usecs_rate > 0) { 121 - u32 tx_lpi_usec; 122 - 123 - tx_lpi_usec = (plat_dat->eee_usecs_rate / 1000000) - 1; 124 - writel(tx_lpi_usec, stmmac_res.addr + GMAC_1US_TIC_COUNTER); 125 - } 126 117 127 118 ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); 128 119 if (ret)
-8
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
··· 682 682 plat->axi->axi_blen[2] = 16; 683 683 684 684 plat->ptp_max_adj = plat->clk_ptp_rate; 685 - plat->eee_usecs_rate = plat->clk_ptp_rate; 686 685 687 686 /* Set system clock */ 688 687 sprintf(clk_name, "%s-%s", "stmmac", pci_name(pdev)); ··· 1311 1312 1312 1313 memset(&res, 0, sizeof(res)); 1313 1314 res.addr = pcim_iomap_table(pdev)[0]; 1314 - 1315 - if (plat->eee_usecs_rate > 0) { 1316 - u32 tx_lpi_usec; 1317 - 1318 - tx_lpi_usec = (plat->eee_usecs_rate / 1000000) - 1; 1319 - writel(tx_lpi_usec, res.addr + GMAC_1US_TIC_COUNTER); 1320 - } 1321 1315 1322 1316 ret = stmmac_config_multi_msi(pdev, plat, &res); 1323 1317 if (ret) {
-1
drivers/net/ethernet/stmicro/stmmac/dwmac4.h
··· 31 31 #define GMAC_RXQ_CTRL3 0x000000ac 32 32 #define GMAC_INT_STATUS 0x000000b0 33 33 #define GMAC_INT_EN 0x000000b4 34 - #define GMAC_1US_TIC_COUNTER 0x000000dc 35 34 #define GMAC_PCS_BASE 0x000000e0 36 35 #define GMAC_PHYIF_CONTROL_STATUS 0x000000f8 37 36 #define GMAC_PMT 0x000000c0
-1
include/linux/stmmac.h
··· 276 276 int mac_port_sel_speed; 277 277 int has_xgmac; 278 278 u8 vlan_fail_q; 279 - unsigned long eee_usecs_rate; 280 279 struct pci_dev *pdev; 281 280 int int_snapshot_num; 282 281 int msi_mac_vec;