linux/drivers/clk
Martin Sperl 959ca92a32 clk: bcm2835: correctly enable fractional clock support
The current driver calculates the clock divider with
fractional support enabled.

But it does not enable fractional support in the
control register itself resulting in an integer only divider,
but in clk_set_rate responds back the fractionally divided
clock frequency.

This patch enables fractional support in the control register
whenever there is a fractional bit set in the requested clock divider.

Mash clock limits are are also handled for the PWM clock
applying the correct divider limits (2 and max_int) applicable to
basic fractional divider support (mash order of 1).

It also adds locking to protect the read/modify/write cycle of
the register modification.

Fixes: 41691b8862 ("clk: bcm2835: Add support for programming the
audio domain clocks")

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-03-17 10:42:17 -07:00
..
at91 clk: at91: Remove CLK_IS_ROOT 2016-03-02 17:43:08 -08:00
bcm clk: bcm2835: correctly enable fractional clock support 2016-03-17 10:42:17 -07:00
berlin ARM: SoC driver updates for v4.4 2015-11-10 15:00:03 -08:00
h8300 clk: h8300: Properly cast to __iomem pointer 2016-02-26 16:01:32 -08:00
hisilicon clk: hisilicon: Remove CLK_IS_ROOT 2016-03-02 17:43:32 -08:00
imx clk: imx: Remove CLK_IS_ROOT 2016-03-02 17:44:26 -08:00
ingenic
keystone clk: keystone: fix a trivial typo 2015-10-19 15:29:09 -07:00
mediatek clk: mediatek: Remove CLK_IS_ROOT 2016-03-02 17:44:06 -08:00
meson clk: meson: Fix meson_clk_register_clks() signature type mismatch 2016-02-08 14:22:44 -08:00
mmp clk: mmp: stop using platform headers 2015-12-01 21:44:22 +01:00
mvebu clk: mvebu: Remove CLK_IS_ROOT 2016-03-03 11:26:42 -08:00
mxs clk: mxs: Remove CLK_IS_ROOT 2016-03-02 17:44:59 -08:00
nxp clk: add lpc18xx creg clk driver 2016-03-04 12:52:10 -08:00
pistachio clk: pistachio: correct critical clock list 2015-08-26 11:34:43 -07:00
pxa clk: pxa: Remove CLK_IS_ROOT 2016-03-02 17:46:00 -08:00
qcom clk: qcom: Remove CLK_IS_ROOT 2016-03-04 12:53:53 -08:00
renesas clk: renesas: div6: use RENESAS for #define 2016-03-15 18:13:02 -07:00
rockchip Inclusion of the rk3368 fractional dividers into our handling scheme, 2016-03-04 09:36:29 -08:00
samsung clk: samsung: Remove CLK_IS_ROOT 2016-03-02 17:46:29 -08:00
sirf clk: atlas7: fix noc/socket disconnect/reconnect for unit clks 2015-09-29 08:27:14 -07:00
socfpga clk: socfpga: allow for multiple parents on Arria10 periph clocks 2016-02-22 14:17:37 -08:00
spear clk: spear: Remove CLK_IS_ROOT 2016-03-02 17:46:55 -08:00
st clk: st: Remove impossible check for of_clk_get_parent_count() < 0 2016-02-26 16:01:32 -08:00
sunxi clk: sunxi: Remove use of variable length array 2016-03-15 15:15:27 -07:00
tegra clk: tegra: Remove CLK_IS_ROOT 2016-03-02 17:47:19 -08:00
ti clk: ti: Remove CLK_IS_ROOT 2016-03-02 17:47:46 -08:00
ux500 clk: ux500: Remove CLK_IS_ROOT 2016-03-02 17:48:03 -08:00
versatile clk: versatile: Remove CLK_IS_ROOT 2016-03-15 15:19:21 -07:00
x86 clk: x86: Remove clkdev.h and clk.h includes 2016-03-03 11:27:26 -08:00
zte
zynq clk: zynq: Remove CLK_IS_ROOT 2016-03-02 17:48:26 -08:00
clk-asm9260.c
clk-axi-clkgen.c clk: axi-clkgen: Remove sometimes impossible check 2016-01-29 17:11:02 -08:00
clk-axm5516.c
clk-cdce706.c clk: Convert __clk_get_flags() to clk_hw_get_flags() 2015-08-24 16:48:44 -07:00
clk-cdce925.c
clk-clps711x.c
clk-composite.c clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h 2016-01-29 12:59:50 -08:00
clk-conf.c
clk-cs2000-cp.c clk: add CS2000 Fractional-N driver 2015-11-30 16:33:38 -08:00
clk-devres.c
clk-divider.c clk: optimize the divider walk in clk_divider_bestdiv() 2016-01-29 16:45:32 -08:00
clk-efm32gg.c clk: efm32gg: Remove CLK_IS_ROOT 2016-03-02 17:48:47 -08:00
clk-fixed-factor.c clk: add clk_unregister_fixed_factor() 2016-01-29 16:35:49 -08:00
clk-fixed-rate.c clk: fixed-rate: Remove CLK_IS_ROOT 2016-03-04 14:31:17 -08:00
clk-fractional-divider.c clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h 2016-01-29 12:59:50 -08:00
clk-gate.c clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h 2016-01-29 12:59:50 -08:00
clk-gpio.c clk: gpio: Remove impossible check for of_clk_get_parent_count() < 0 2016-02-26 16:01:32 -08:00
clk-highbank.c
clk-ls1x.c
clk-max77686.c clk: max77{686,802}: Remove CLK_IS_ROOT 2016-03-15 15:19:49 -07:00
clk-max77802.c clk: max77{686,802}: Remove CLK_IS_ROOT 2016-03-15 15:19:49 -07:00
clk-max-gen.c
clk-max-gen.h
clk-mb86s7x.c clk: mb86s7x: Remove CLK_IS_ROOT 2016-03-03 11:27:48 -08:00
clk-moxart.c
clk-multiplier.c clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h 2016-01-29 12:59:50 -08:00
clk-mux.c clk: move the common clock's to_clk_*(_hw) macros to clk-provider.h 2016-01-29 12:59:50 -08:00
clk-nomadik.c
clk-nspire.c
clk-palmas.c clk: palmas: fix a possible NULL dereference 2016-01-29 16:57:09 -08:00
clk-pwm.c clk: pwm: Remove CLK_IS_ROOT 2016-03-02 17:50:08 -08:00
clk-qoriq.c clk: qoriq: fix memory leak 2015-11-30 13:00:54 -08:00
clk-rk808.c
clk-s2mps11.c clk: s2mps11: Remove CLK_IS_ROOT 2016-03-02 17:50:32 -08:00
clk-scpi.c clk: scpi: Remove CLK_IS_ROOT 2016-03-02 17:50:58 -08:00
clk-si514.c clk: si5{14,351,70}: Remove CLK_IS_ROOT 2016-03-02 17:51:13 -08:00
clk-si570.c clk: si5{14,351,70}: Remove CLK_IS_ROOT 2016-03-02 17:51:13 -08:00
clk-si5351.c clk: si5{14,351,70}: Remove CLK_IS_ROOT 2016-03-02 17:51:13 -08:00
clk-si5351.h
clk-stm32f4.c clk: stm32f4: Convert to clk_hw based provider APIs 2015-08-24 16:48:51 -07:00
clk-tango4.c clk: tango4: clkgen driver for Tango4 platforms 2015-11-16 11:07:06 -08:00
clk-twl6040.c
clk-u300.c
clk-vt8500.c clk: vt8500: don't return possibly uninitialized data 2016-02-02 11:53:17 -08:00
clk-wm831x.c
clk-xgene.c clk: xgene: Add missing parenthesis when clearing divider value 2016-03-03 11:37:15 -08:00
clk.c clk: Make of_clk_get_parent_count() return unsigned ints 2016-02-26 16:01:32 -08:00
clk.h
clkdev.c clkdev: fix clk_add_alias() with a NULL alias device name 2015-10-20 17:24:08 +01:00
Kconfig Merge branch 'clk-ti' into clk-next 2016-03-01 16:23:40 -08:00
Makefile clk: renesas: move drivers to renesas directory 2016-03-03 11:22:53 -08:00