diff options
author | Aidan MacDonald <aidanmacdonald.0x0@gmail.com> | 2022-10-26 22:43:40 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2022-10-27 21:59:02 +0300 |
commit | 83b975b5aa9522b6d72b2a8c0f3c209726ceb6b3 (patch) | |
tree | 49abd11af7151c02541c433e58bc036d6e5a207c /drivers/clk/ingenic/cgu.h | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
download | linux-83b975b5aa9522b6d72b2a8c0f3c209726ceb6b3.tar.xz |
clk: ingenic: Make PLL clock "od" field optional
Add support for defining PLL clocks with od_bits = 0, meaning that
OD is fixed to 1 and there is no OD field in the register. In this
case od_max must also be 0, which is enforced with BUG_ON().
Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20221026194345.243007-2-aidanmacdonald.0x0@gmail.com
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/ingenic/cgu.h')
-rw-r--r-- | drivers/clk/ingenic/cgu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/ingenic/cgu.h b/drivers/clk/ingenic/cgu.h index 147b7df0d657..567142b584bb 100644 --- a/drivers/clk/ingenic/cgu.h +++ b/drivers/clk/ingenic/cgu.h @@ -33,7 +33,8 @@ * @od_shift: the number of bits to shift the post-VCO divider value by (ie. * the index of the lowest bit of the post-VCO divider value in * the PLL's control register) - * @od_bits: the size of the post-VCO divider field in bits + * @od_bits: the size of the post-VCO divider field in bits, or 0 if no + * OD field exists (then the OD is fixed to 1) * @od_max: the maximum post-VCO divider value * @od_encoding: a pointer to an array mapping post-VCO divider values to * their encoded values in the PLL control register, or -1 for |