mx6: clock: Use setbits_le32()
authorFabio Estevam <festevam@gmail.com>
Fri, 12 Jul 2019 12:32:22 +0000 (09:32 -0300)
committerStefano Babic <sbabic@denx.de>
Sun, 3 Nov 2019 12:16:41 +0000 (13:16 +0100)
The code can be made simpler by using setbits_le32(), so switch
to it.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/mx6/clock.c

index 7763c79e1c27fd6087a71d8a858599783268eda8..9d432b41049940f22f85f8a4b82cfe60ae897f2e 100644 (file)
@@ -1279,10 +1279,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
 void enable_ipu_clock(void)
 {
        struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
-       int reg;
-       reg = readl(&mxc_ccm->CCGR3);
-       reg |= MXC_CCM_CCGR3_IPU1_IPU_MASK;
-       writel(reg, &mxc_ccm->CCGR3);
+
+       setbits_le32(&mxc_ccm->CCGR3, MXC_CCM_CCGR3_IPU1_IPU_MASK);
 
        if (is_mx6dqp()) {
                setbits_le32(&mxc_ccm->CCGR6, MXC_CCM_CCGR6_PRG_CLK0_MASK);