コード例 #1
0
void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
				       fdiv_fn get_fdiv)
{
	int ptr;

	/* s3c2443 parents h and p clocks from prediv */
	clk_h.parent = &clk_prediv;
	clk_p.parent = &clk_prediv;

	clk_usb_bus.parent = &clk_usb_bus_host.clk;
	clk_epll.parent = &clk_epllref.clk;

	s3c24xx_register_baseclocks(xtal);
	s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));

	for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
		s3c_register_clksrc(clksrcs[ptr], 1);

	s3c_register_clksrc(clksrc_clks, ARRAY_SIZE(clksrc_clks));
	s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));

	/* See s3c2443/etc notes on disabling clocks at init time */
	s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
	s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));

	s3c2443_common_setup_clocks(get_mpll, get_fdiv);
}
コード例 #2
0
void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
                                       unsigned int *divs, int nr_divs,
                                       int divmask)
{
    int ptr;

    armdiv = divs;
    nr_armdiv = nr_divs;
    armdivmask = divmask;

    /* s3c2443 parents h clock from prediv */
    clk_h.parent = &clk_prediv;
    clk_h.ops = &clk_h_ops;

    /* and p clock from h clock */
    clk_p.parent = &clk_h;
    clk_p.ops = &clk_p_ops;

    clk_usb_bus.parent = &clk_usb_bus_host.clk;
    clk_epll.parent = &clk_epllref.clk;

    s3c24xx_register_baseclocks(xtal);
    s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));

    for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
        s3c_register_clksrc(clksrcs[ptr], 1);

    s3c_register_clksrc(clksrc_clks, ARRAY_SIZE(clksrc_clks));
    s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));

    /* See s3c2443/etc notes on disabling clocks at init time */
    s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
    s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
    clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));

    s3c2443_common_setup_clocks(get_mpll);
}
コード例 #3
0
ファイル: clock.c プロジェクト: andi34/Dhollmen_Kernel
void __init_or_cpufreq s3c2443_setup_clocks(void)
{
	s3c2443_common_setup_clocks(s3c2443_get_mpll, s3c2443_fclk_div);
}
コード例 #4
0
ファイル: clock.c プロジェクト: 33d/linux-2.6.21-hh20
void __init_or_cpufreq s3c2416_setup_clocks(void)
{
	s3c2443_common_setup_clocks(s3c2416_get_pll);
}