Commit 10305853 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Paul Mundt

sh: Check return value of clk_get on ecovec24

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent fa676ca3
...@@ -1136,16 +1136,20 @@ static int __init arch_setup(void) ...@@ -1136,16 +1136,20 @@ static int __init arch_setup(void)
/* set SPU2 clock to 83.4 MHz */ /* set SPU2 clock to 83.4 MHz */
clk = clk_get(NULL, "spu_clk"); clk = clk_get(NULL, "spu_clk");
if (clk) {
clk_set_rate(clk, clk_round_rate(clk, 83333333)); clk_set_rate(clk, clk_round_rate(clk, 83333333));
clk_put(clk); clk_put(clk);
}
/* change parent of FSI B */ /* change parent of FSI B */
clk = clk_get(NULL, "fsib_clk"); clk = clk_get(NULL, "fsib_clk");
if (clk) {
clk_register(&fsimckb_clk); clk_register(&fsimckb_clk);
clk_set_parent(clk, &fsimckb_clk); clk_set_parent(clk, &fsimckb_clk);
clk_set_rate(clk, 11000); clk_set_rate(clk, 11000);
clk_set_rate(&fsimckb_clk, 11000); clk_set_rate(&fsimckb_clk, 11000);
clk_put(clk); clk_put(clk);
}
gpio_request(GPIO_PTU0, NULL); gpio_request(GPIO_PTU0, NULL);
gpio_direction_output(GPIO_PTU0, 0); gpio_direction_output(GPIO_PTU0, 0);
...@@ -1157,8 +1161,10 @@ static int __init arch_setup(void) ...@@ -1157,8 +1161,10 @@ static int __init arch_setup(void)
/* set VPU clock to 166 MHz */ /* set VPU clock to 166 MHz */
clk = clk_get(NULL, "vpu_clk"); clk = clk_get(NULL, "vpu_clk");
if (clk) {
clk_set_rate(clk, clk_round_rate(clk, 166000000)); clk_set_rate(clk, clk_round_rate(clk, 166000000));
clk_put(clk); clk_put(clk);
}
/* enable IrDA */ /* enable IrDA */
gpio_request(GPIO_FN_IRDA_OUT, NULL); gpio_request(GPIO_FN_IRDA_OUT, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment