Patchwork [U-Boot,v2,1/2] net/designware: Do not select MIIPORT for RGMII interface

login
register
mail settings
Submitter Vipin Kumar
Date Dec. 13, 2012, 11:52 a.m.
Message ID <0abc282ac00fe36b8d9df40d11b1821cfac841ae.1355399453.git.vipin.kumar@st.com>
Download mbox | patch
Permalink /patch/205815/
State Accepted
Delegated to: Joe Hershberger
Headers show

Comments

Vipin Kumar - Dec. 13, 2012, 11:52 a.m.
Do not select MIIPORT for RGMII interface

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Acked-by: Stefan Roese <sr@denx.de>
---
 drivers/net/designware.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Joe Hershberger - July 8, 2013, 4:02 p.m.
On Thu, Dec 13, 2012 at 5:52 AM, Vipin Kumar <vipin.kumar@st.com> wrote:
> Do not select MIIPORT for RGMII interface
>
> Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
> Acked-by: Stefan Roese <sr@denx.de>

Applied, Thanks.
-Joe

Patch

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index bf21a08..46f6601 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -113,7 +113,9 @@  static int mac_reset(struct eth_device *dev)
 	int timeout = CONFIG_MACRESET_TIMEOUT;
 
 	writel(DMAMAC_SRST, &dma_p->busmode);
-	writel(MII_PORTSELECT, &mac_p->conf);
+
+	if (priv->interface != PHY_INTERFACE_MODE_RGMII)
+		writel(MII_PORTSELECT, &mac_p->conf);
 
 	start = get_timer(0);
 	while (get_timer(start) < timeout) {