2 * Utility functions for parsing Tegra CVB voltage tables
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __DRIVERS_CLK_TEGRA_CVB_H
16 #define __DRIVERS_CLK_TEGRA_CVB_H
18 #include <linux/types.h>
22 #define MAX_DVFS_FREQS 40
24 struct rail_alignment
{
29 struct cvb_coefficients
{
35 struct cvb_table_freq_entry
{
37 struct cvb_coefficients coefficients
;
40 struct cvb_cpu_dfll_data
{
52 struct rail_alignment alignment
;
56 struct cvb_table_freq_entry cvb_table
[MAX_DVFS_FREQS
];
57 struct cvb_cpu_dfll_data cpu_dfll_data
;
60 const struct cvb_table
*tegra_cvb_build_opp_table(
61 const struct cvb_table
*cvb_tables
,
62 size_t sz
, int process_id
,
63 int speedo_id
, int speedo_value
,
64 unsigned long max_rate
,
65 struct device
*opp_dev
);