mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
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 8efbdbfa99 ("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>
This commit is contained in:
commit
b8ebc89383
|
|
@ -29,7 +29,6 @@ struct tegra_eqos {
|
|||
void __iomem *regs;
|
||||
|
||||
struct reset_control *rst;
|
||||
struct clk *clk_slave;
|
||||
|
||||
struct gpio_desc *reset;
|
||||
};
|
||||
|
|
@ -199,20 +198,6 @@ static void tegra_eqos_fix_speed(void *priv, int speed, unsigned int mode)
|
|||
}
|
||||
}
|
||||
|
||||
static int tegra_eqos_init(struct platform_device *pdev, void *priv)
|
||||
{
|
||||
struct tegra_eqos *eqos = priv;
|
||||
unsigned long rate;
|
||||
u32 value;
|
||||
|
||||
rate = clk_get_rate(eqos->clk_slave);
|
||||
|
||||
value = (rate / 1000000) - 1;
|
||||
writel(value, eqos->regs + GMAC_1US_TIC_COUNTER);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra_eqos_probe(struct platform_device *pdev,
|
||||
struct plat_stmmacenet_data *plat_dat,
|
||||
struct stmmac_resources *res)
|
||||
|
|
@ -227,7 +212,6 @@ static int tegra_eqos_probe(struct platform_device *pdev,
|
|||
|
||||
eqos->dev = &pdev->dev;
|
||||
eqos->regs = res->addr;
|
||||
eqos->clk_slave = plat_dat->stmmac_clk;
|
||||
|
||||
if (!is_of_node(dev->fwnode))
|
||||
goto bypass_clk_reset_gpio;
|
||||
|
|
@ -267,17 +251,11 @@ static int tegra_eqos_probe(struct platform_device *pdev,
|
|||
bypass_clk_reset_gpio:
|
||||
plat_dat->fix_mac_speed = tegra_eqos_fix_speed;
|
||||
plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;
|
||||
plat_dat->init = tegra_eqos_init;
|
||||
plat_dat->bsp_priv = eqos;
|
||||
plat_dat->flags |= STMMAC_FLAG_SPH_DISABLE;
|
||||
|
||||
err = tegra_eqos_init(pdev, eqos);
|
||||
if (err < 0)
|
||||
goto reset;
|
||||
|
||||
return 0;
|
||||
reset:
|
||||
reset_control_assert(eqos->rst);
|
||||
|
||||
reset_phy:
|
||||
gpiod_set_value(eqos->reset, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -113,16 +113,7 @@ static int intel_eth_plat_probe(struct platform_device *pdev)
|
|||
|
||||
plat_dat->clk_tx_i = dwmac->tx_clk;
|
||||
plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;
|
||||
|
||||
plat_dat->bsp_priv = dwmac;
|
||||
plat_dat->eee_usecs_rate = plat_dat->clk_ptp_rate;
|
||||
|
||||
if (plat_dat->eee_usecs_rate > 0) {
|
||||
u32 tx_lpi_usec;
|
||||
|
||||
tx_lpi_usec = (plat_dat->eee_usecs_rate / 1000000) - 1;
|
||||
writel(tx_lpi_usec, stmmac_res.addr + GMAC_1US_TIC_COUNTER);
|
||||
}
|
||||
|
||||
ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -682,7 +682,6 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
|
|||
plat->axi->axi_blen[2] = 16;
|
||||
|
||||
plat->ptp_max_adj = plat->clk_ptp_rate;
|
||||
plat->eee_usecs_rate = plat->clk_ptp_rate;
|
||||
|
||||
/* Set system clock */
|
||||
sprintf(clk_name, "%s-%s", "stmmac", pci_name(pdev));
|
||||
|
|
@ -1313,13 +1312,6 @@ static int intel_eth_pci_probe(struct pci_dev *pdev,
|
|||
memset(&res, 0, sizeof(res));
|
||||
res.addr = pcim_iomap_table(pdev)[0];
|
||||
|
||||
if (plat->eee_usecs_rate > 0) {
|
||||
u32 tx_lpi_usec;
|
||||
|
||||
tx_lpi_usec = (plat->eee_usecs_rate / 1000000) - 1;
|
||||
writel(tx_lpi_usec, res.addr + GMAC_1US_TIC_COUNTER);
|
||||
}
|
||||
|
||||
ret = stmmac_config_multi_msi(pdev, plat, &res);
|
||||
if (ret) {
|
||||
ret = stmmac_config_single_msi(pdev, plat, &res);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
#define GMAC_RXQ_CTRL3 0x000000ac
|
||||
#define GMAC_INT_STATUS 0x000000b0
|
||||
#define GMAC_INT_EN 0x000000b4
|
||||
#define GMAC_1US_TIC_COUNTER 0x000000dc
|
||||
#define GMAC_PCS_BASE 0x000000e0
|
||||
#define GMAC_PHYIF_CONTROL_STATUS 0x000000f8
|
||||
#define GMAC_PMT 0x000000c0
|
||||
|
|
|
|||
|
|
@ -276,7 +276,6 @@ struct plat_stmmacenet_data {
|
|||
int mac_port_sel_speed;
|
||||
int has_xgmac;
|
||||
u8 vlan_fail_q;
|
||||
unsigned long eee_usecs_rate;
|
||||
struct pci_dev *pdev;
|
||||
int int_snapshot_num;
|
||||
int msi_mac_vec;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user