diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-09-05 20:30:34 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2013-09-05 20:30:34 +0000 |
commit | 4b0655500ae1be6f15613c77a670680d9eae9991 (patch) | |
tree | 8fef25ab2aff9223a846beb7e350dba556fcb87a /target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c | |
parent | bdc04e379f478b955316b7a50d6d51287b7aebad (diff) | |
download | master-31e0f0ae-4b0655500ae1be6f15613c77a670680d9eae9991.tar.gz master-31e0f0ae-4b0655500ae1be6f15613c77a670680d9eae9991.tar.bz2 master-31e0f0ae-4b0655500ae1be6f15613c77a670680d9eae9991.zip |
kernel: b53: support phy ids for BCM5365
BCM5365 (and probably other older variants) use a different phy id, so
the phy driver never attached for them.
Fix this by adding the appropriate phy id to the fixup and the phy
driver.
Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 37906
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c index 1ba05914ea..6403cc6388 100644 --- a/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c +++ b/target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c @@ -373,6 +373,22 @@ static struct phy_driver b53_phy_driver_id2 = { }, }; +/* BCM5365 */ +static struct phy_driver b53_phy_driver_id3 = { + .phy_id = 0x00406000, + .name = "Broadcom B53 (3)", + .phy_id_mask = 0x1ffffc00, + .features = 0, + .probe = b53_phy_probe, + .remove = b53_phy_remove, + .config_aneg = b53_phy_config_aneg, + .config_init = b53_phy_config_init, + .read_status = b53_phy_read_status, + .driver = { + .owner = THIS_MODULE, + }, +}; + int __init b53_phy_driver_register(void) { int ret; @@ -383,13 +399,21 @@ int __init b53_phy_driver_register(void) ret = phy_driver_register(&b53_phy_driver_id2); if (ret) - phy_driver_unregister(&b53_phy_driver_id1); + goto err1; + ret = phy_driver_register(&b53_phy_driver_id3); + if (!ret) + return 0; + + phy_driver_unregister(&b53_phy_driver_id2); +err1: + phy_driver_unregister(&b53_phy_driver_id1); return ret; } void __exit b53_phy_driver_unregister(void) { + phy_driver_unregister(&b53_phy_driver_id3); phy_driver_unregister(&b53_phy_driver_id2); phy_driver_unregister(&b53_phy_driver_id1); } |