
On Fri, Dec 9, 2016 at 12:54 PM, Joe Hershberger joe.hershberger@gmail.com wrote:
On Fri, Dec 9, 2016 at 6:41 AM, Stefan Roese sr@denx.de wrote:
Hi Phil,
On 09.12.2016 13:38, Phil Edworthy wrote:
On 09 December 2016 12:16, Stefan Roese wrote:
On 09.12.2016 11:40, Phil Edworthy wrote:
Signed-off-by: Phil Edworthy phil.edworthy@renesas.com
drivers/net/phy/marvell.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 06029c0..a7ea435 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -560,6 +560,16 @@ static struct phy_driver M88E1510_driver = { .shutdown = &genphy_shutdown, };
+static struct phy_driver M88E1512_driver = {
.name = "Marvell 88E1512",
.uid = 0x01410dd4,
.mask = 0xfffffff,
.features = PHY_GBIT_FEATURES,
.config = &m88e1518_config,
.startup = &m88e1011s_startup,
.shutdown = &genphy_shutdown,
+};
static struct phy_driver M88E1518_driver = { .name = "Marvell 88E1518", .uid = 0x1410dd1, @@ -591,6 +601,7 @@ int phy_marvell_init(void) phy_register(&M88E1111S_driver); phy_register(&M88E1011S_driver); phy_register(&M88E1510_driver);
phy_register(&M88E1512_driver); phy_register(&M88E1518_driver);
Do you need some special handling for the M88E1512 or is it identical to the 1518 handling? If its identical, why do we need a new entry for this PHY?
Good point, they are the same except for the uid so no need for a new entry. I'll change the mask of the 1518 to cover it.
I'm not sure I get it. The previous patch was to pay attention to the last nibble of the ID (unlike Linux) so that the special 1518 handler is run. Now you want to have a 1510 + 1512 handler? Are you planning a funky mask like 0xffffff1? Maybe it would be better to just have them
I guess you were making the 1512 behave like the 1518, not the 1510 - I see your follow-up patch used 0xffffffb as a mask.
Still seems a bit smelly to me, but I guess we can see where it ends up with some future marvell phy.
checked explicitly since there is need for discrimination within the 151x family.
Thanks.
Btw, what's the best way to indicate that the code supports the 1512 as well? It's not so easy to see if the code supports a particular device ahead of hardware arriving, other than trying to match the uid's manually.
A comment would be welcome here. Not sure if this is done in a more generic way in the Linux PHY drivers. You might want to check there as well...
Thanks, Stefan
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot