Stephen Warren | a50a399 | 2011-01-07 22:36:15 -0700 | [diff] [blame] | 1 | /* |
| 2 | * tegra_asoc_utils.h - Definitions for Tegra DAS driver |
| 3 | * |
| 4 | * Author: Stephen Warren <swarren@nvidia.com> |
Stephen Warren | c2f6702 | 2012-04-06 11:15:55 -0600 | [diff] [blame] | 5 | * Copyright (C) 2010,2012 - NVIDIA, Inc. |
Stephen Warren | a50a399 | 2011-01-07 22:36:15 -0700 | [diff] [blame] | 6 | * |
| 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__ |
Rasmus Villemoes | d50884a | 2014-08-22 11:27:07 +0200 | [diff] [blame] | 24 | #define __TEGRA_ASOC_UTILS_H__ |
Stephen Warren | a50a399 | 2011-01-07 22:36:15 -0700 | [diff] [blame] | 25 | |
Stephen Warren | d64e57c | 2011-01-28 14:26:40 -0700 | [diff] [blame] | 26 | struct clk; |
| 27 | struct device; |
| 28 | |
Stephen Warren | c2f6702 | 2012-04-06 11:15:55 -0600 | [diff] [blame] | 29 | enum tegra_asoc_utils_soc { |
| 30 | TEGRA_ASOC_UTILS_SOC_TEGRA20, |
| 31 | TEGRA_ASOC_UTILS_SOC_TEGRA30, |
Stephen Warren | a7fc5d2 | 2013-03-21 13:56:42 -0600 | [diff] [blame] | 32 | TEGRA_ASOC_UTILS_SOC_TEGRA114, |
Stephen Warren | 5e049fc | 2013-10-11 15:43:17 -0600 | [diff] [blame] | 33 | TEGRA_ASOC_UTILS_SOC_TEGRA124, |
Stephen Warren | c2f6702 | 2012-04-06 11:15:55 -0600 | [diff] [blame] | 34 | }; |
| 35 | |
Stephen Warren | d64e57c | 2011-01-28 14:26:40 -0700 | [diff] [blame] | 36 | struct tegra_asoc_utils_data { |
| 37 | struct device *dev; |
Stephen Warren | c2f6702 | 2012-04-06 11:15:55 -0600 | [diff] [blame] | 38 | enum tegra_asoc_utils_soc soc; |
Stephen Warren | d64e57c | 2011-01-28 14:26:40 -0700 | [diff] [blame] | 39 | struct clk *clk_pll_a; |
| 40 | struct clk *clk_pll_a_out0; |
| 41 | struct clk *clk_cdev1; |
| 42 | int set_baseclock; |
| 43 | int set_mclk; |
| 44 | }; |
| 45 | |
| 46 | int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate, |
Stephen Warren | 0754139 | 2011-04-19 15:25:09 -0600 | [diff] [blame] | 47 | int mclk); |
Lucas Stach | 919ad49 | 2012-12-20 00:17:33 +0100 | [diff] [blame] | 48 | int tegra_asoc_utils_set_ac97_rate(struct tegra_asoc_utils_data *data); |
Stephen Warren | d64e57c | 2011-01-28 14:26:40 -0700 | [diff] [blame] | 49 | int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, |
| 50 | struct device *dev); |
| 51 | void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data); |
Stephen Warren | a50a399 | 2011-01-07 22:36:15 -0700 | [diff] [blame] | 52 | |
| 53 | #endif |