All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ep93xx: clear devcfg bits before setting them
@ 2010-06-12  0:09 H Hartley Sweeten
  2010-06-13 22:46 ` Ryan Mallon
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2010-06-12  0:09 UTC (permalink / raw)
  To: linux-arm-kernel

The ep93xx core helper function ep93xx_devcfg_set_clear should mask the
clear_bits before setting the new set_bits in case the clear_bits are a
mask value that also includes the set_bits.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>

---

diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 9092677..92f2ebb 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -215,8 +215,8 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
 	spin_lock_irqsave(&syscon_swlock, flags);
 
 	val = __raw_readl(EP93XX_SYSCON_DEVCFG);
-	val |= set_bits;
 	val &= ~clear_bits;
+	val |= set_bits;
 	__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
 	__raw_writel(val, EP93XX_SYSCON_DEVCFG);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] ep93xx: clear devcfg bits before setting them
  2010-06-12  0:09 [PATCH] ep93xx: clear devcfg bits before setting them H Hartley Sweeten
@ 2010-06-13 22:46 ` Ryan Mallon
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan Mallon @ 2010-06-13 22:46 UTC (permalink / raw)
  To: linux-arm-kernel

H Hartley Sweeten wrote:
> The ep93xx core helper function ep93xx_devcfg_set_clear should mask the
> clear_bits before setting the new set_bits in case the clear_bits are a
> mask value that also includes the set_bits.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <ryan@bluewatersys.com>

Acked-by: Ryan Mallon <ryan@bluewatersys.com>

> ---
> 
> diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
> index 9092677..92f2ebb 100644
> --- a/arch/arm/mach-ep93xx/core.c
> +++ b/arch/arm/mach-ep93xx/core.c
> @@ -215,8 +215,8 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
>  	spin_lock_irqsave(&syscon_swlock, flags);
>  
>  	val = __raw_readl(EP93XX_SYSCON_DEVCFG);
> -	val |= set_bits;
>  	val &= ~clear_bits;
> +	val |= set_bits;
>  	__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
>  	__raw_writel(val, EP93XX_SYSCON_DEVCFG);
>  


-- 
Bluewater Systems Ltd - ARM Technology Solution Centre

Ryan Mallon         		5 Amuri Park, 404 Barbadoes St
ryan at bluewatersys.com         	PO Box 13 889, Christchurch 8013
http://www.bluewatersys.com	New Zealand
Phone: +64 3 3779127		Freecall: Australia 1800 148 751
Fax:   +64 3 3779135			  USA 1800 261 2934

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-13 22:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-12  0:09 [PATCH] ep93xx: clear devcfg bits before setting them H Hartley Sweeten
2010-06-13 22:46 ` Ryan Mallon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.