All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 3/7] drivers: net: designware: Add reading of DT phy-handle node
Date: Tue, 28 Aug 2018 18:53:34 -0500	[thread overview]
Message-ID: <3ce3f1d6-0c2d-d2b3-dfa8-809b620b5e4c@ti.com> (raw)
In-Reply-To: <1535437505-32297-4-git-send-email-j.hagemann@phytec.de>



On 08/28/2018 01:25 AM, Janine Hagemann wrote:
> Add the ability to read the phy-handle node of the
> gmac.  Upon reading this handle the phy-id
> can be stored based on the reg node in the DT.
> 
> The phy-handle also needs to be stored and passed
> to the phy to access any phy data that is available.
> 
> Signed-off-by: Janine Hagemann <j.hagemann@phytec.de>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> ---
> v4: Change used function from dev_set_of_offset( ) to
>      offset_to_ofnode( )
> ---
>   drivers/net/designware.c | 11 ++++++++++-
>   drivers/net/designware.h |  1 +
>   2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index 19db0a8..bba12f2 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -477,7 +477,7 @@ static int dw_phy_init(struct dw_eth_dev *priv, void *dev)
>   {
>   	struct phy_device *phydev;
>   	int mask = 0xffffffff, ret;
> -
> +	struct dw_eth_pdata *dw_pdata = dev_get_platdata(dev);
>   #ifdef CONFIG_PHY_ADDR
>   	mask = 1 << CONFIG_PHY_ADDR;
>   #endif
> @@ -496,6 +496,11 @@ static int dw_phy_init(struct dw_eth_dev *priv, void *dev)
>   	}
>   	phydev->advertising = phydev->supported;
>   
> +#ifdef CONFIG_DM_ETH
> +	if (dw_pdata->phy_of_handle)
> +		phydev->node  = offset_to_ofnode(dw_pdata->phy_of_handle);
> +#endif
> +

Above part looks good now. thank you.

-- 
regards,
-grygorii

  reply	other threads:[~2018-08-28 23:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28  6:24 [U-Boot] [PATCH v4 0/7] Add ethernet support for phyCORE-RK3288 Janine Hagemann
2018-08-28  6:24 ` [U-Boot] [PATCH v4 1/7] arch: arm: mach-rockchip: rk3288: Enable regulators in board_init Janine Hagemann
2018-08-28  6:25 ` [U-Boot] [PATCH v4 2/7] config: phycore-rk3288_defconfig: add PHY_TI Janine Hagemann
2018-08-28  6:25 ` [U-Boot] [PATCH v4 3/7] drivers: net: designware: Add reading of DT phy-handle node Janine Hagemann
2018-08-28 23:53   ` Grygorii Strashko [this message]
2018-08-28  6:25 ` [U-Boot] [PATCH v4 4/7] ARM: dts: rockchip: ADD dp83867 CLK_OUT muxing Janine Hagemann
2018-08-28  6:25 ` [U-Boot] [PATCH v4 5/7] rockchip: rk3288-phycore: set flash1 iodomain to 1.8V Janine Hagemann
2018-08-28  6:25 ` [U-Boot] [PATCH v4 6/7] net: gmac_rockchip: Fix a register write in rk3328_gmac_set_to_rgmii Janine Hagemann
2018-08-31 11:57   ` [U-Boot] [U-Boot, v4, " David.Wu
2018-10-04 20:08   ` Philipp Tomsich
2018-08-28  6:25 ` [U-Boot] [PATCH v4 7/7] net: gmac_rockchip: Add handeling for RGMII_ID/RXID/TXID Janine Hagemann
2018-08-31 11:54   ` [U-Boot] [U-Boot, v4, " David.Wu
2018-08-31 12:24     ` [U-Boot] [Resend] " David.Wu
2018-10-04 20:08   ` [U-Boot] " Philipp Tomsich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ce3f1d6-0c2d-d2b3-dfa8-809b620b5e4c@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.