linux/drivers/clk/bcm
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
..
clk-bcm63xx.c clk: bcm: Add BCM63138 clock support 2015-11-20 15:46:27 -08:00
clk-bcm281xx.c clk: bcm281xx: move compatible string definitions 2014-04-30 11:51:39 -07:00
clk-bcm2835-aux.c clk: bcm2835: fix check of error code returned by devm_ioremap_resource() 2016-03-15 18:14:11 -07:00
clk-bcm2835.c clk: bcm2835: correctly enable fractional clock support 2016-03-17 10:42:17 -07:00
clk-bcm21664.c clk: bcm21664: use common clock framework 2014-04-30 11:51:44 -07:00
clk-cygnus.c clk: iproc: Add support for Cygnus audio clocks 2016-01-29 16:31:38 -08:00
clk-iproc-armpll.c clk: iproc: add initial common clock support 2015-06-18 12:36:38 -07:00
clk-iproc-asiu.c clk: iproc: fix memory leak from clock name 2015-07-02 09:50:26 -07:00
clk-iproc-pll.c clk: iproc: Add support for Cygnus audio clocks 2016-01-29 16:31:38 -08:00
clk-iproc.h clk: iproc: Remove __init from header 2016-01-29 16:31:40 -08:00
clk-kona-setup.c clk: bcm/kona: Remove ccu_list 2015-05-14 17:11:20 -07:00
clk-kona.c clk: bcm: Convert to clk_hw based provider APIs 2015-08-24 16:48:48 -07:00
clk-kona.h clk: bcm/kona: Remove ccu_list 2015-05-14 17:11:20 -07:00
clk-ns2.c clk: ns2: add clock support for Broadcom Northstar 2 SoC 2015-10-21 17:22:58 -07:00
clk-nsp.c clk: iproc: Split off dig_filter 2015-10-21 17:02:57 -07:00
Kconfig clk: bcm: Add BCM63138 clock support 2015-11-20 15:46:27 -08:00
Makefile Merge branch 'clk-bcm2835' into clk-next 2015-12-22 16:49:38 -08:00