Blame view

arch/sh/kernel/cpu/clock.c 1.13 KB
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
1
2
3
  /*
   * arch/sh/kernel/cpu/clock.c - SuperH clock framework
   *
b1f6cfe48   Paul Mundt   sh: clkfwk: refac...
4
   *  Copyright (C) 2005 - 2009  Paul Mundt
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
5
6
7
   *
   * This clock framework is derived from the OMAP version by:
   *
b1f6cfe48   Paul Mundt   sh: clkfwk: refac...
8
   *	Copyright (C) 2004 - 2008 Nokia Corporation
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
9
10
   *	Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
   *
1d118562c   Paul Mundt   sh: Clock framewo...
11
12
   *  Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com>
   *
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
13
14
15
16
17
18
   * This file is subject to the terms and conditions of the GNU General Public
   * License.  See the file "COPYING" in the main directory of this archive
   * for more details.
   */
  #include <linux/kernel.h>
  #include <linux/init.h>
51a5006af   Paul Mundt   sh: Merge clkdev ...
19
  #include <linux/clk.h>
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
20
  #include <asm/clock.h>
253b0887b   Paul Mundt   sh: clkfwk: Rewor...
21
  #include <asm/machvec.h>
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
22

36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
23
24
  int __init clk_init(void)
  {
253b0887b   Paul Mundt   sh: clkfwk: Rewor...
25
  	int ret;
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
26

253b0887b   Paul Mundt   sh: clkfwk: Rewor...
27
28
29
30
31
  	ret = arch_clk_init();
  	if (unlikely(ret)) {
  		pr_err("%s: CPU clock registration failed.
  ", __func__);
  		return ret;
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
32
  	}
253b0887b   Paul Mundt   sh: clkfwk: Rewor...
33
34
35
36
37
38
39
40
41
  	if (sh_mv.mv_clk_init) {
  		ret = sh_mv.mv_clk_init();
  		if (unlikely(ret)) {
  			pr_err("%s: machvec clock initialization failed.
  ",
  			       __func__);
  			return ret;
  		}
  	}
dfbbbe929   dmitry pervushin   sh: Fix clock mul...
42

36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
43
  	/* Kick the child clocks.. */
b1f6cfe48   Paul Mundt   sh: clkfwk: refac...
44
  	recalculate_root_clocks();
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
45

4ff29ff8e   Paul Mundt   sh: clkfwk: Conso...
46
47
  	/* Enable the necessary init clocks */
  	clk_enable_init_clocks();
36ddf31b6   Paul Mundt   [PATCH] sh: Simpl...
48
49
  	return ret;
  }
cedcf3366   Paul Mundt   sh: clkfwk: Map t...
50