Patchwork [U-Boot,09/11] arm: ks8695/cm4xxx: don't reconfigure switch

login
register
mail settings
Submitter Yann Vernier
Date Oct. 5, 2012, 12:09 p.m.
Message ID <1349438998-10954-10-git-send-email-yann.vernier@orsoc.se>
Download mbox | patch
Permalink /patch/189467/
State Changes Requested
Delegated to: Albert ARIBAUD
Headers show

Comments

Yann Vernier - Oct. 5, 2012, 12:09 p.m.
A small bug caused code to set up LEDs to instead disable lots
of functionality in the Ethernet switch, including bounds checks.
---
 arch/arm/cpu/arm920t/ks8695/lowlevel_init.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Albert ARIBAUD - Oct. 18, 2012, 7:13 p.m.
Hi Yann,

On Fri,  5 Oct 2012 14:09:56 +0200, Yann Vernier
<yann.vernier@orsoc.se> wrote:

> A small bug caused code to set up LEDs to instead disable lots
> of functionality in the Ethernet switch, including bounds checks.
> ---
>  arch/arm/cpu/arm920t/ks8695/lowlevel_init.S |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S b/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
> index bec9738..31b028b 100644
> --- a/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
> +++ b/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
> @@ -205,7 +205,7 @@ highflash:
>  
>  	ldr	r1, =(KS8695_IO_BASE+KS8695_SWITCH_CTRL0)
>  	ldr	r2, [r1]		/* Get switch ctrl0 register       */
> -	and	r2, r2, #0x0fc00000	/* Mask out LED control bits       */
> +	bic	r2, r2, #0x0fc00000	/* Mask out LED control bits       */
>  	orr	r2, r2, #0x01800000	/* Set Link/activity/speed actions */
>  	str	r2, [r1]
>  

Can you turn the magic numbers here into more explicit symbolic values?

Amicalement,

Patch

diff --git a/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S b/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
index bec9738..31b028b 100644
--- a/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
+++ b/arch/arm/cpu/arm920t/ks8695/lowlevel_init.S
@@ -205,7 +205,7 @@  highflash:
 
 	ldr	r1, =(KS8695_IO_BASE+KS8695_SWITCH_CTRL0)
 	ldr	r2, [r1]		/* Get switch ctrl0 register       */
-	and	r2, r2, #0x0fc00000	/* Mask out LED control bits       */
+	bic	r2, r2, #0x0fc00000	/* Mask out LED control bits       */
 	orr	r2, r2, #0x01800000	/* Set Link/activity/speed actions */
 	str	r2, [r1]