|
@@ -928,3 +928,81 @@ void __init_or_cpufreq s3c64xx_setup_clocks(void)
|
|
|
|
|
|
printk(KERN_INFO "S3C64XX: HCLK2=%ld, HCLK=%ld, PCLK=%ld\n",
|
|
|
hclk2, hclk, pclk);
|
|
|
+
|
|
|
+ clk_fout_mpll.rate = mpll;
|
|
|
+ clk_fout_epll.rate = epll;
|
|
|
+ clk_fout_apll.rate = apll;
|
|
|
+
|
|
|
+ clk_h2.rate = hclk2;
|
|
|
+ clk_h.rate = hclk;
|
|
|
+ clk_p.rate = pclk;
|
|
|
+ clk_f.rate = fclk;
|
|
|
+
|
|
|
+ for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++)
|
|
|
+ s3c_set_clksrc(init_parents[ptr], true);
|
|
|
+
|
|
|
+ for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
|
|
|
+ s3c_set_clksrc(&clksrcs[ptr], true);
|
|
|
+}
|
|
|
+
|
|
|
+static struct clk *clks1[] __initdata = {
|
|
|
+ &clk_ext_xtal_mux,
|
|
|
+ &clk_iis_cd0,
|
|
|
+ &clk_iis_cd1,
|
|
|
+ &clk_iisv4_cd,
|
|
|
+ &clk_pcm_cd,
|
|
|
+ &clk_mout_epll.clk,
|
|
|
+ &clk_mout_mpll.clk,
|
|
|
+ &clk_dout_mpll,
|
|
|
+ &clk_arm,
|
|
|
+};
|
|
|
+
|
|
|
+static struct clk *clks[] __initdata = {
|
|
|
+ &clk_ext,
|
|
|
+ &clk_epll,
|
|
|
+ &clk_27m,
|
|
|
+ &clk_48m,
|
|
|
+ &clk_h2,
|
|
|
+ &clk_xusbxti,
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * s3c64xx_register_clocks - register clocks for s3c6400 and s3c6410
|
|
|
+ * @xtal: The rate for the clock crystal feeding the PLLs.
|
|
|
+ * @armclk_divlimit: Divisor mask for ARMCLK.
|
|
|
+ *
|
|
|
+ * Register the clocks for the S3C6400 and S3C6410 SoC range, such
|
|
|
+ * as ARMCLK as well as the necessary parent clocks.
|
|
|
+ *
|
|
|
+ * This call does not setup the clocks, which is left to the
|
|
|
+ * s3c64xx_setup_clocks() call which may be needed by the cpufreq
|
|
|
+ * or resume code to re-set the clocks if the bootloader has changed
|
|
|
+ * them.
|
|
|
+ */
|
|
|
+void __init s3c64xx_register_clocks(unsigned long xtal,
|
|
|
+ unsigned armclk_divlimit)
|
|
|
+{
|
|
|
+ unsigned int cnt;
|
|
|
+
|
|
|
+ armclk_mask = armclk_divlimit;
|
|
|
+
|
|
|
+ s3c24xx_register_baseclocks(xtal);
|
|
|
+ s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
|
|
|
+
|
|
|
+ s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
|
|
|
+
|
|
|
+ s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
|
|
|
+ s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
|
|
|
+
|
|
|
+ s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev));
|
|
|
+ for (cnt = 0; cnt < ARRAY_SIZE(clk_cdev); cnt++)
|
|
|
+ s3c_disable_clocks(clk_cdev[cnt], 1);
|
|
|
+
|
|
|
+ s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1));
|
|
|
+ s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
|
|
|
+ for (cnt = 0; cnt < ARRAY_SIZE(clksrc_cdev); cnt++)
|
|
|
+ s3c_register_clksrc(clksrc_cdev[cnt], 1);
|
|
|
+ clkdev_add_table(s3c64xx_clk_lookup, ARRAY_SIZE(s3c64xx_clk_lookup));
|
|
|
+
|
|
|
+ s3c_pwmclk_init();
|
|
|
+}
|