.. | .. |
---|
| 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" |
---|
.. | .. |
---|
610 | 603 | &iep_clk.common, |
---|
611 | 604 | }; |
---|
612 | 605 | |
---|
| 606 | +static const struct clk_hw *clk_parent_pll_audio[] = { |
---|
| 607 | + &pll_audio_base_clk.common.hw |
---|
| 608 | +}; |
---|
| 609 | + |
---|
613 | 610 | /* We hardcode the divider to 1 for now */ |
---|
614 | | -static CLK_FIXED_FACTOR(pll_audio_clk, "pll-audio", |
---|
615 | | - "pll-audio-base", 1, 1, CLK_SET_RATE_PARENT); |
---|
616 | | -static CLK_FIXED_FACTOR(pll_audio_2x_clk, "pll-audio-2x", |
---|
617 | | - "pll-audio-base", 2, 1, CLK_SET_RATE_PARENT); |
---|
618 | | -static CLK_FIXED_FACTOR(pll_audio_4x_clk, "pll-audio-4x", |
---|
619 | | - "pll-audio-base", 1, 1, CLK_SET_RATE_PARENT); |
---|
620 | | -static CLK_FIXED_FACTOR(pll_audio_8x_clk, "pll-audio-8x", |
---|
621 | | - "pll-audio-base", 1, 2, CLK_SET_RATE_PARENT); |
---|
622 | | -static CLK_FIXED_FACTOR(pll_video0_2x_clk, "pll-video0-2x", |
---|
623 | | - "pll-video0", 1, 2, CLK_SET_RATE_PARENT); |
---|
624 | | -static CLK_FIXED_FACTOR(pll_video1_2x_clk, "pll-video1-2x", |
---|
625 | | - "pll-video1", 1, 2, CLK_SET_RATE_PARENT); |
---|
| 611 | +static CLK_FIXED_FACTOR_HWS(pll_audio_clk, "pll-audio", |
---|
| 612 | + clk_parent_pll_audio, |
---|
| 613 | + 1, 1, CLK_SET_RATE_PARENT); |
---|
| 614 | +static CLK_FIXED_FACTOR_HWS(pll_audio_2x_clk, "pll-audio-2x", |
---|
| 615 | + clk_parent_pll_audio, |
---|
| 616 | + 2, 1, CLK_SET_RATE_PARENT); |
---|
| 617 | +static CLK_FIXED_FACTOR_HWS(pll_audio_4x_clk, "pll-audio-4x", |
---|
| 618 | + clk_parent_pll_audio, |
---|
| 619 | + 1, 1, CLK_SET_RATE_PARENT); |
---|
| 620 | +static CLK_FIXED_FACTOR_HWS(pll_audio_8x_clk, "pll-audio-8x", |
---|
| 621 | + clk_parent_pll_audio, |
---|
| 622 | + 1, 2, CLK_SET_RATE_PARENT); |
---|
| 623 | +static CLK_FIXED_FACTOR_HW(pll_video0_2x_clk, "pll-video0-2x", |
---|
| 624 | + &pll_video0_clk.common.hw, |
---|
| 625 | + 1, 2, CLK_SET_RATE_PARENT); |
---|
| 626 | +static CLK_FIXED_FACTOR_HW(pll_video1_2x_clk, "pll-video1-2x", |
---|
| 627 | + &pll_video1_clk.common.hw, |
---|
| 628 | + 1, 2, CLK_SET_RATE_PARENT); |
---|
626 | 629 | |
---|
627 | 630 | static struct clk_hw_onecell_data sun5i_a10s_hw_clks = { |
---|
628 | 631 | .hws = { |
---|