public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net/designware: do explicit port selection for 1Gb mode
@ 2015-12-23 16:46 Alexey Brodkin
  2015-12-24  2:17 ` Bin Meng
  2016-01-11 10:11 ` Alexey Brodkin
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Brodkin @ 2015-12-23 16:46 UTC (permalink / raw)
  To: u-boot

Current implementation only sets "port select" bit for non-1Gb mode.
That works fine if GMAC has just exited reset state but we may as well
change connection mode in runtime. Then we'll need to reprogram GMAC for
that new mode of operation and if previous mode was 10 or 100 Mb and new
one is 1 Gb we'll need to reset port mode bit.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
cc: Simon Glass <sjg@chromium.org>
---
 drivers/net/designware.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index a6c39c3..58c6d36 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -200,6 +200,8 @@ static void dw_adjust_link(struct eth_mac_regs *mac_p,
 
 	if (phydev->speed != 1000)
 		conf |= MII_PORTSELECT;
+	else
+		conf &= ~MII_PORTSELECT;
 
 	if (phydev->speed == 100)
 		conf |= FES_100;
-- 
2.4.3

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

* [U-Boot] [PATCH] net/designware: do explicit port selection for 1Gb mode
  2015-12-23 16:46 [U-Boot] [PATCH] net/designware: do explicit port selection for 1Gb mode Alexey Brodkin
@ 2015-12-24  2:17 ` Bin Meng
  2016-01-11 10:11 ` Alexey Brodkin
  1 sibling, 0 replies; 3+ messages in thread
From: Bin Meng @ 2015-12-24  2:17 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 24, 2015 at 12:46 AM, Alexey Brodkin
<Alexey.Brodkin@synopsys.com> wrote:
> Current implementation only sets "port select" bit for non-1Gb mode.
> That works fine if GMAC has just exited reset state but we may as well
> change connection mode in runtime. Then we'll need to reprogram GMAC for
> that new mode of operation and if previous mode was 10 or 100 Mb and new
> one is 1 Gb we'll need to reset port mode bit.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Sonic Zhang <sonic.zhang@analog.com>
> cc: Simon Glass <sjg@chromium.org>
> ---
>  drivers/net/designware.c | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

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

* [U-Boot] [PATCH] net/designware: do explicit port selection for 1Gb mode
  2015-12-23 16:46 [U-Boot] [PATCH] net/designware: do explicit port selection for 1Gb mode Alexey Brodkin
  2015-12-24  2:17 ` Bin Meng
@ 2016-01-11 10:11 ` Alexey Brodkin
  1 sibling, 0 replies; 3+ messages in thread
From: Alexey Brodkin @ 2016-01-11 10:11 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Wed, 2015-12-23 at 19:46 +0300, Alexey Brodkin wrote:
> Current implementation only sets "port select" bit for non-1Gb mode.
> That works fine if GMAC has just exited reset state but we may as well
> change connection mode in runtime. Then we'll need to reprogram GMAC for
> that new mode of operation and if previous mode was 10 or 100 Mb and new
> one is 1 Gb we'll need to reset port mode bit.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Sonic Zhang <sonic.zhang@analog.com>
> cc: Simon Glass <sjg@chromium.org>
> ---
>  drivers/net/designware.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index a6c39c3..58c6d36 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -200,6 +200,8 @@ static void dw_adjust_link(struct eth_mac_regs *mac_p,
>  
>  	if (phydev->speed != 1000)
>  		conf |= MII_PORTSELECT;
> +	else
> +		conf &= ~MII_PORTSELECT;
>  
>  	if (phydev->speed == 100)
>  		conf |= FES_100;

Any chance for that one to be applied?

-Alexey

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

end of thread, other threads:[~2016-01-11 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 16:46 [U-Boot] [PATCH] net/designware: do explicit port selection for 1Gb mode Alexey Brodkin
2015-12-24  2:17 ` Bin Meng
2016-01-11 10:11 ` Alexey Brodkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox