forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/clk/tegra/cvb.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Utility functions for parsing Tegra CVB voltage tables
34 *
4
- * Copyright (C) 2012-2014 NVIDIA Corporation. All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
5
+ * Copyright (C) 2012-2019 NVIDIA Corporation. All rights reserved.
156 */
167 #include <linux/err.h>
178 #include <linux/kernel.h>
....@@ -62,9 +53,9 @@
6253 }
6354
6455 static int build_opp_table(struct device *dev, const struct cvb_table *table,
56
+ struct rail_alignment *align,
6557 int speedo_value, unsigned long max_freq)
6658 {
67
- const struct rail_alignment *align = &table->alignment;
6859 int i, ret, dfll_mv, min_mv, max_mv;
6960
7061 min_mv = round_voltage(table->min_millivolts, align, UP);
....@@ -109,8 +100,9 @@
109100 */
110101 const struct cvb_table *
111102 tegra_cvb_add_opp_table(struct device *dev, const struct cvb_table *tables,
112
- size_t count, int process_id, int speedo_id,
113
- int speedo_value, unsigned long max_freq)
103
+ size_t count, struct rail_alignment *align,
104
+ int process_id, int speedo_id, int speedo_value,
105
+ unsigned long max_freq)
114106 {
115107 size_t i;
116108 int ret;
....@@ -124,7 +116,8 @@
124116 if (table->process_id != -1 && table->process_id != process_id)
125117 continue;
126118
127
- ret = build_opp_table(dev, table, speedo_value, max_freq);
119
+ ret = build_opp_table(dev, table, align, speedo_value,
120
+ max_freq);
128121 return ret ? ERR_PTR(ret) : table;
129122 }
130123