Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145302676
D23406.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D23406.diff
View Options
Index: head/sys/riscv/sifive/fu540_prci.c
===================================================================
--- head/sys/riscv/sifive/fu540_prci.c
+++ head/sys/riscv/sifive/fu540_prci.c
@@ -45,6 +45,7 @@
#include <machine/cpu.h>
#include <dev/extres/clk/clk.h>
+#include <dev/extres/clk/clk_fixed.h>
#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
@@ -119,6 +120,17 @@
PLL(PRCI_CLK_GEMGXLPLL, "gemgxclk", PRCI_GEMGXLPLL_CFG0),
};
+/* Fixed divisor clock TLCLK. */
+struct clk_fixed_def tlclk_def = {
+ .clkdef.id = PRCI_CLK_TLCLK,
+ .clkdef.name = "prci_tlclk",
+ .clkdef.parent_names = (const char *[]){"coreclk"},
+ .clkdef.parent_cnt = 1,
+ .clkdef.flags = CLK_NODE_STATIC_STRINGS,
+ .mult = 1,
+ .div = 2,
+};
+
static int
prci_clk_pll_init(struct clknode *clk, device_t dev)
{
@@ -270,6 +282,16 @@
clkdef.name = pll_clks[i].name;
prci_pll_register(sc, &clkdef, pll_clks[i].reg);
}
+
+ /*
+ * Register the fixed clock "tlclk".
+ *
+ * If an older device tree is being used, tlclk may appear as its own
+ * entity in the device tree, under soc/tlclk. If this is the case it
+ * will be registered automatically by the fixed_clk driver, and the
+ * version we register here will be an unreferenced duplicate.
+ */
+ clknode_fixed_register(sc->clkdom, &tlclk_def);
error = clkdom_finit(sc->clkdom);
if (error)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 19, 4:31 AM (6 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28868284
Default Alt Text
D23406.diff (1 KB)
Attached To
Mode
D23406: prci: register tlclk as a fixed clock
Attached
Detach File
Event Timeline
Log In to Comment