idx = (__raw_readl(FRQMR1) >> data->shift) & 0x000f;
- /*
- * XXX: PLL1 multiplier is locked for the default clock mode,
- * when mode pin detection and configuration support is added,
- * select the multiplier dynamically.
- */
- return clk->parent->rate * 36 / div2[idx];
+ return clk->parent->rate / div2[idx];
}
static void frqmr_build_rate_table(struct clk *clk)
data->freq_table[entry].index = entry;
data->freq_table[entry].frequency =
- clk->parent->rate * 36 / div2[i];
+ clk->parent->rate / div2[i];
entry++;
}
.round_rate = frqmr_round_rate,
};
+static unsigned long pll_recalc(struct clk *clk)
+{
+ /*
+ * XXX: PLL1 multiplier is locked for the default clock mode,
+ * when mode pin detection and configuration support is added,
+ * select the multiplier dynamically.
+ */
+ return clk->parent->rate * 36;
+}
+
+static struct clk_ops pll_clk_ops = {
+ .recalc = pll_recalc,
+};
+
/*
* Default rate for the root input clock, reset this with clk_set_rate()
* from the platform code.
.rate = 33333333,
};
+static struct clk pll_clk = {
+ .name = "pll_clk",
+ .id = -1,
+ .ops = &pll_clk_ops,
+ .parent = &extal_clk,
+ .flags = CLK_ENABLE_ON_INIT,
+};
+
static struct clk cpu_clk = {
.name = "cpu_clk", /* Ick */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.flags = CLK_ENABLE_ON_INIT,
.priv = &ifc_data,
};
.name = "shyway_clk", /* SHck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.flags = CLK_ENABLE_ON_INIT,
.priv = &sfc_data,
};
.name = "peripheral_clk", /* Pck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.flags = CLK_ENABLE_ON_INIT,
.priv = &pfc_data,
};
.name = "ddr_clk", /* DDRck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.flags = CLK_ENABLE_ON_INIT,
.priv = &mfc_data,
};
.name = "bus_clk", /* Bck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.flags = CLK_ENABLE_ON_INIT,
.priv = &bfc_data,
};
.name = "ga_clk", /* GAck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.priv = &s2fc_data,
};
.name = "du_clk", /* DUck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.priv = &s3fc_data,
};
.name = "umem_clk", /* uck */
.id = -1,
.ops = &frqmr_clk_ops,
- .parent = &extal_clk,
+ .parent = &pll_clk,
.flags = CLK_ENABLE_ON_INIT,
.priv = &ufc_data,
};
static struct clk *clks[] = {
&extal_clk,
+ &pll_clk,
&cpu_clk,
­way_clk,
&peripheral_clk,