.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Utility functions for parsing Tegra CVB voltage tables |
---|
3 | 4 | * |
---|
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. |
---|
15 | 6 | */ |
---|
16 | 7 | #include <linux/err.h> |
---|
17 | 8 | #include <linux/kernel.h> |
---|
.. | .. |
---|
62 | 53 | } |
---|
63 | 54 | |
---|
64 | 55 | static int build_opp_table(struct device *dev, const struct cvb_table *table, |
---|
| 56 | + struct rail_alignment *align, |
---|
65 | 57 | int speedo_value, unsigned long max_freq) |
---|
66 | 58 | { |
---|
67 | | - const struct rail_alignment *align = &table->alignment; |
---|
68 | 59 | int i, ret, dfll_mv, min_mv, max_mv; |
---|
69 | 60 | |
---|
70 | 61 | min_mv = round_voltage(table->min_millivolts, align, UP); |
---|
.. | .. |
---|
109 | 100 | */ |
---|
110 | 101 | const struct cvb_table * |
---|
111 | 102 | 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) |
---|
114 | 106 | { |
---|
115 | 107 | size_t i; |
---|
116 | 108 | int ret; |
---|
.. | .. |
---|
124 | 116 | if (table->process_id != -1 && table->process_id != process_id) |
---|
125 | 117 | continue; |
---|
126 | 118 | |
---|
127 | | - ret = build_opp_table(dev, table, speedo_value, max_freq); |
---|
| 119 | + ret = build_opp_table(dev, table, align, speedo_value, |
---|
| 120 | + max_freq); |
---|
128 | 121 | return ret ? ERR_PTR(ret) : table; |
---|
129 | 122 | } |
---|
130 | 123 | |
---|