Merge branch 'timers-for-linus-hpet' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / sh / boards / mach-ecovec24 / setup.c
index 6c13b92742e8de0d6410fbf0e3fc9553852d5e75..62123885a6fa6b0c790fda1bda57ea1d3a025029 100644 (file)
@@ -710,8 +710,6 @@ static struct clk_ops fsimck_clk_ops = {
 };
 
 static struct clk fsimckb_clk = {
-       .name           = "fsimckb_clk",
-       .id             = -1,
        .ops            = &fsimck_clk_ops,
        .enable_reg     = (void __iomem *)FCLKBCR,
        .rate           = 0, /* unknown */
@@ -1138,16 +1136,20 @@ static int __init arch_setup(void)
 
        /* set SPU2 clock to 83.4 MHz */
        clk = clk_get(NULL, "spu_clk");
-       clk_set_rate(clk, clk_round_rate(clk, 83333333));
-       clk_put(clk);
+       if (clk) {
+               clk_set_rate(clk, clk_round_rate(clk, 83333333));
+               clk_put(clk);
+       }
 
        /* change parent of FSI B */
        clk = clk_get(NULL, "fsib_clk");
-       clk_register(&fsimckb_clk);
-       clk_set_parent(clk, &fsimckb_clk);
-       clk_set_rate(clk, 11000);
-       clk_set_rate(&fsimckb_clk, 11000);
-       clk_put(clk);
+       if (clk) {
+               clk_register(&fsimckb_clk);
+               clk_set_parent(clk, &fsimckb_clk);
+               clk_set_rate(clk, 11000);
+               clk_set_rate(&fsimckb_clk, 11000);
+               clk_put(clk);
+       }
 
        gpio_request(GPIO_PTU0, NULL);
        gpio_direction_output(GPIO_PTU0, 0);
@@ -1159,8 +1161,10 @@ static int __init arch_setup(void)
 
        /* set VPU clock to 166 MHz */
        clk = clk_get(NULL, "vpu_clk");
-       clk_set_rate(clk, clk_round_rate(clk, 166000000));
-       clk_put(clk);
+       if (clk) {
+               clk_set_rate(clk, clk_round_rate(clk, 166000000));
+               clk_put(clk);
+       }
 
        /* enable IrDA */
        gpio_request(GPIO_FN_IRDA_OUT, NULL);