return __roundup_pow_of_two(div);
if (table)
return _round_up_table(table, div);
+#ifdef CONFIG_AMLOGIC_MODIFY
+ if ((flags & CLK_DIVIDER_PROHIBIT_ZERO) && (div == 1))
+ div++;
+#endif
return div;
}
* CLK_DIVIDER_MAX_AT_ZERO - For dividers which are like CLK_DIVIDER_ONE_BASED
* except when the value read from the register is zero, the divisor is
* 2^width of the field.
+ * CLK_DIVIDER_PROHIBIT_ZERO - Prohibit value 0 of register(no bypass, enable by
+ * CONFIG_AMLOGIC_MODIFY).
*/
struct clk_divider {
struct clk_hw hw;
#define CLK_DIVIDER_ROUND_CLOSEST BIT(4)
#define CLK_DIVIDER_READ_ONLY BIT(5)
#define CLK_DIVIDER_MAX_AT_ZERO BIT(6)
+#ifdef CONFIG_AMLOGIC_MODIFY
+#define CLK_DIVIDER_PROHIBIT_ZERO BIT(7)
+#endif
extern const struct clk_ops clk_divider_ops;
extern const struct clk_ops clk_divider_ro_ops;