linux/drivers/clk
Codrin Ciubotariu 1573eebeaa clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1
In clk_generated_determine_rate(), if the divisor is greater than
GENERATED_MAX_DIV + 1, then the wrong best_rate will be returned.
If clk_generated_set_rate() will be called later with this wrong
rate, it will return -EINVAL, so the generated clock won't change
its value. Do no let the divisor be greater than GENERATED_MAX_DIV + 1.

Fixes: 8c7aa63289 ("clk: at91: clk-generated: remove useless divisor loop")
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2019-07-22 14:32:08 -07:00
..
actions treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
analogbits treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
at91 clk: at91: generated: Truncate divisor to GENERATED_MAX_DIV + 1 2019-07-22 14:32:08 -07:00
axis treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
axs10x treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bcm This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
berlin treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
davinci clk: Remove io.h from clk-provider.h 2019-05-15 13:21:37 -07:00
h8300 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
hisilicon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
imgtec treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
imx This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
ingenic This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
keystone This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
loongson1 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mediatek This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
meson This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
microchip treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 445 2019-06-05 17:37:18 +02:00
mmp clk: mmp: frac: Remove set but not used variable 'prev_rate' 2019-06-07 11:54:48 -07:00
mvebu This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
mxs treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
nxp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 159 2019-05-30 11:26:37 -07:00
pistachio treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
pxa treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
qcom This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
renesas This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
rockchip This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
samsung This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
sifive A few clk driver fixes 2019-05-30 16:33:37 -07:00
sirf treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
socfpga This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
spear clk: spear: fix WDT clock definition on SPEAr600 2018-04-06 13:45:34 -07:00
sprd This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
st treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sunxi This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
sunxi-ng This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
tegra This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
ti This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
uniphier treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
ux500 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
versatile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
x86 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
zte treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
zynq treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 401 2019-06-05 17:37:13 +02:00
zynqmp ARM: SoC-related driver updates 2019-05-16 09:19:14 -07:00
clk-asm9260.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
clk-aspeed.c clk: Aspeed: Setup video engine clocking 2019-04-18 14:56:19 -07:00
clk-axi-clkgen.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00
clk-axm5516.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clk-bd718x7.c clk: bd718x7: Support ROHM BD70528 clk block 2019-06-27 10:57:24 +01:00
clk-bulk.c clk: Add clk_bulk_get_optional() function 2019-06-25 14:28:01 -07:00
clk-cdce706.c This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
clk-cdce925.c Merge branches 'clk-dt-name', 'clk-ti-of-node' and 'clk-sa' into clk-next 2018-10-18 15:33:52 -07:00
clk-clps711x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
clk-composite.c clk: Remove CLK_IS_BASIC clk flag 2019-04-26 10:40:49 -07:00
clk-conf.c clk: Tag clk core files with SPDX 2018-12-11 09:57:47 -08:00
clk-cs2000-cp.c clk: cs2000-cp: convert to SPDX identifiers 2018-08-02 13:55:00 -07:00
clk-devres.c clk: Add devm_clk_bulk_get_optional() function 2019-06-25 14:28:01 -07:00
clk-divider.c Merge branch 'clk-ti' into clk-next 2019-05-07 11:46:02 -07:00
clk-efm32gg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clk-fixed-factor.c Merge branch 'clk-parent-rewrite-1' into clk-next 2019-05-07 11:46:13 -07:00
clk-fixed-mmio.c clk: Remove io.h from clk-provider.h 2019-05-15 13:21:37 -07:00
clk-fixed-rate.c clk: Remove CLK_IS_BASIC clk flag 2019-04-26 10:40:49 -07:00
clk-fractional-divider.c clk: Remove io.h from clk-provider.h 2019-05-15 13:21:37 -07:00
clk-gate.c Merge branch 'clk-ti' into clk-next 2019-05-07 11:46:02 -07:00
clk-gemini.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
clk-gpio.c clk: Remove CLK_IS_BASIC clk flag 2019-04-26 10:40:49 -07:00
clk-hi655x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
clk-highbank.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
clk-hsdk-pll.c clk: Remove io.h from clk-provider.h 2019-05-15 13:21:37 -07:00
clk-lochnagar.c clk: lochnagar: Use new parent_data approach to register clock parents 2019-06-25 16:29:03 -07:00
clk-max9485.c clk: Add driver for MAX9485 2018-07-06 13:44:06 -07:00
clk-max77686.c clk: clk-max77686: Clean clkdev lookup leak and use devm 2019-02-06 10:35:03 -08:00
clk-milbeaut.c clock: milbeaut: Add Milbeaut M10V clock controller 2019-04-25 16:43:37 -07:00
clk-moxart.c
clk-multiplier.c clk: Remove io.h from clk-provider.h 2019-05-15 13:21:37 -07:00
clk-mux.c Merge branch 'clk-ti' into clk-next 2019-05-07 11:46:02 -07:00
clk-nomadik.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
clk-npcm7xx.c This time it looks like a quieter release cycle in the clk tree. I guess that's 2018-10-31 11:08:30 -07:00
clk-nspire.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clk-oxnas.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
clk-palmas.c clk: palmas: constify clk_ops structure 2018-11-06 09:41:44 -08:00
clk-pwm.c This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
clk-qoriq.c This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
clk-rk808.c - Core Frameworks 2019-07-15 20:18:40 -07:00
clk-s2mps11.c clk: s2mps11: constify clk_ops structure 2018-11-06 09:42:12 -08:00
clk-scmi.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-scpi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
clk-si514.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
clk-si544.c clk: clk-si544: Implement small frequency change support 2019-06-27 13:45:38 -07:00
clk-si570.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
clk-si5341.c clk: Add Si5341/Si5340 driver 2019-06-27 14:06:47 -07:00
clk-si5351.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
clk-si5351.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
clk-stm32f4.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
clk-stm32h7.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-stm32mp1.c clk: stm32mp1: Add ddrperfm clock 2019-04-29 11:13:23 -07:00
clk-tango4.c clk: Convert to using %pOFn instead of device_node.name 2018-08-30 09:50:20 -07:00
clk-twl6040.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
clk-u300.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
clk-versaclock5.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
clk-vt8500.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
clk-wm831x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
clk-xgene.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
clk.c This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
clk.h clk: consoldiate the __clk_get_hw() declarations 2019-07-12 11:00:14 -07:00
clkdev.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig This round of clk driver and framework updates is heavy on the driver update 2019-07-17 10:07:48 -07:00
Makefile clk: Add Si5341/Si5340 driver 2019-06-27 14:06:47 -07:00