diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-08-16 09:41:00 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-08-22 15:16:55 -0400 |
commit | f199131a8f1dde3309c8520b663aa7a3daf5995e (patch) | |
tree | 740c254a0c47c5917be81080bd221521d1f0e9c2 /arch | |
parent | 152c6e56f6a8577bd291f6f4ca897e5758332a1b (diff) |
ARM/ASoC: omap-mcbsp: Move OMAP2+ clock parenting code to ASoC driver
Move the McBSP CLKS re-parenting code to ASoC driver from
arch/arm/mach-omap2.
The call fort the re-parenting has been already limited to OMAP2+ SoC in
the ASoC driver. There is no longer need to have callback function for it.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/mcbsp.c | 40 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h | 1 |
2 files changed, 0 insertions, 41 deletions
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 577cb77db26c..ebc801ea5be9 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -101,45 +101,6 @@ static int omap4_mcbsp4_mux_rx_clk(struct device *dev, const char *signal, | |||
101 | return 0; | 101 | return 0; |
102 | } | 102 | } |
103 | 103 | ||
104 | /* McBSP CLKS source switching function */ | ||
105 | static int omap2_mcbsp_set_clk_src(struct device *dev, struct clk *clk, | ||
106 | const char *src) | ||
107 | { | ||
108 | struct clk *fck_src; | ||
109 | char *fck_src_name; | ||
110 | int r; | ||
111 | |||
112 | if (!strcmp(src, "clks_ext")) | ||
113 | fck_src_name = "pad_fck"; | ||
114 | else if (!strcmp(src, "clks_fclk")) | ||
115 | fck_src_name = "prcm_fck"; | ||
116 | else | ||
117 | return -EINVAL; | ||
118 | |||
119 | fck_src = clk_get(dev, fck_src_name); | ||
120 | if (IS_ERR_OR_NULL(fck_src)) { | ||
121 | pr_err("omap-mcbsp: %s: could not clk_get() %s\n", "clks", | ||
122 | fck_src_name); | ||
123 | return -EINVAL; | ||
124 | } | ||
125 | |||
126 | pm_runtime_put_sync(dev); | ||
127 | |||
128 | r = clk_set_parent(clk, fck_src); | ||
129 | if (IS_ERR_VALUE(r)) { | ||
130 | pr_err("omap-mcbsp: %s: could not clk_set_parent() to %s\n", | ||
131 | "clks", fck_src_name); | ||
132 | clk_put(fck_src); | ||
133 | return -EINVAL; | ||
134 | } | ||
135 | |||
136 | pm_runtime_get_sync(dev); | ||
137 | |||
138 | clk_put(fck_src); | ||
139 | |||
140 | return 0; | ||
141 | } | ||
142 | |||
143 | static int omap3_enable_st_clock(unsigned int id, bool enable) | 104 | static int omap3_enable_st_clock(unsigned int id, bool enable) |
144 | { | 105 | { |
145 | unsigned int w; | 106 | unsigned int w; |
@@ -181,7 +142,6 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) | |||
181 | pdata->reg_size = 4; | 142 | pdata->reg_size = 4; |
182 | pdata->has_ccr = true; | 143 | pdata->has_ccr = true; |
183 | } | 144 | } |
184 | pdata->set_clk_src = omap2_mcbsp_set_clk_src; | ||
185 | 145 | ||
186 | /* On OMAP2/3 the McBSP1 port has 6 pin configuration */ | 146 | /* On OMAP2/3 the McBSP1 port has 6 pin configuration */ |
187 | if (id == 1 && oh->class->rev < MCBSP_CONFIG_TYPE4) | 147 | if (id == 1 && oh->class->rev < MCBSP_CONFIG_TYPE4) |
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 18814127809a..0a7d5ca471e0 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -47,7 +47,6 @@ struct omap_mcbsp_platform_data { | |||
47 | bool has_wakeup; /* Wakeup capability */ | 47 | bool has_wakeup; /* Wakeup capability */ |
48 | bool has_ccr; /* Transceiver has configuration control registers */ | 48 | bool has_ccr; /* Transceiver has configuration control registers */ |
49 | int (*enable_st_clock)(unsigned int, bool); | 49 | int (*enable_st_clock)(unsigned int, bool); |
50 | int (*set_clk_src)(struct device *dev, struct clk *clk, const char *src); | ||
51 | int (*mux_signal)(struct device *dev, const char *signal, const char *src); | 50 | int (*mux_signal)(struct device *dev, const char *signal, const char *src); |
52 | }; | 51 | }; |
53 | 52 | ||