All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization
@ 2010-08-19  9:09 Ilya Yanok
  2010-09-13  9:33 ` Wolfgang Denk
  2010-10-12  6:11 ` Ben Warren
  0 siblings, 2 replies; 4+ messages in thread
From: Ilya Yanok @ 2010-08-19  9:09 UTC (permalink / raw)
  To: u-boot

Some boards need their board-specific PHY quirks to be called
to PHY to work normally. As mpc5xxx_fec driver uses on demand
PHY initialization and can even reinit PHY during normal operation
we can't count on reset_phy() call from arch/<arch>/lib/board.c
(it is most likely called _before_ we init the PHY from the
driver) so we need to add call to reset_phy() directly in the
driver.

Cc: Ben Warren <biggerbadderben@gmail.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 drivers/net/mpc5xxx_fec.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index c88e596..bc8c922 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -250,6 +250,13 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
 	mpc5xxx_fec_init_phy(dev, bis);
 
 	/*
+	 * Call board-specific PHY fixups (if any)
+	 */
+#ifdef CONFIG_RESET_PHY_R
+	reset_phy();
+#endif
+
+	/*
 	 * Initialize RxBD/TxBD rings
 	 */
 	mpc5xxx_fec_rbd_init(fec);
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization
  2010-08-19  9:09 [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization Ilya Yanok
@ 2010-09-13  9:33 ` Wolfgang Denk
  2010-09-28 17:44   ` Wolfgang Denk
  2010-10-12  6:11 ` Ben Warren
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-09-13  9:33 UTC (permalink / raw)
  To: u-boot

Dear Ben,

In message <1282208946-18823-1-git-send-email-yanok@emcraft.com> Ilya Yanok wrote:
> Some boards need their board-specific PHY quirks to be called
> to PHY to work normally. As mpc5xxx_fec driver uses on demand
> PHY initialization and can even reinit PHY during normal operation
> we can't count on reset_phy() call from arch/<arch>/lib/board.c
> (it is most likely called _before_ we init the PHY from the
> driver) so we need to add call to reset_phy() directly in the
> driver.
> 
> Cc: Ben Warren <biggerbadderben@gmail.com>
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
>  drivers/net/mpc5xxx_fec.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)

Do you have any comments?

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 direct quote from the Boss: "We passed over a lot of good people to
get the ones we hired."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization
  2010-09-13  9:33 ` Wolfgang Denk
@ 2010-09-28 17:44   ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-09-28 17:44 UTC (permalink / raw)
  To: u-boot

Dear Ben,

ping again...

In message <20100913093325.A8A8415242D@gemini.denx.de> I wrote:
> Dear Ben,
> 
> In message <1282208946-18823-1-git-send-email-yanok@emcraft.com> Ilya Yanok wrote:
> > Some boards need their board-specific PHY quirks to be called
> > to PHY to work normally. As mpc5xxx_fec driver uses on demand
> > PHY initialization and can even reinit PHY during normal operation
> > we can't count on reset_phy() call from arch/<arch>/lib/board.c
> > (it is most likely called _before_ we init the PHY from the
> > driver) so we need to add call to reset_phy() directly in the
> > driver.
> > 
> > Cc: Ben Warren <biggerbadderben@gmail.com>
> > Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> > ---
> >  drivers/net/mpc5xxx_fec.c |    7 +++++++
> >  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> Do you have any comments?


Please comment how to go on - this is a real problem that needs to be
fixed one way or another.

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
It is more rational to sacrifice one life than six.
	-- Spock, "The Galileo Seven", stardate 2822.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization
  2010-08-19  9:09 [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization Ilya Yanok
  2010-09-13  9:33 ` Wolfgang Denk
@ 2010-10-12  6:11 ` Ben Warren
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Warren @ 2010-10-12  6:11 UTC (permalink / raw)
  To: u-boot

  Hi Ilya,

On 8/19/2010 2:09 AM, Ilya Yanok wrote:
> Some boards need their board-specific PHY quirks to be called
> to PHY to work normally. As mpc5xxx_fec driver uses on demand
> PHY initialization and can even reinit PHY during normal operation
> we can't count on reset_phy() call from arch/<arch>/lib/board.c
> (it is most likely called _before_ we init the PHY from the
> driver) so we need to add call to reset_phy() directly in the
> driver.
>
> Cc: Ben Warren<biggerbadderben@gmail.com>
> Signed-off-by: Ilya Yanok<yanok@emcraft.com>
> ---
>   drivers/net/mpc5xxx_fec.c |    7 +++++++
>   1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
> index c88e596..bc8c922 100644
> --- a/drivers/net/mpc5xxx_fec.c
> +++ b/drivers/net/mpc5xxx_fec.c
> @@ -250,6 +250,13 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t * bis)
>   	mpc5xxx_fec_init_phy(dev, bis);
>
>   	/*
> +	 * Call board-specific PHY fixups (if any)
> +	 */
> +#ifdef CONFIG_RESET_PHY_R
> +	reset_phy();
> +#endif
> +
> +	/*
>   	 * Initialize RxBD/TxBD rings
>   	 */
>   	mpc5xxx_fec_rbd_init(fec);
Applied to net repo.  Please accept my sincere apologies for taking so 
long to process.

regards,
Ben

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-12  6:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-19  9:09 [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization Ilya Yanok
2010-09-13  9:33 ` Wolfgang Denk
2010-09-28 17:44   ` Wolfgang Denk
2010-10-12  6:11 ` Ben Warren

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.