Re: [PATCH v11 2/5] clk: clocking-wizard: Add the clockwizard to clk directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shubhrajyoti,

Overflow still occurs.

+static int clk_wzrd_dynamic_reconfig_f(struct clk_hw *hw, unsigned long rate,
+       unsigned long parent_rate)
+{
+ int err;
+ u32 value, pre;
+ unsigned long rate_div, f, clockout0_div;
+ struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
+ void __iomem *div_addr = divider->base + divider->offset;
+
+ rate_div = DIV_ROUND_DOWN_ULL(parent_rate * 1000, rate);

rate_div = DIV_ROUND_DOWN_ULL((u64)parent_rate * 1000, rate);

+ clockout0_div = rate_div / 1000;
+
+ pre = DIV_ROUND_CLOSEST((parent_rate * 1000), rate);

pre = DIV_ROUND_CLOSEST_ULL((u64)parent_rate * 1000, rate);

The rest looks good to me.

Thanks,
Zhengxun Li




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux