.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2002 - 2005 Benjamin Herrenschmidt <benh@kernel.crashing.org> |
---|
3 | 4 | * Copyright (C) 2004 John Steele Scott <toojays@toojays.net> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License version 2 as |
---|
7 | | - * published by the Free Software Foundation. |
---|
8 | 5 | * |
---|
9 | 6 | * TODO: Need a big cleanup here. Basically, we need to have different |
---|
10 | 7 | * cpufreq_driver structures for the different type of HW instead of the |
---|
11 | 8 | * current mess. We also need to better deal with the detection of the |
---|
12 | 9 | * type of machine. |
---|
13 | | - * |
---|
14 | 10 | */ |
---|
15 | 11 | |
---|
16 | 12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
---|
.. | .. |
---|
128 | 124 | mtspr(SPRN_HID2, hid2); |
---|
129 | 125 | } |
---|
130 | 126 | } |
---|
131 | | -#ifdef CONFIG_6xx |
---|
| 127 | +#ifdef CONFIG_PPC_BOOK3S_32 |
---|
132 | 128 | low_choose_750fx_pll(low_speed); |
---|
133 | 129 | #endif |
---|
134 | 130 | if (low_speed == 1) { |
---|
.. | .. |
---|
166 | 162 | } |
---|
167 | 163 | |
---|
168 | 164 | /* set frequency */ |
---|
169 | | -#ifdef CONFIG_6xx |
---|
| 165 | +#ifdef CONFIG_PPC_BOOK3S_32 |
---|
170 | 166 | low_choose_7447a_dfs(low_speed); |
---|
171 | 167 | #endif |
---|
172 | 168 | udelay(100); |
---|
.. | .. |
---|
376 | 372 | |
---|
377 | 373 | static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) |
---|
378 | 374 | { |
---|
379 | | - return cpufreq_generic_init(policy, pmac_cpu_freqs, transition_latency); |
---|
| 375 | + cpufreq_generic_init(policy, pmac_cpu_freqs, transition_latency); |
---|
| 376 | + return 0; |
---|
380 | 377 | } |
---|
381 | 378 | |
---|
382 | 379 | static u32 read_gpio(struct device_node *np) |
---|
.. | .. |
---|
474 | 471 | if (slew_done_gpio_np) |
---|
475 | 472 | slew_done_gpio = read_gpio(slew_done_gpio_np); |
---|
476 | 473 | |
---|
| 474 | + of_node_put(volt_gpio_np); |
---|
| 475 | + of_node_put(freq_gpio_np); |
---|
| 476 | + of_node_put(slew_done_gpio_np); |
---|
| 477 | + |
---|
477 | 478 | /* If we use the frequency GPIOs, calculate the min/max speeds based |
---|
478 | 479 | * on the bus frequencies |
---|
479 | 480 | */ |
---|