Skip to content

Commit 30b8e27

Browse files
paul-walmsley-sifivebebarino
authored andcommitted
clk: sifive: add a driver for the SiFive FU540 PRCI IP block
Add driver code for the SiFive FU540 PRCI IP block. This IP block handles reset and clock control for the SiFive FU540 device and implements SoC-level clock tree controls and dividers. Based on code written by Wesley Terpstra <[email protected]>: riscvarchive/riscv-linux@999529e Boot and PLL rate change were tested on a SiFive HiFive Unleashed board. This version includes several changes requested by Stephen Boyd <[email protected]>. Signed-off-by: Paul Walmsley <[email protected]> Signed-off-by: Paul Walmsley <[email protected]> Cc: Michael Turquette <[email protected]> Cc: Stephen Boyd <[email protected]> Cc: Albert Ou <[email protected]> Cc: Wesley W. Terpstra <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Megan Wachs <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] [[email protected]: Fix some const and ARRAY_SIZE() issues, make makefile only descend if CLK_SIFIVE=y] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 7b9487a commit 30b8e27

File tree

5 files changed

+647
-0
lines changed

5 files changed

+647
-0
lines changed

drivers/clk/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ source "drivers/clk/mvebu/Kconfig"
311311
source "drivers/clk/qcom/Kconfig"
312312
source "drivers/clk/renesas/Kconfig"
313313
source "drivers/clk/samsung/Kconfig"
314+
source "drivers/clk/sifive/Kconfig"
314315
source "drivers/clk/sprd/Kconfig"
315316
source "drivers/clk/sunxi-ng/Kconfig"
316317
source "drivers/clk/tegra/Kconfig"

drivers/clk/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ obj-$(CONFIG_COMMON_CLK_QCOM) += qcom/
9494
obj-y += renesas/
9595
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
9696
obj-$(CONFIG_COMMON_CLK_SAMSUNG) += samsung/
97+
obj-$(CONFIG_CLK_SIFIVE) += sifive/
9798
obj-$(CONFIG_ARCH_SIRF) += sirf/
9899
obj-$(CONFIG_ARCH_SOCFPGA) += socfpga/
99100
obj-$(CONFIG_PLAT_SPEAR) += spear/

drivers/clk/sifive/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
menuconfig CLK_SIFIVE
4+
bool "SiFive SoC driver support"
5+
help
6+
SoC drivers for SiFive Linux-capable SoCs.
7+
8+
if CLK_SIFIVE
9+
10+
config CLK_SIFIVE_FU540_PRCI
11+
bool "PRCI driver for SiFive FU540 SoCs"
12+
select CLK_ANALOGBITS_WRPLL_CLN28HPC
13+
help
14+
Supports the Power Reset Clock interface (PRCI) IP block found in
15+
FU540 SoCs. If this kernel is meant to run on a SiFive FU540 SoC,
16+
enable this driver.
17+
18+
endif

drivers/clk/sifive/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_CLK_SIFIVE_FU540_PRCI) += fu540-prci.o

0 commit comments

Comments
 (0)