diff options
author | Luiz Angelo Daros de Luca <luizluca@gmail.com> | 2022-01-28 03:05:00 -0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-01-28 15:02:49 +0000 |
commit | cd645dc556e2f633cee88a3f1ca3e7209bcdaa7e (patch) | |
tree | 8919f972a45add4280e552518986c882979850a4 /drivers/net/dsa/realtek/rtl8366rb.c | |
parent | f5f119077b1cd687a2d3b7a5fa736949b5bce0f6 (diff) |
net: dsa: realtek: remove direct calls to realtek-smi
Remove the only two direct calls from subdrivers to realtek-smi.
Now they are called from realtek_priv. Subdrivers can now be
linked independently from realtek-smi.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/realtek/rtl8366rb.c')
-rw-r--r-- | drivers/net/dsa/realtek/rtl8366rb.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/rtl8366rb.c index fa222a6dac87..b301408028ef 100644 --- a/drivers/net/dsa/realtek/rtl8366rb.c +++ b/drivers/net/dsa/realtek/rtl8366rb.c @@ -1030,10 +1030,12 @@ static int rtl8366rb_setup(struct dsa_switch *ds) if (ret) dev_info(priv->dev, "no interrupt support\n"); - ret = realtek_smi_setup_mdio(priv); - if (ret) { - dev_info(priv->dev, "could not set up MDIO bus\n"); - return -ENODEV; + if (priv->setup_interface) { + ret = priv->setup_interface(ds); + if (ret) { + dev_err(priv->dev, "could not set up MDIO bus\n"); + return -ENODEV; + } } return 0; @@ -1707,8 +1709,8 @@ static int rtl8366rb_reset_chip(struct realtek_priv *priv) u32 val; int ret; - realtek_smi_write_reg_noack(priv, RTL8366RB_RESET_CTRL_REG, - RTL8366RB_CHIP_CTRL_RESET_HW); + priv->write_reg_noack(priv, RTL8366RB_RESET_CTRL_REG, + RTL8366RB_CHIP_CTRL_RESET_HW); do { usleep_range(20000, 25000); ret = regmap_read(priv->map, RTL8366RB_RESET_CTRL_REG, &val); |