mx6: clock: use setup_gpmi_io_clk() to change nfc clk divider for CONFIG_NAND_MXS
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 26 Apr 2016 13:29:48 +0000 (15:29 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 26 Apr 2016 13:29:48 +0000 (15:29 +0200)
arch/arm/cpu/armv7/mx6/clock.c

index 9e76adc..c3c9c5e 100644 (file)
@@ -698,8 +698,12 @@ static int set_nfc_clk(u32 ref, u32 freq_khz)
        if ((cs2cdr & CS2CDR_ENFC_MASK) != nfc_val) {
                debug("changing cs2cdr from %08x to %08x\n", cs2cdr,
                        (cs2cdr & ~CS2CDR_ENFC_MASK) | nfc_val);
+#ifdef CONFIG_NAND_MXS
+               setup_gpmi_io_clk(nfc_val);
+#else
                __raw_writel((cs2cdr & ~CS2CDR_ENFC_MASK) | nfc_val,
                        &imx_ccm->cs2cdr);
+#endif
        } else {
                debug("Leaving cs2cdr unchanged [%08x]\n", cs2cdr);
        }