diff mbox

[U-Boot,v2,3/3] arm: at91: ether: Prepare for mach-types.h changes

Message ID 1304340559-17110-1-git-send-email-grinberg@compulab.co.il
State Rejected
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Igor Grinberg May 2, 2011, 12:49 p.m. UTC
at91 ethernet module used machine_is_cbs337() macro for board specific
Linux compatibility issue.
Remove this, as no such board exist in current U-Boot tree.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
---
 arch/arm/cpu/arm920t/at91rm9200/ether.c |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

Comments

Igor Grinberg May 16, 2011, 1:31 p.m. UTC | #1
ping!


It has been two weeks...


On 05/02/11 15:49, Igor Grinberg wrote:

> at91 ethernet module used machine_is_cbs337() macro for board specific
> Linux compatibility issue.
> Remove this, as no such board exist in current U-Boot tree.
>
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
>  arch/arm/cpu/arm920t/at91rm9200/ether.c |   18 +++---------------
>  1 files changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/arch/arm/cpu/arm920t/at91rm9200/ether.c b/arch/arm/cpu/arm920t/at91rm9200/ether.c
> index e1cdeba..2015e13 100644
> --- a/arch/arm/cpu/arm920t/at91rm9200/ether.c
> +++ b/arch/arm/cpu/arm920t/at91rm9200/ether.c
> @@ -195,21 +195,9 @@ int eth_init (bd_t * bd)
>  
>  	eth_getenv_enetaddr("ethaddr", enetaddr);
>  
> -	/* The CSB337 originally used a version of the MicroMonitor bootloader
> -	 * which saved Ethernet addresses in the "wrong" order.  Operating
> -	 * systems (like Linux) know this, and apply a workaround.  Replicate
> -	 * that MicroMonitor behavior so we avoid needing to make such OS code
> -	 * care about which bootloader was used.
> -	 */
> -	if (machine_is_csb337()) {
> -		p_mac->EMAC_SA2H = (enetaddr[0] <<  8) | (enetaddr[1]);
> -		p_mac->EMAC_SA2L = (enetaddr[2] << 24) | (enetaddr[3] << 16)
> -				 | (enetaddr[4] <<  8) | (enetaddr[5]);
> -	} else {
> -		p_mac->EMAC_SA2L = (enetaddr[3] << 24) | (enetaddr[2] << 16)
> -				 | (enetaddr[1] <<  8) | (enetaddr[0]);
> -		p_mac->EMAC_SA2H = (enetaddr[5] <<  8) | (enetaddr[4]);
> -	}
> +	p_mac->EMAC_SA2L = (enetaddr[3] << 24) | (enetaddr[2] << 16)
> +			 | (enetaddr[1] <<  8) | (enetaddr[0]);
> +	p_mac->EMAC_SA2H = (enetaddr[5] <<  8) | (enetaddr[4]);
>  
>  	p_mac->EMAC_RBQP = (long) (&rbfdt[0]);
>  	p_mac->EMAC_RSR &= ~(AT91C_EMAC_RSR_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA);
diff mbox

Patch

diff --git a/arch/arm/cpu/arm920t/at91rm9200/ether.c b/arch/arm/cpu/arm920t/at91rm9200/ether.c
index e1cdeba..2015e13 100644
--- a/arch/arm/cpu/arm920t/at91rm9200/ether.c
+++ b/arch/arm/cpu/arm920t/at91rm9200/ether.c
@@ -195,21 +195,9 @@  int eth_init (bd_t * bd)
 
 	eth_getenv_enetaddr("ethaddr", enetaddr);
 
-	/* The CSB337 originally used a version of the MicroMonitor bootloader
-	 * which saved Ethernet addresses in the "wrong" order.  Operating
-	 * systems (like Linux) know this, and apply a workaround.  Replicate
-	 * that MicroMonitor behavior so we avoid needing to make such OS code
-	 * care about which bootloader was used.
-	 */
-	if (machine_is_csb337()) {
-		p_mac->EMAC_SA2H = (enetaddr[0] <<  8) | (enetaddr[1]);
-		p_mac->EMAC_SA2L = (enetaddr[2] << 24) | (enetaddr[3] << 16)
-				 | (enetaddr[4] <<  8) | (enetaddr[5]);
-	} else {
-		p_mac->EMAC_SA2L = (enetaddr[3] << 24) | (enetaddr[2] << 16)
-				 | (enetaddr[1] <<  8) | (enetaddr[0]);
-		p_mac->EMAC_SA2H = (enetaddr[5] <<  8) | (enetaddr[4]);
-	}
+	p_mac->EMAC_SA2L = (enetaddr[3] << 24) | (enetaddr[2] << 16)
+			 | (enetaddr[1] <<  8) | (enetaddr[0]);
+	p_mac->EMAC_SA2H = (enetaddr[5] <<  8) | (enetaddr[4]);
 
 	p_mac->EMAC_RBQP = (long) (&rbfdt[0]);
 	p_mac->EMAC_RSR &= ~(AT91C_EMAC_RSR_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA);