Skip to content

Commit 1154492

Browse files
committed
RP1 clock debugging
1 parent 8c9ca64 commit 1154492

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

drivers/clk/clk-rp1.c

+10-4
Original file line numberDiff line numberDiff line change
@@ -2454,10 +2454,16 @@ static int rp1_clk_probe(struct platform_device *pdev)
24542454
desc = &clk_desc_array[i];
24552455
if (desc->clk_register && desc->data) {
24562456
hws[i] = desc->clk_register(clockman, desc->data);
2457-
if (!strcmp(clk_hw_get_name(hws[i]), "clk_i2s")) {
2458-
clk_i2s = hws[i];
2459-
clk_xosc = clk_hw_get_parent_by_index(clk_i2s, 0);
2460-
clk_audio = clk_hw_get_parent_by_index(clk_i2s, 1);
2457+
if (IS_ERR_OR_NULL(hws[i])) {
2458+
pr_crit("Failed to register RP1 clock '%s' - err %ld\n", *(char **)desc->data, PTR_ERR(hws[i]));
2459+
hws[i] = NULL;
2460+
} else {
2461+
pr_crit("Registered RP1 clock '%s'\n", *(char **)desc->data);
2462+
if (!strcmp(clk_hw_get_name(hws[i]), "clk_i2s")) {
2463+
clk_i2s = hws[i];
2464+
clk_xosc = clk_hw_get_parent_by_index(clk_i2s, 0);
2465+
clk_audio = clk_hw_get_parent_by_index(clk_i2s, 1);
2466+
}
24612467
}
24622468
}
24632469
}

0 commit comments

Comments
 (0)