All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] phy/marvell: Rewrite the MV88E1111 phy config function based on kernel code
Date: Sun, 23 Oct 2011 21:41:36 +0200	[thread overview]
Message-ID: <20111023194136.750C71408771@gemini.denx.de> (raw)
In-Reply-To: <1319178713-12472-2-git-send-email-tie-fei.zang@freescale.com>

Dear Roy Zang,

In message <1319178713-12472-2-git-send-email-tie-fei.zang@freescale.com> you wrote:
> The original m88e1111s_config() does not do the SGMII mode
> initialization and is buggy. Rewrite the function according to
> 3.0.6 kernel function m88e1111_config_init() in drivers/net/phy/marvell.c
> 
> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> Acked-by: Andy Fleming <afleming@freescale.com>
> Cc: Kumar Gala <galak@kernel.crashing.org>
...
> +		/* soft reset */
> +		phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET);
> +		do
> +			reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
> +		while (reg & BMCR_RESET);
...
> +	/* soft reset */
> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET);
> +	do
> +		reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR);
> +	while (reg & BMCR_RESET);

Do we really need this double reset?

Also, I dislike the potentially infinite loop here - please add a
timeout and an error exit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A supercomputer is a machine that runs an endless loop in 2 seconds.

  reply	other threads:[~2011-10-23 19:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21  6:31 [U-Boot] [PATCH] powerpc/fm: remove the TBIPA setting on platform code Roy Zang
2011-10-21  6:31 ` [U-Boot] [PATCH] phy/marvell: Rewrite the MV88E1111 phy config function based on kernel code Roy Zang
2011-10-23 19:41   ` Wolfgang Denk [this message]
2011-10-24  2:30     ` Zang Roy-R61911
2011-10-23 19:37 ` [U-Boot] [PATCH] powerpc/fm: remove the TBIPA setting on platform code Wolfgang Denk
2011-10-24  2:42   ` Zang Roy-R61911
2011-10-24  5:23     ` Wolfgang Denk
2011-10-24  6:07       ` Zang Roy-R61911
2011-10-24 19:05         ` Wolfgang Denk
2011-10-25  1:48           ` Zang Roy-R61911

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=20111023194136.750C71408771@gemini.denx.de \
    --to=wd@denx.de \
    --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.