]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/clk/sunxi-ng/ccu_div.c
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[karo-tx-linux.git] / drivers / clk / sunxi-ng / ccu_div.c
index 8659b4cb6c2099cba086b29713e2312a7703b87d..4057e6021aa9f74a1cd91acef616d48fe1fc1b1a 100644 (file)
@@ -77,6 +77,18 @@ static int ccu_div_determine_rate(struct clk_hw *hw,
 {
        struct ccu_div *cd = hw_to_ccu_div(hw);
 
+       if (clk_hw_get_num_parents(hw) == 1) {
+               req->rate = divider_round_rate(hw, req->rate,
+                                              &req->best_parent_rate,
+                                              cd->div.table,
+                                              cd->div.width,
+                                              cd->div.flags);
+
+               req->best_parent_hw = clk_hw_get_parent(hw);
+
+               return 0;
+       }
+
        return ccu_mux_helper_determine_rate(&cd->common, &cd->mux,
                                             req, ccu_div_round_rate, cd);
 }