+ sm501-fix-sm501_init_reg-mask-set-order.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     SM501: Fix sm501_init_reg() mask/set order
has been added to the -mm tree.  Its filename is
     sm501-fix-sm501_init_reg-mask-set-order.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: SM501: Fix sm501_init_reg() mask/set order
From: Ben Dooks <ben-linux@xxxxxxxxx>

The order of the set and mask operation in sm501_init_reg() was setting and
then masking the bits set.  Correct the order so that we do not end up with
288MHz SDRAM clocks on certain systems.

Signed-off-by: Ben Dooks <ben-linux@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/mfd/sm501.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN drivers/mfd/sm501.c~sm501-fix-sm501_init_reg-mask-set-order drivers/mfd/sm501.c
--- a/drivers/mfd/sm501.c~sm501-fix-sm501_init_reg-mask-set-order
+++ a/drivers/mfd/sm501.c
@@ -813,6 +813,9 @@ static DEVICE_ATTR(dbg_regs, 0666, sm501
 /* sm501_init_reg
  *
  * Helper function for the init code to setup a register
+ *
+ * clear the bits which are set in r->mask, and then set
+ * the bits set in r->set.
 */
 
 static inline void sm501_init_reg(struct sm501_devdata *sm,
@@ -822,8 +825,8 @@ static inline void sm501_init_reg(struct
 	unsigned long tmp;
 
 	tmp = readl(sm->regs + reg);
-	tmp |= r->set;
 	tmp &= ~r->mask;
+	tmp |= r->set;
 	writel(tmp, sm->regs + reg);
 }
 
_

Patches currently in -mm which might be from ben-linux@xxxxxxxxx are

spi-tle620x-power-switch-driver.patch
sm501-suspend-support.patch
sm501-suspend-support-fix.patch
sm501-initialise-sdram-clock-before-bus-clocks.patch
sm501-fix-sm501_init_reg-mask-set-order.patch
sm501-clock-updates-and-checks.patch
sm501-clock-updates-and-checks-fix.patch
sm501-add-documentation-sm501txt.patch
sm501-check-sm501-id-register-on-initialisation.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux