[U-Boot] [PATCH 2/5] net: phy: Add support for Marvell M88E1512

Joe Hershberger joe.hershberger at gmail.com
Fri Dec 9 19:54:13 CET 2016


On Fri, Dec 9, 2016 at 6:41 AM, Stefan Roese <sr at 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 at 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
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 at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list