U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] net/phy: enable get_phy_id redefinable
Date: Wed, 12 Mar 2014 11:47:57 -0400	[thread overview]
Message-ID: <20140312154757.GR16805@bill-the-cat> (raw)
In-Reply-To: <1394005137-24255-1-git-send-email-Shengzhou.Liu@freescale.com>

On Wed, Mar 05, 2014 at 03:38:55PM +0800, Shengzhou Liu wrote:

> As some PHYs have non-standard PHY ID registers, PHY Id can't
> be read correctly by current get_phy_id function, so we enable
> get_phy_id redefinable to permit specific PHY driver having own
> specific get_phy_id function.
> 
> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
> ---
>  drivers/net/phy/phy.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index c691fbb..c8e7f64 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -577,7 +577,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
>   * Description: Reads the ID registers of the PHY at @addr on the
>   *   @bus, stores it in @phy_id and returns zero on success.
>   */
> -static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
> +static int __get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
>  {
>  	int phy_reg;
>  
> @@ -601,6 +601,9 @@ static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
>  	return 0;
>  }
>  
> +int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
> +		      __attribute__((weak, alias("__get_phy_id")));
> +
>  static struct phy_device *create_phy_by_mask(struct mii_dev *bus,
>  		unsigned phy_mask, int devad, phy_interface_t interface)
>  {

Please use __weak from <linux/compiler.h> instead, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/ee0da2a9/attachment.pgp>

      parent reply	other threads:[~2014-03-12 15:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  7:38 [U-Boot] [PATCH 1/3] net/phy: enable get_phy_id redefinable Shengzhou Liu
2014-03-05  7:38 ` [U-Boot] [PATCH 2/3] net/phy: update get_phy_device_by_mask to probe more 10G PHY Shengzhou Liu
2014-03-05  7:38 ` [U-Boot] [PATCH 3/3] net/phy: Add support for CS4315/CS4340 PHY Shengzhou Liu
2014-03-12 15:47 ` Tom Rini [this message]

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=20140312154757.GR16805@bill-the-cat \
    --to=trini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox