]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-imx/clk-pfd.c
Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / arm / mach-imx / clk-pfd.c
index e2ed4160f329515531a6e72e5b7260a651f2e3ec..0b0f6f66ec56b680219bdcad3e550670e7130131 100644 (file)
@@ -109,12 +109,23 @@ static int clk_pfd_set_rate(struct clk_hw *hw, unsigned long rate,
        return 0;
 }
 
+static int clk_pfd_is_enabled(struct clk_hw *hw)
+{
+       struct clk_pfd *pfd = to_clk_pfd(hw);
+
+       if (readl_relaxed(pfd->reg) & (1 << ((pfd->idx + 1) * 8 - 1)))
+               return 0;
+
+       return 1;
+}
+
 static const struct clk_ops clk_pfd_ops = {
        .enable         = clk_pfd_enable,
        .disable        = clk_pfd_disable,
        .recalc_rate    = clk_pfd_recalc_rate,
        .round_rate     = clk_pfd_round_rate,
        .set_rate       = clk_pfd_set_rate,
+       .is_enabled     = clk_pfd_is_enabled,
 };
 
 struct clk *imx_clk_pfd(const char *name, const char *parent_name,