Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec6deea1 authored by Linus Walleij's avatar Linus Walleij Committed by Mike Turquette
Browse files

clk: nomadik: fix multiplatform problem



The Nomadik debugfs screws up multiplatform boots if debugfs
is enabled on the multiplatform image, since it's a simple
initcall that is unconditionally executed and reads from certain
memory locations.

Fix this by checking that the driver has been properly
initialized, so a base offset to the Nomadik SRC controller
exists, before proceeding to register debugfs files.

Reported-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 10b7cdc0
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -494,6 +494,9 @@ static const struct file_operations nomadik_src_clk_debugfs_ops = {


static int __init nomadik_src_clk_init_debugfs(void)
static int __init nomadik_src_clk_init_debugfs(void)
{
{
	/* Vital for multiplatform */
	if (!src_base)
		return -ENODEV;
	src_pcksr0_boot = readl(src_base + SRC_PCKSR0);
	src_pcksr0_boot = readl(src_base + SRC_PCKSR0);
	src_pcksr1_boot = readl(src_base + SRC_PCKSR1);
	src_pcksr1_boot = readl(src_base + SRC_PCKSR1);
	debugfs_create_file("nomadik-src-clk", S_IFREG | S_IRUGO,
	debugfs_create_file("nomadik-src-clk", S_IFREG | S_IRUGO,