Merge branch 'org.openembedded.dev' of git@git.openembedded.net:/openembedded into...
[vuplus_openembedded] / packages / linux / linux-omap / mru-add-clk-get-parent.diff
1 From 2414b5ac7596904dd8951619316b63d644f544db Mon Sep 17 00:00:00 2001
2 From: Mans Rullgard <mans@mansr.com>
3 Date: Tue, 22 Jul 2008 01:58:18 +0100
4 Subject: [PATCH] ARM: OMAP: add clk_get_parent() for OMAP2/3
5
6 Signed-off-by: Mans Rullgard <mans@mansr.com>
7 ---
8  arch/arm/mach-omap2/clock.c     |    5 +++++
9  arch/arm/mach-omap2/clock.h     |    1 +
10  arch/arm/mach-omap2/clock24xx.c |    1 +
11  arch/arm/mach-omap2/clock34xx.c |    1 +
12  4 files changed, 8 insertions(+), 0 deletions(-)
13
14 diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
15 index c3af24e..9e502a0 100644
16 --- a/arch/arm/mach-omap2/clock.c
17 +++ b/arch/arm/mach-omap2/clock.c
18 @@ -817,6 +817,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent)
19         return 0;
20  }
21  
22 +struct clk *omap2_clk_get_parent(struct clk *clk)
23 +{
24 +       return clk->parent;
25 +}
26 +
27  /* DPLL rate rounding code */
28  
29  /**
30 diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
31 index bcb0c03..a5183d0 100644
32 --- a/arch/arm/mach-omap2/clock.h
33 +++ b/arch/arm/mach-omap2/clock.h
34 @@ -29,6 +29,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate);
35  int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent);
36  int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance);
37  long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate);
38 +struct clk *omap2_clk_get_parent(struct clk *clk);
39  
40  #ifdef CONFIG_OMAP_RESET_CLOCKS
41  void omap2_clk_disable_unused(struct clk *clk);
42 diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
43 index a54f10f..4382e60 100644
44 --- a/arch/arm/mach-omap2/clock24xx.c
45 +++ b/arch/arm/mach-omap2/clock24xx.c
46 @@ -416,6 +416,7 @@ static struct clk_functions omap2_clk_functions = {
47         .clk_round_rate         = omap2_clk_round_rate,
48         .clk_set_rate           = omap2_clk_set_rate,
49         .clk_set_parent         = omap2_clk_set_parent,
50 +       .clk_get_parent         = omap2_clk_get_parent,
51         .clk_disable_unused     = omap2_clk_disable_unused,
52  #ifdef CONFIG_CPU_FREQ
53         .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
54 diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
55 index cc43f4f..2a1a6b1 100644
56 --- a/arch/arm/mach-omap2/clock34xx.c
57 +++ b/arch/arm/mach-omap2/clock34xx.c
58 @@ -635,6 +635,7 @@ static struct clk_functions omap2_clk_functions = {
59         .clk_round_rate         = omap2_clk_round_rate,
60         .clk_set_rate           = omap2_clk_set_rate,
61         .clk_set_parent         = omap2_clk_set_parent,
62 +       .clk_get_parent         = omap2_clk_get_parent,
63         .clk_disable_unused     = omap2_clk_disable_unused,
64  };
65  
66 -- 
67 1.5.6.3
68