From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753206AbaCLVqY (ORCPT ); Wed, 12 Mar 2014 17:46:24 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:57187 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753001AbaCLVqX (ORCPT ); Wed, 12 Mar 2014 17:46:23 -0400 Message-ID: <5320E3BA.5070309@cogentembedded.com> Date: Thu, 13 Mar 2014 01:46:18 +0300 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Jason Gunthorpe , Rob Herring CC: Florian Fainelli , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2a RESEND 2/2] of_mdio: Allow the DT to specify the phy ID and avoid autoprobing References: <1394658311-17769-1-git-send-email-jgunthorpe@obsidianresearch.com> <1394658311-17769-2-git-send-email-jgunthorpe@obsidianresearch.com> In-Reply-To: <1394658311-17769-2-git-send-email-jgunthorpe@obsidianresearch.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Acked-by: Florian Fainelli > --- > 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