diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2021-02-10 06:02:14 +0100 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2021-02-23 02:51:04 +0100 |
commit | c6ca7616f7d5c2ce166280107ba74db1d528fcb7 (patch) | |
tree | 12e5c34d4433b636971078f7e2aff0338ee82bf1 /drivers/soc/canaan/Kconfig | |
parent | RISC-V: Add a non-void return for sbi v02 functions (diff) | |
download | linux-c6ca7616f7d5c2ce166280107ba74db1d528fcb7.tar.xz linux-c6ca7616f7d5c2ce166280107ba74db1d528fcb7.zip |
clk: Add RISC-V Canaan Kendryte K210 clock driver
Add a clock provider driver for the Canaan Kendryte K210 RISC-V SoC.
This new driver with the compatible string "canaan,k210-clk" implements
support for the full clock structure of the K210 SoC. Since it is
required for the correct operation of the SoC, this driver is
selected by default for compilation when the SOC_CANAAN option is
selected.
With this change, the k210-sysctl driver is turned into a simple
platform driver which enables its power bus clock and triggers
populating its child nodes. The sysctl driver retains the SOC early
initialization code, but the implementation now relies on the new
function k210_clk_early_init() provided by the new clk-k210 driver.
The clock structure implemented and many of the coding ideas for the
driver come from the work by Sean Anderson on the K210 support for the
U-Boot project.
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'drivers/soc/canaan/Kconfig')
-rw-r--r-- | drivers/soc/canaan/Kconfig | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/soc/canaan/Kconfig b/drivers/soc/canaan/Kconfig index 5232d13f07e5..8179b69518b4 100644 --- a/drivers/soc/canaan/Kconfig +++ b/drivers/soc/canaan/Kconfig @@ -1,14 +1,12 @@ # SPDX-License-Identifier: GPL-2.0 -if SOC_CANAAN - -config K210_SYSCTL +config SOC_K210_SYSCTL bool "Canaan Kendryte K210 SoC system controller" - default y - depends on RISCV + depends on RISCV && SOC_CANAAN && OF + default SOC_CANAAN + select PM + select SIMPLE_PM_BUS + select SYSCON + select MFD_SYSCON help - Enables controlling the K210 various clocks and to enable - general purpose use of the extra 2MB of SRAM normally - reserved for the AI engine. - -endif + Canaan Kendryte K210 SoC system controller driver. |