mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-22 01:50:16 -05:00
net: stmmac: rk: add SoC specific ->init() method
Add a SoC specific init method. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vl3G5-00000006v3X-2zfD@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
f7aaa6fb11
commit
1639ba67bf
@@ -35,6 +35,7 @@ struct rk_reg_speed_data {
|
||||
};
|
||||
|
||||
struct rk_gmac_ops {
|
||||
int (*init)(struct rk_priv_data *bsp_priv);
|
||||
void (*set_to_rgmii)(struct rk_priv_data *bsp_priv,
|
||||
int tx_delay, int rx_delay);
|
||||
void (*set_to_rmii)(struct rk_priv_data *bsp_priv);
|
||||
@@ -1618,6 +1619,15 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
|
||||
|
||||
bsp_priv->dev = dev;
|
||||
|
||||
if (ops->init) {
|
||||
ret = ops->init(bsp_priv);
|
||||
if (ret) {
|
||||
reset_control_put(bsp_priv->phy_reset);
|
||||
dev_err_probe(dev, ret, "failed to init BSP\n");
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
return bsp_priv;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user