clk: sifive: add a driver for the SiFive FU540 PRCI IP block
authorPaul Walmsley <paul.walmsley@sifive.com>
Tue, 30 Apr 2019 20:51:00 +0000 (13:51 -0700)
committerStephen Boyd <sboyd@kernel.org>
Fri, 3 May 2019 16:20:56 +0000 (09:20 -0700)
commit30b8e27e3b581a173779e52096237ed19172eaf4
tree663babb80e015cae0fcc4f90af5aaf796eb24d20
parent7b9487a9a5c41ce0ff4f6ca74652e99541bd51c3
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 <wesley@sifive.com>:
https://github.com/riscv/riscv-linux/commit/999529edf517ed75b56659d456d221b2ee56bb60

Boot and PLL rate change were tested on a SiFive HiFive Unleashed
board.

This version includes several changes requested by Stephen Boyd
<sboyd@kernel.org>.

Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Wesley W. Terpstra <wesley@sifive.com>
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Megan Wachs <megan@sifive.com>
Cc: linux-riscv@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-clk@vger.kernel.org
[sboyd@kernel.org: Fix some const and ARRAY_SIZE() issues, make makefile
only descend if CLK_SIFIVE=y]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/Kconfig
drivers/clk/Makefile
drivers/clk/sifive/Kconfig [new file with mode: 0644]
drivers/clk/sifive/Makefile [new file with mode: 0644]
drivers/clk/sifive/fu540-prci.c [new file with mode: 0644]