Skip to content

Commit ec6deea

Browse files
Linus WalleijMike Turquette
authored andcommitted
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: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Mike Turquette <mturquette@linaro.org>
1 parent 10b7cdc commit ec6deea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/clk/clk-nomadik.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ static const struct file_operations nomadik_src_clk_debugfs_ops = {
494494

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

0 commit comments

Comments
 (0)