diff mbox

[U-Boot,v2,6/7] net/designware: do explicit port selection for 1Gb mode

Message ID 1452693577-25786-7-git-send-email-abrodkin@synopsys.com
State Accepted
Commit b884c3f
Delegated to: Joe Hershberger
Headers show

Commit Message

Alexey Brodkin Jan. 13, 2016, 1:59 p.m. UTC
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>
---

Changes v1 -> v2:
 No changes, this is just a resent in series with other related patches.

 drivers/net/designware.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Joe Hershberger Jan. 27, 2016, 4:10 p.m. UTC | #1
On Wed, Jan 13, 2016 at 7:59 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>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger Jan. 29, 2016, 9:27 p.m. UTC | #2
Hi Alexey,

https://patchwork.ozlabs.org/patch/566951/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 04114a1..39c7279 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -196,6 +196,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;