void __init s3c2412_init_clocks(int xtal) { unsigned long tmp; unsigned long fclk; unsigned long hclk; unsigned long pclk; /* now we've got our machine bits initialised, work out what * clocks we've got */ fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2); clk_mpll.rate = fclk; tmp = __raw_readl(S3C2410_CLKDIVN); /* work out clock scalings */ hclk = fclk / ((tmp & S3C2412_CLKDIVN_HDIVN_MASK) + 1); hclk /= ((tmp & S3C2412_CLKDIVN_ARMDIVN) ? 2 : 1); pclk = hclk / ((tmp & S3C2412_CLKDIVN_PDIVN) ? 2 : 1); /* print brieft summary of clocks, etc */ printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); /* initialise the clocks here, to allow other things like the * console to use them */ s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); s3c2412_baseclk_add(); }
void __init s3c2412_init_clocks(int xtal) { s3c24xx_register_baseclocks(xtal); s3c2412_setup_clocks(); s3c2412_baseclk_add(); }
void __init s3c2412_init_clocks(int xtal) { /* initialise the clocks here, to allow other things like the * console to use them */ s3c24xx_register_baseclocks(xtal); s3c2412_setup_clocks(); s3c2412_baseclk_add(); }