lkml.org 
[lkml]   [2014]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2a RESEND 2/2] of_mdio: Allow the DT to specify the phy ID and avoid autoprobing
Hello.

On 03/13/2014 12:05 AM, Jason Gunthorpe wrote:

> This makes the generic of_mdiobus_register parse the DT compatible string for
> the pattern ethernet-phy-idAAAA.BBBB. If present it should be a value that
> matches the phy-id register normally readable through MDIO.

> When the ID is given the phy autoprobing is defeated and the phy is
> created directly.

> This is necessary to support phy's that cannot be autoprobed when
> of_mdiobus_register is called. Specifically, my case has the phy in reset at
> of_mdiobus_register, the reset is only released once the ethernet driver
> starts, before it attaches to the phy.

> Tested on ARM Kirkwood with phy id 0x01410e90 (Marvell 88E1318)

> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/of/of_mdio.c | 30 +++++++++++++++++++++++++++++-
> 1 file changed, 29 insertions(+), 1 deletion(-)

> There was some reworking of the original code in v3.14-rc6, this resolves the
> merge conflicts and I retested the resolved patch on Kirkwood.

> Florian, do you know what path to mainline a this patch should take?

> Thanks,
> Jason

> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index 5b3c24f..6cdcbda 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -43,6 +43,30 @@ static void of_set_phy_supported(struct phy_device *phydev, u32 max_speed)
> }
> }
>
> +/* Extract the clause 22 phy ID from the compatible string of the form
> + * ethernet-phy-idAAAA.BBBB */

The preferred multi-line comment style is:

/*
* bla
* bla
*/

WBR, Sergei



\
 
 \ /
  Last update: 2014-03-12 23:21    [W:1.409 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site