Rename packages to recipes to sync the overlay with mainline oe.dev
[openpandora.oe.git] / recipes / linux / omap3-pandora-kernel-wifi / mru-add-clk-get-parent.diff
1 From: Mans Rullgard <mans@mansr.com>
2 Date: Fri, 29 Aug 2008 01:51:36 +0000 (+0100)
3 Subject: OMAP: Add clk_get_parent() for OMAP2/3
4 X-Git-Url: http://git.mansr.com/?p=linux-omap;a=commitdiff_plain;h=08d1f1947a5a970b2fe6e4dfeeb70286b9379056
5
6 OMAP: Add clk_get_parent() for OMAP2/3
7
8 This makes clk_get_parent() work on OMAP2/3.
9
10 Signed-off-by: Mans Rullgard <mans@mansr.com>
11 ---
12
13 diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
14 index 5f48e14..aae0d2e 100644
15 --- a/arch/arm/mach-omap2/clock.c
16 +++ b/arch/arm/mach-omap2/clock.c
17 @@ -831,6 +831,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
18         return 0;
19  }
20  
21 +struct clk *omap2_clk_get_parent(struct clk *clk)
22 +{
23 +       return clk->parent;
24 +}
25 +
26  /* DPLL rate rounding code */
27  
28  /**
29 diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
30 index 3fa2e26..2916879 100644
31 --- a/arch/arm/mach-omap2/clock.h
32 +++ b/arch/arm/mach-omap2/clock.h
33 @@ -29,6 +29,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
34  int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
35  int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
36  long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
37 +struct clk *omap2_clk_get_parent(struct clk *clk);
38  
39  #ifdef CONFIG_OMAP_RESET_CLOCKS
40  void omap2_clk_disable_unused(struct clk *clk);
41 diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
42 index c26d9d8..f91bd57 100644
43 --- a/arch/arm/mach-omap2/clock24xx.c
44 +++ b/arch/arm/mach-omap2/clock24xx.c
45 @@ -423,6 +423,7 @@ static struct clk_functions omap2_clk_functions = {
46         .clk_round_rate         = omap2_clk_round_rate,
47         .clk_set_rate           = omap2_clk_set_rate,
48         .clk_set_parent         = omap2_clk_set_parent,
49 +       .clk_get_parent         = omap2_clk_get_parent,
50         .clk_disable_unused     = omap2_clk_disable_unused,
51  #ifdef CONFIG_CPU_FREQ
52         .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
53 diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
54 index 152d095..2196edd 100644
55 --- a/arch/arm/mach-omap2/clock34xx.c
56 +++ b/arch/arm/mach-omap2/clock34xx.c
57 @@ -606,6 +606,7 @@ static struct clk_functions omap2_clk_functions = {
58         .clk_round_rate         = omap2_clk_round_rate,
59         .clk_set_rate           = omap2_clk_set_rate,
60         .clk_set_parent         = omap2_clk_set_parent,
61 +       .clk_get_parent         = omap2_clk_get_parent,
62         .clk_disable_unused     = omap2_clk_disable_unused,
63  };
64