Commit a0fb007b authored by Hartley Sweeten's avatar Hartley Sweeten Committed by Russell King

ARM: 6174/1: ep93xx: clear devcfg bits before setting them

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: default avatarRyan Mallon <ryan@bluewatersys.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 16bcf78f
...@@ -216,8 +216,8 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) ...@@ -216,8 +216,8 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
spin_lock_irqsave(&syscon_swlock, flags); spin_lock_irqsave(&syscon_swlock, flags);
val = __raw_readl(EP93XX_SYSCON_DEVCFG); val = __raw_readl(EP93XX_SYSCON_DEVCFG);
val |= set_bits;
val &= ~clear_bits; val &= ~clear_bits;
val |= set_bits;
__raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
__raw_writel(val, EP93XX_SYSCON_DEVCFG); __raw_writel(val, EP93XX_SYSCON_DEVCFG);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment