ARM i.MX23: use correct register for setting the rate
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 24 Jan 2011 07:26:33 +0000 (08:26 +0100)
committerSascha Hauer <s.hauer@pengutronix.de>
Mon, 24 Jan 2011 08:01:55 +0000 (09:01 +0100)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
arch/arm/mach-mxs/clock-mx23.c

index b1a362ebfded190a7e959a7f540955b6f5fe6c6e..72069243aec48744dda045bc3622455e801be492 100644 (file)
@@ -304,7 +304,7 @@ static int name##_set_rate(struct clk *clk, unsigned long rate)             \
        reg = __raw_readl(CLKCTRL_BASE_ADDR + HW_CLKCTRL_##dr);         \
        reg &= ~BM_CLKCTRL_##dr##_DIV;                                  \
        reg |= div << BP_CLKCTRL_##dr##_DIV;                            \
-       if (reg | (1 << clk->enable_shift)) {                           \
+       if (reg & (1 << clk->enable_shift)) {                           \
                pr_err("%s: clock is gated\n", __func__);               \
                return -EINVAL;                                         \
        }                                                               \