aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-ecovec24/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/mach-ecovec24/setup.c')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 6c13b92742e8..62123885a6fa 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -710,8 +710,6 @@ static struct clk_ops fsimck_clk_ops = {
710}; 710};
711 711
712static struct clk fsimckb_clk = { 712static struct clk fsimckb_clk = {
713 .name = "fsimckb_clk",
714 .id = -1,
715 .ops = &fsimck_clk_ops, 713 .ops = &fsimck_clk_ops,
716 .enable_reg = (void __iomem *)FCLKBCR, 714 .enable_reg = (void __iomem *)FCLKBCR,
717 .rate = 0, /* unknown */ 715 .rate = 0, /* unknown */
@@ -1138,16 +1136,20 @@ static int __init arch_setup(void)
1138 1136
1139 /* set SPU2 clock to 83.4 MHz */ 1137 /* set SPU2 clock to 83.4 MHz */
1140 clk = clk_get(NULL, "spu_clk"); 1138 clk = clk_get(NULL, "spu_clk");
1141 clk_set_rate(clk, clk_round_rate(clk, 83333333)); 1139 if (clk) {
1142 clk_put(clk); 1140 clk_set_rate(clk, clk_round_rate(clk, 83333333));
1141 clk_put(clk);
1142 }
1143 1143
1144 /* change parent of FSI B */ 1144 /* change parent of FSI B */
1145 clk = clk_get(NULL, "fsib_clk"); 1145 clk = clk_get(NULL, "fsib_clk");
1146 clk_register(&fsimckb_clk); 1146 if (clk) {
1147 clk_set_parent(clk, &fsimckb_clk); 1147 clk_register(&fsimckb_clk);
1148 clk_set_rate(clk, 11000); 1148 clk_set_parent(clk, &fsimckb_clk);
1149 clk_set_rate(&fsimckb_clk, 11000); 1149 clk_set_rate(clk, 11000);
1150 clk_put(clk); 1150 clk_set_rate(&fsimckb_clk, 11000);
1151 clk_put(clk);
1152 }
1151 1153
1152 gpio_request(GPIO_PTU0, NULL); 1154 gpio_request(GPIO_PTU0, NULL);
1153 gpio_direction_output(GPIO_PTU0, 0); 1155 gpio_direction_output(GPIO_PTU0, 0);
@@ -1159,8 +1161,10 @@ static int __init arch_setup(void)
1159 1161
1160 /* set VPU clock to 166 MHz */ 1162 /* set VPU clock to 166 MHz */
1161 clk = clk_get(NULL, "vpu_clk"); 1163 clk = clk_get(NULL, "vpu_clk");
1162 clk_set_rate(clk, clk_round_rate(clk, 166000000)); 1164 if (clk) {
1163 clk_put(clk); 1165 clk_set_rate(clk, clk_round_rate(clk, 166000000));
1166 clk_put(clk);
1167 }
1164 1168
1165 /* enable IrDA */ 1169 /* enable IrDA */
1166 gpio_request(GPIO_FN_IRDA_OUT, NULL); 1170 gpio_request(GPIO_FN_IRDA_OUT, NULL);