mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
net: mvneta: add support for fixed links
Following the introduction of of_phy_register_fixed_link(), this patch introduces fixed link support in the mvneta driver, for Marvell Armada 370/XP SOCs. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3be2a49e5c
commit
83895bedee
@ -2797,9 +2797,22 @@ static int mvneta_probe(struct platform_device *pdev)
|
||||
|
||||
phy_node = of_parse_phandle(dn, "phy", 0);
|
||||
if (!phy_node) {
|
||||
dev_err(&pdev->dev, "no associated PHY\n");
|
||||
err = -ENODEV;
|
||||
goto err_free_irq;
|
||||
if (!of_phy_is_fixed_link(dn)) {
|
||||
dev_err(&pdev->dev, "no PHY specified\n");
|
||||
err = -ENODEV;
|
||||
goto err_free_irq;
|
||||
}
|
||||
|
||||
err = of_phy_register_fixed_link(dn);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "cannot register fixed PHY\n");
|
||||
goto err_free_irq;
|
||||
}
|
||||
|
||||
/* In the case of a fixed PHY, the DT node associated
|
||||
* to the PHY is the Ethernet MAC DT node.
|
||||
*/
|
||||
phy_node = dn;
|
||||
}
|
||||
|
||||
phy_mode = of_get_phy_mode(dn);
|
||||
|
Loading…
Reference in New Issue
Block a user