net: stmmac: move stmmac_get_*id() into stmmac_get_version()

Move the contents of both stmmac_get_id() and stmmac_get_dev_id() into
stmmac_get_version() as it no longer makes sense for these to be
separate functions.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vDtew-0000000CCC9-0KeM@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Russell King (Oracle)
2025-10-29 00:03:26 +00:00
committed by Jakub Kicinski
parent c36b97e4ca
commit 7b2e41fff7

View File

@@ -18,19 +18,6 @@ struct stmmac_version {
u8 dev_id;
};
static u32 stmmac_get_id(struct stmmac_priv *priv, u32 reg)
{
dev_info(priv->device, "User ID: 0x%x, Synopsys ID: 0x%x\n",
(unsigned int)(reg & GENMASK(15, 8)) >> 8,
(unsigned int)(reg & GENMASK(7, 0)));
return reg & GENMASK(7, 0);
}
static u32 stmmac_get_dev_id(struct stmmac_priv *priv, u32 reg)
{
return (reg & GENMASK(15, 8)) >> 8;
}
static void stmmac_get_version(struct stmmac_priv *priv,
struct stmmac_version *ver)
{
@@ -55,9 +42,13 @@ static void stmmac_get_version(struct stmmac_priv *priv,
return;
}
ver->snpsver = stmmac_get_id(priv, version);
dev_info(priv->device, "User ID: 0x%x, Synopsys ID: 0x%x\n",
(unsigned int)(version & GENMASK(15, 8)) >> 8,
(unsigned int)(version & GENMASK(7, 0)));
ver->snpsver = version & GENMASK(7, 0);
if (core_type == DWMAC_CORE_XGMAC)
ver->dev_id = stmmac_get_dev_id(priv, version);
ver->dev_id = (version & GENMASK(15, 8)) >> 8;
}
static void stmmac_dwmac_mode_quirk(struct stmmac_priv *priv)