Lines Matching +full:version +full:- +full:minor
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Match running platform with pre-defined OPP values for CPUFreq
43 * struct sti_cpufreq_ddata - ST CPUFreq Driver Data
56 struct device_node *np = ddata.cpu->of_node; in sti_cpufreq_fetch_major()
83 struct device_node *np = dev->of_node; in sti_cpufreq_fetch_minor()
88 ret = of_property_read_u32_index(np, "st,syscfg-eng", in sti_cpufreq_fetch_minor()
92 "No minor number offset provided %pOF [%d]\n", in sti_cpufreq_fetch_minor()
100 "Failed to read the minor number from syscon [%d]\n", in sti_cpufreq_fetch_minor()
154 struct device_node *np = dev->of_node; in sti_cpufreq_set_opp_info()
157 unsigned int version[VERSION_ELEMENTS]; in sti_cpufreq_set_opp_info() local
158 int pcode, substrate, major, minor; in sti_cpufreq_set_opp_info() local
162 .supported_hw = version, in sti_cpufreq_set_opp_info()
163 .supported_hw_count = ARRAY_SIZE(version), in sti_cpufreq_set_opp_info()
170 return -ENODEV; in sti_cpufreq_set_opp_info()
173 ret = of_property_read_u32_index(np, "st,syscfg-eng", in sti_cpufreq_set_opp_info()
203 dev_err(dev, "Failed to obtain major version\n"); in sti_cpufreq_set_opp_info()
208 minor = sti_cpufreq_fetch_minor(); in sti_cpufreq_set_opp_info()
209 if (minor < 0) { in sti_cpufreq_set_opp_info()
210 dev_err(dev, "Failed to obtain minor version\n"); in sti_cpufreq_set_opp_info()
211 /* Use default minor number */ in sti_cpufreq_set_opp_info()
212 minor = DEFAULT_VERSION; in sti_cpufreq_set_opp_info()
217 version[0] = BIT(major); in sti_cpufreq_set_opp_info()
218 version[1] = BIT(minor); in sti_cpufreq_set_opp_info()
219 version[2] = BIT(substrate); in sti_cpufreq_set_opp_info()
227 dev_dbg(dev, "pcode: %d major: %d minor: %d substrate: %d\n", in sti_cpufreq_set_opp_info()
228 pcode, major, minor, substrate); in sti_cpufreq_set_opp_info()
229 dev_dbg(dev, "version[0]: %x version[1]: %x version[2]: %x\n", in sti_cpufreq_set_opp_info()
230 version[0], version[1], version[2]); in sti_cpufreq_set_opp_info()
238 struct device_node *np = dev->of_node; in sti_cpufreq_fetch_syscon_registers()
246 ddata.syscfg_eng = syscon_regmap_lookup_by_phandle(np, "st,syscfg-eng"); in sti_cpufreq_fetch_syscon_registers()
248 dev_err(dev, "\"st,syscfg-eng\" not supplied\n"); in sti_cpufreq_fetch_syscon_registers()
262 return -ENODEV; in sti_cpufreq_init()
270 if (!of_property_present(ddata.cpu->of_node, "operating-points-v2")) { in sti_cpufreq_init()
271 dev_err(ddata.cpu, "OPP-v2 not supported\n"); in sti_cpufreq_init()
287 platform_device_register_simple("cpufreq-dt", -1, NULL, 0); in sti_cpufreq_init()