| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Marvell Kirkwood SoC clocks |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> |
|---|
| 8 | 9 | * Andrew Lunn <andrew@lunn.ch> |
|---|
| 9 | 10 | * |
|---|
| 10 | | - * This file is licensed under the terms of the GNU General Public |
|---|
| 11 | | - * License version 2. This program is licensed "as is" without any |
|---|
| 12 | | - * warranty of any kind, whether express or implied. |
|---|
| 13 | 11 | */ |
|---|
| 14 | 12 | |
|---|
| 15 | 13 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 187 | 185 | } |
|---|
| 188 | 186 | } |
|---|
| 189 | 187 | |
|---|
| 188 | +static u32 __init mv98dx1135_get_tclk_freq(void __iomem *sar) |
|---|
| 189 | +{ |
|---|
| 190 | + return 166666667; |
|---|
| 191 | +} |
|---|
| 192 | + |
|---|
| 190 | 193 | static const struct coreclk_soc_desc kirkwood_coreclks = { |
|---|
| 191 | 194 | .get_tclk_freq = kirkwood_get_tclk_freq, |
|---|
| 192 | 195 | .get_cpu_freq = kirkwood_get_cpu_freq, |
|---|
| .. | .. |
|---|
| 199 | 202 | .get_tclk_freq = kirkwood_get_tclk_freq, |
|---|
| 200 | 203 | .get_cpu_freq = mv88f6180_get_cpu_freq, |
|---|
| 201 | 204 | .get_clk_ratio = mv88f6180_get_clk_ratio, |
|---|
| 205 | + .ratios = kirkwood_coreclk_ratios, |
|---|
| 206 | + .num_ratios = ARRAY_SIZE(kirkwood_coreclk_ratios), |
|---|
| 207 | +}; |
|---|
| 208 | + |
|---|
| 209 | +static const struct coreclk_soc_desc mv98dx1135_coreclks = { |
|---|
| 210 | + .get_tclk_freq = mv98dx1135_get_tclk_freq, |
|---|
| 211 | + .get_cpu_freq = kirkwood_get_cpu_freq, |
|---|
| 212 | + .get_clk_ratio = kirkwood_get_clk_ratio, |
|---|
| 202 | 213 | .ratios = kirkwood_coreclk_ratios, |
|---|
| 203 | 214 | .num_ratios = ARRAY_SIZE(kirkwood_coreclk_ratios), |
|---|
| 204 | 215 | }; |
|---|
| .. | .. |
|---|
| 328 | 339 | |
|---|
| 329 | 340 | if (of_device_is_compatible(np, "marvell,mv88f6180-core-clock")) |
|---|
| 330 | 341 | mvebu_coreclk_setup(np, &mv88f6180_coreclks); |
|---|
| 342 | + else if (of_device_is_compatible(np, "marvell,mv98dx1135-core-clock")) |
|---|
| 343 | + mvebu_coreclk_setup(np, &mv98dx1135_coreclks); |
|---|
| 331 | 344 | else |
|---|
| 332 | 345 | mvebu_coreclk_setup(np, &kirkwood_coreclks); |
|---|
| 333 | 346 | |
|---|
| .. | .. |
|---|
| 342 | 355 | kirkwood_clk_init); |
|---|
| 343 | 356 | CLK_OF_DECLARE(mv88f6180_clk, "marvell,mv88f6180-core-clock", |
|---|
| 344 | 357 | kirkwood_clk_init); |
|---|
| 358 | +CLK_OF_DECLARE(98dx1135_clk, "marvell,mv98dx1135-core-clock", |
|---|
| 359 | + kirkwood_clk_init); |
|---|