aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-05-13 15:26:12 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-14 00:45:11 -0400
commit110147c8c5136e1768a382da8896cf7f8b518982 (patch)
tree3d4211833d4cce495ca26669749f821ee497a84d
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
ASoC: tegra: always use clk_get() in utility code
Now that all of the Tegra device trees have been updated to represent the required audio clocks, remove the compatibility code from the Tegra ASoC utility code, and always use clk_get() rather than clk_get_sys(). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/tegra/tegra_asoc_utils.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c
index 24fb001be7f4..d173880f290d 100644
--- a/sound/soc/tegra/tegra_asoc_utils.c
+++ b/sound/soc/tegra/tegra_asoc_utils.c
@@ -173,7 +173,6 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
173 struct device *dev) 173 struct device *dev)
174{ 174{
175 int ret; 175 int ret;
176 bool new_clocks = false;
177 176
178 data->dev = dev; 177 data->dev = dev;
179 178
@@ -181,40 +180,28 @@ int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
181 data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA20; 180 data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA20;
182 else if (of_machine_is_compatible("nvidia,tegra30")) 181 else if (of_machine_is_compatible("nvidia,tegra30"))
183 data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA30; 182 data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA30;
184 else if (of_machine_is_compatible("nvidia,tegra114")) { 183 else if (of_machine_is_compatible("nvidia,tegra114"))
185 data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA114; 184 data->soc = TEGRA_ASOC_UTILS_SOC_TEGRA114;
186 new_clocks = true; 185 else {
187 } else {
188 dev_err(data->dev, "SoC unknown to Tegra ASoC utils\n"); 186 dev_err(data->dev, "SoC unknown to Tegra ASoC utils\n");
189 return -EINVAL; 187 return -EINVAL;
190 } 188 }
191 189
192 if (new_clocks) 190 data->clk_pll_a = clk_get(dev, "pll_a");
193 data->clk_pll_a = clk_get(dev, "pll_a");
194 else
195 data->clk_pll_a = clk_get_sys(NULL, "pll_a");
196 if (IS_ERR(data->clk_pll_a)) { 191 if (IS_ERR(data->clk_pll_a)) {
197 dev_err(data->dev, "Can't retrieve clk pll_a\n"); 192 dev_err(data->dev, "Can't retrieve clk pll_a\n");
198 ret = PTR_ERR(data->clk_pll_a); 193 ret = PTR_ERR(data->clk_pll_a);
199 goto err; 194 goto err;
200 } 195 }
201 196
202 if (new_clocks) 197 data->clk_pll_a_out0 = clk_get(dev, "pll_a_out0");
203 data->clk_pll_a_out0 = clk_get(dev, "pll_a_out0");
204 else
205 data->clk_pll_a_out0 = clk_get_sys(NULL, "pll_a_out0");
206 if (IS_ERR(data->clk_pll_a_out0)) { 198 if (IS_ERR(data->clk_pll_a_out0)) {
207 dev_err(data->dev, "Can't retrieve clk pll_a_out0\n"); 199 dev_err(data->dev, "Can't retrieve clk pll_a_out0\n");
208 ret = PTR_ERR(data->clk_pll_a_out0); 200 ret = PTR_ERR(data->clk_pll_a_out0);
209 goto err_put_pll_a; 201 goto err_put_pll_a;
210 } 202 }
211 203
212 if (new_clocks) 204 data->clk_cdev1 = clk_get(dev, "mclk");
213 data->clk_cdev1 = clk_get(dev, "mclk");
214 else if (data->soc == TEGRA_ASOC_UTILS_SOC_TEGRA20)
215 data->clk_cdev1 = clk_get_sys(NULL, "cdev1");
216 else
217 data->clk_cdev1 = clk_get_sys("extern1", NULL);
218 if (IS_ERR(data->clk_cdev1)) { 205 if (IS_ERR(data->clk_cdev1)) {
219 dev_err(data->dev, "Can't retrieve clk cdev1\n"); 206 dev_err(data->dev, "Can't retrieve clk cdev1\n");
220 ret = PTR_ERR(data->clk_cdev1); 207 ret = PTR_ERR(data->clk_cdev1);