18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * tegra_asoc_utils.h - Definitions for Tegra DAS driver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Author: Stephen Warren <swarren@nvidia.com>
68c2ecf20Sopenharmony_ci * Copyright (C) 2010,2012 - NVIDIA, Inc.
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef __TEGRA_ASOC_UTILS_H__
108c2ecf20Sopenharmony_ci#define __TEGRA_ASOC_UTILS_H__
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cistruct clk;
138c2ecf20Sopenharmony_cistruct device;
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cienum tegra_asoc_utils_soc {
168c2ecf20Sopenharmony_ci	TEGRA_ASOC_UTILS_SOC_TEGRA20,
178c2ecf20Sopenharmony_ci	TEGRA_ASOC_UTILS_SOC_TEGRA30,
188c2ecf20Sopenharmony_ci	TEGRA_ASOC_UTILS_SOC_TEGRA114,
198c2ecf20Sopenharmony_ci	TEGRA_ASOC_UTILS_SOC_TEGRA124,
208c2ecf20Sopenharmony_ci};
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_cistruct tegra_asoc_utils_data {
238c2ecf20Sopenharmony_ci	struct device *dev;
248c2ecf20Sopenharmony_ci	enum tegra_asoc_utils_soc soc;
258c2ecf20Sopenharmony_ci	struct clk *clk_pll_a;
268c2ecf20Sopenharmony_ci	struct clk *clk_pll_a_out0;
278c2ecf20Sopenharmony_ci	struct clk *clk_cdev1;
288c2ecf20Sopenharmony_ci	int set_baseclock;
298c2ecf20Sopenharmony_ci	int set_mclk;
308c2ecf20Sopenharmony_ci};
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciint tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
338c2ecf20Sopenharmony_ci			      int mclk);
348c2ecf20Sopenharmony_ciint tegra_asoc_utils_set_ac97_rate(struct tegra_asoc_utils_data *data);
358c2ecf20Sopenharmony_ciint tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
368c2ecf20Sopenharmony_ci			  struct device *dev);
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif
39