Patchwork [net,83xx] ucc_geth.c: Fix upsmr setting in RMII mode

login
register
mail settings
Submitter Heiko Schocher
Date April 21, 2009, 8:36 a.m.
Message ID <49ED859B.30904@denx.de>
Download mbox | patch
Permalink /patch/26232/
State Accepted
Delegated to: Kumar Gala
Headers show

Comments

Heiko Schocher - April 21, 2009, 8:36 a.m.
If using the UCC on a MPC8360 in RMII mode, don;t set
UCC_GETH_UPSMR_RPM bit in the upsmr register.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 drivers/net/ucc_geth.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Yang Li - April 21, 2009, 10:51 a.m.
On Tue, Apr 21, 2009 at 4:36 PM, Heiko Schocher <hs@denx.de> wrote:
> If using the UCC on a MPC8360 in RMII mode, don;t set
> UCC_GETH_UPSMR_RPM bit in the upsmr register.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>

Acked-by: Li Yang <leoli@freescale.com>

> ---
>  drivers/net/ucc_geth.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index d3f39e8..44f8392 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -1394,7 +1394,8 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth)
>            (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
>            (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) ||
>            (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) {
> -               upsmr |= UCC_GETH_UPSMR_RPM;
> +               if (ugeth->phy_interface != PHY_INTERFACE_MODE_RMII)
> +                       upsmr |= UCC_GETH_UPSMR_RPM;
>                switch (ugeth->max_speed) {
>                case SPEED_10:
>                        upsmr |= UCC_GETH_UPSMR_R10M;
Gridish Shlomi-RM96313 - April 21, 2009, 11:22 a.m.
It is correct.
Thanks
 

> -----Original Message-----
> From: Heiko Schocher [mailto:hs@denx.de] 
> Sent: Tuesday, April 21, 2009 11:37 AM
> To: Li Yang-R58472
> Cc: Gridish Shlomi-RM96313; Kumar Gala; 
> netdev@vger.kernel.org; linuxppc-dev@ozlabs.org
> Subject: [PATCH] [net, 83xx] ucc_geth.c: Fix upsmr setting in 
> RMII mode
> 
> If using the UCC on a MPC8360 in RMII mode, don;t set 
> UCC_GETH_UPSMR_RPM bit in the upsmr register.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
>  drivers/net/ucc_geth.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c 
> index d3f39e8..44f8392 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -1394,7 +1394,8 @@ static int adjust_enet_interface(struct 
> ucc_geth_private *ugeth)
>  	    (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
>  	    (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) ||
>  	    (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) {
> -		upsmr |= UCC_GETH_UPSMR_RPM;
> +		if (ugeth->phy_interface != PHY_INTERFACE_MODE_RMII)
> +			upsmr |= UCC_GETH_UPSMR_RPM;
>  		switch (ugeth->max_speed) {
>  		case SPEED_10:
>  			upsmr |= UCC_GETH_UPSMR_R10M;
> --
> 1.6.0.6
> 
> -- 
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>
David Miller - April 22, 2009, 7:46 a.m.
From: Li Yang <leoli@freescale.com>
Date: Tue, 21 Apr 2009 18:51:11 +0800

> On Tue, Apr 21, 2009 at 4:36 PM, Heiko Schocher <hs@denx.de> wrote:
>> If using the UCC on a MPC8360 in RMII mode, don;t set
>> UCC_GETH_UPSMR_RPM bit in the upsmr register.
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
> 
> Acked-by: Li Yang <leoli@freescale.com>

Applied, thanks.

Patch

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index d3f39e8..44f8392 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -1394,7 +1394,8 @@  static int adjust_enet_interface(struct ucc_geth_private *ugeth)
 	    (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
 	    (ugeth->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) ||
 	    (ugeth->phy_interface == PHY_INTERFACE_MODE_RTBI)) {
-		upsmr |= UCC_GETH_UPSMR_RPM;
+		if (ugeth->phy_interface != PHY_INTERFACE_MODE_RMII)
+			upsmr |= UCC_GETH_UPSMR_RPM;
 		switch (ugeth->max_speed) {
 		case SPEED_10:
 			upsmr |= UCC_GETH_UPSMR_R10M;