blob: 19fdcafed32f88eb266d34e7f21c51e5d889f729 [file] [log] [blame]
Stephen Warrena50a3992011-01-07 22:36:15 -07001/*
2 * tegra_asoc_utils.h - Definitions for Tegra DAS driver
3 *
4 * Author: Stephen Warren <swarren@nvidia.com>
Stephen Warrenc2f67022012-04-06 11:15:55 -06005 * Copyright (C) 2010,2012 - NVIDIA, Inc.
Stephen Warrena50a3992011-01-07 22:36:15 -07006 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 *
21 */
22
23#ifndef __TEGRA_ASOC_UTILS_H__
24#define __TEGRA_ASOC_UTILS_H_
25
Stephen Warrend64e57c2011-01-28 14:26:40 -070026struct clk;
27struct device;
28
Stephen Warrenc2f67022012-04-06 11:15:55 -060029enum tegra_asoc_utils_soc {
30 TEGRA_ASOC_UTILS_SOC_TEGRA20,
31 TEGRA_ASOC_UTILS_SOC_TEGRA30,
Stephen Warrena7fc5d22013-03-21 13:56:42 -060032 TEGRA_ASOC_UTILS_SOC_TEGRA114,
Stephen Warrenc2f67022012-04-06 11:15:55 -060033};
34
Stephen Warrend64e57c2011-01-28 14:26:40 -070035struct tegra_asoc_utils_data {
36 struct device *dev;
Stephen Warrenc2f67022012-04-06 11:15:55 -060037 enum tegra_asoc_utils_soc soc;
Stephen Warrend64e57c2011-01-28 14:26:40 -070038 struct clk *clk_pll_a;
39 struct clk *clk_pll_a_out0;
40 struct clk *clk_cdev1;
41 int set_baseclock;
42 int set_mclk;
43};
44
45int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
Stephen Warren07541392011-04-19 15:25:09 -060046 int mclk);
Lucas Stach919ad492012-12-20 00:17:33 +010047int tegra_asoc_utils_set_ac97_rate(struct tegra_asoc_utils_data *data);
Stephen Warrend64e57c2011-01-28 14:26:40 -070048int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
49 struct device *dev);
50void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data);
Stephen Warrena50a3992011-01-07 22:36:15 -070051
52#endif