Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5136237bc392413332b02e69ada158c307da658f
Commit:     5136237bc392413332b02e69ada158c307da658f
Parent:     b5913bbd2ddebd9c2c6841986c29376e691dd396
Author:     Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 23 17:16:29 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Jun 24 08:59:11 2007 -0700

    SM501: Fix sm501_init_reg() mask/set order
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/mfd/sm501.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c
index 4c4412e..3a0ecfc 100644
--- a/drivers/mfd/sm501.c
+++ b/drivers/mfd/sm501.c
@@ -813,6 +813,9 @@ static DEVICE_ATTR(dbg_regs, 0666, sm501_dbg_regs, NULL);
 /* 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 sm501_devdata *sm,
        unsigned long tmp;
 
        tmp = readl(sm->regs + reg);
-       tmp |= r->set;
        tmp &= ~r->mask;
+       tmp |= r->set;
        writel(tmp, sm->regs + reg);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to