Commit 1fc04a0b authored by Shenwei Wang's avatar Shenwei Wang Committed by Jakub Kicinski
Browse files

net: stmmac: add new mode parameter for fix_mac_speed



A mode parameter has been added to the callback function of fix_mac_speed
to indicate the physical layer type.

The mode can be one the following:
	MLO_AN_PHY	- Conventional PHY
	MLO_AN_FIXED	- Fixed-link mode
	MLO_AN_INBAND	- In-band protocol

Signed-off-by: default avatarShenwei Wang <shenwei.wang@nxp.com>
Link: https://lore.kernel.org/r/20230807160716.259072-2-shenwei.wang@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6a1ed143
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ static void dwc_qos_remove(struct platform_device *pdev)
#define AUTO_CAL_STATUS 0x880c
#define  AUTO_CAL_STATUS_ACTIVE BIT(31)

static void tegra_eqos_fix_speed(void *priv, unsigned int speed)
static void tegra_eqos_fix_speed(void *priv, unsigned int speed, unsigned int mode)
{
	struct tegra_eqos *eqos = priv;
	unsigned long rate = 125000000;
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ static void imx_dwmac_exit(struct platform_device *pdev, void *priv)
	/* nothing to do now */
}

static void imx_dwmac_fix_speed(void *priv, unsigned int speed)
static void imx_dwmac_fix_speed(void *priv, unsigned int speed, unsigned int mode)
{
	struct plat_stmmacenet_data *plat_dat;
	struct imx_priv_data *dwmac = priv;
+2 −2
Original line number Diff line number Diff line
@@ -22,13 +22,13 @@ struct intel_dwmac {
};

struct intel_dwmac_data {
	void (*fix_mac_speed)(void *priv, unsigned int speed);
	void (*fix_mac_speed)(void *priv, unsigned int speed, unsigned int mode);
	unsigned long ptp_ref_clk_rate;
	unsigned long tx_clk_rate;
	bool tx_clk_en;
};

static void kmb_eth_fix_mac_speed(void *priv, unsigned int speed)
static void kmb_eth_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
{
	struct intel_dwmac *dwmac = priv;
	unsigned long rate;
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ static int ipq806x_gmac_of_parse(struct ipq806x_gmac *gmac)
	return PTR_ERR_OR_ZERO(gmac->qsgmii_csr);
}

static void ipq806x_gmac_fix_mac_speed(void *priv, unsigned int speed)
static void ipq806x_gmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
{
	struct ipq806x_gmac *gmac = priv;

+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ struct meson_dwmac {
	void __iomem	*reg;
};

static void meson6_dwmac_fix_mac_speed(void *priv, unsigned int speed)
static void meson6_dwmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
{
	struct meson_dwmac *dwmac = priv;
	unsigned int val;
Loading