.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2016 Maxime Ripard. All rights reserved. |
---|
3 | | - * |
---|
4 | | - * This software is licensed under the terms of the GNU General Public |
---|
5 | | - * License version 2, as published by the Free Software Foundation, and |
---|
6 | | - * may be copied, distributed, and modified under those terms. |
---|
7 | | - * |
---|
8 | | - * This program is distributed in the hope that it will be useful, |
---|
9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | | - * GNU General Public License for more details. |
---|
12 | 4 | */ |
---|
13 | 5 | |
---|
14 | 6 | #include <linux/clk-provider.h> |
---|
| 7 | +#include <linux/io.h> |
---|
15 | 8 | #include <linux/of_address.h> |
---|
16 | 9 | |
---|
17 | 10 | #include "ccu_common.h" |
---|
.. | .. |
---|
550 | 543 | &ats_clk.common, |
---|
551 | 544 | }; |
---|
552 | 545 | |
---|
| 546 | +static const struct clk_hw *clk_parent_pll_audio[] = { |
---|
| 547 | + &pll_audio_base_clk.common.hw |
---|
| 548 | +}; |
---|
| 549 | + |
---|
553 | 550 | /* We hardcode the divider to 1 for now */ |
---|
554 | | -static CLK_FIXED_FACTOR(pll_audio_clk, "pll-audio", |
---|
555 | | - "pll-audio-base", 1, 1, CLK_SET_RATE_PARENT); |
---|
556 | | -static CLK_FIXED_FACTOR(pll_audio_2x_clk, "pll-audio-2x", |
---|
557 | | - "pll-audio-base", 2, 1, CLK_SET_RATE_PARENT); |
---|
558 | | -static CLK_FIXED_FACTOR(pll_audio_4x_clk, "pll-audio-4x", |
---|
559 | | - "pll-audio-base", 1, 1, CLK_SET_RATE_PARENT); |
---|
560 | | -static CLK_FIXED_FACTOR(pll_audio_8x_clk, "pll-audio-8x", |
---|
561 | | - "pll-audio-base", 1, 2, CLK_SET_RATE_PARENT); |
---|
562 | | -static CLK_FIXED_FACTOR(pll_periph_2x_clk, "pll-periph-2x", |
---|
563 | | - "pll-periph", 1, 2, 0); |
---|
564 | | -static CLK_FIXED_FACTOR(pll_video_2x_clk, "pll-video-2x", |
---|
565 | | - "pll-video", 1, 2, 0); |
---|
| 551 | +static CLK_FIXED_FACTOR_HWS(pll_audio_clk, "pll-audio", |
---|
| 552 | + clk_parent_pll_audio, |
---|
| 553 | + 1, 1, CLK_SET_RATE_PARENT); |
---|
| 554 | +static CLK_FIXED_FACTOR_HWS(pll_audio_2x_clk, "pll-audio-2x", |
---|
| 555 | + clk_parent_pll_audio, |
---|
| 556 | + 2, 1, CLK_SET_RATE_PARENT); |
---|
| 557 | +static CLK_FIXED_FACTOR_HWS(pll_audio_4x_clk, "pll-audio-4x", |
---|
| 558 | + clk_parent_pll_audio, |
---|
| 559 | + 1, 1, CLK_SET_RATE_PARENT); |
---|
| 560 | +static CLK_FIXED_FACTOR_HWS(pll_audio_8x_clk, "pll-audio-8x", |
---|
| 561 | + clk_parent_pll_audio, |
---|
| 562 | + 1, 2, CLK_SET_RATE_PARENT); |
---|
| 563 | +static CLK_FIXED_FACTOR_HW(pll_periph_2x_clk, "pll-periph-2x", |
---|
| 564 | + &pll_periph_clk.common.hw, |
---|
| 565 | + 1, 2, 0); |
---|
| 566 | +static CLK_FIXED_FACTOR_HW(pll_video_2x_clk, "pll-video-2x", |
---|
| 567 | + &pll_video_clk.common.hw, |
---|
| 568 | + 1, 2, 0); |
---|
566 | 569 | |
---|
567 | 570 | static struct clk_hw_onecell_data sun8i_a23_hw_clks = { |
---|
568 | 571 | .hws = { |
---|