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

login
register
mail settings
Submitter Vipin Kumar
Date Dec. 6, 2012, 7:10 a.m.
Message ID <21ad31fb0501d0cd56f978467ae31f153a22ec4b.1354777675.git.vipin.kumar@st.com>
Download mbox | patch
Permalink /patch/204157/
State Superseded
Delegated to: Joe Hershberger
Headers show

Comments

Vipin Kumar - Dec. 6, 2012, 7:10 a.m.
Do not select MIIPORT for RGMII interface

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
---
 drivers/net/designware.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Vipin Kumar - Dec. 12, 2012, 10:01 a.m.
ping

On 12/6/2012 12:40 PM, Vipin KUMAR wrote:
> Do not select MIIPORT for RGMII interface
>
> Signed-off-by: Vipin Kumar<vipin.kumar@st.com>
> ---
>   drivers/net/designware.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> 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) {
Stefan Roese - Dec. 12, 2012, 10:09 a.m.
On 12/06/2012 08:10 AM, Vipin Kumar wrote:
> Do not select MIIPORT for RGMII interface
> 
> Signed-off-by: Vipin Kumar <vipin.kumar@st.com>

Acked-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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) {