android_kernel_oneplus_msm8998/drivers/clk/ti
Richard Watts 590202271f clk: ti: omap36xx: Work around sprz319 advisory 2.1
commit 035cd485a47dda64f25ccf8a90b11a07d0b7aa7a upstream.

The OMAP36xx DPLL5, driving EHCI USB, can be subject to a long-term
frequency drift. The frequency drift magnitude depends on the VCO update
rate, which is inversely proportional to the PLL divider. The kernel
DPLL configuration code results in a high value for the divider, leading
to a long term drift high enough to cause USB transmission errors. In
the worst case the USB PHY's ULPI interface can stop responding,
breaking USB operation completely. This manifests itself on the
Beagleboard xM by the LAN9514 reporting 'Cannot enable port 2. Maybe the
cable is bad?' in the kernel log.

Errata sprz319 advisory 2.1 documents PLL values that minimize the
drift. Use them automatically when DPLL5 is used for USB operation,
which we detect based on the requested clock rate. The clock framework
will still compute the PLL parameters and resulting rate as usual, but
the PLL M and N values will then be overridden. This can result in the
effective clock rate being slightly different than the rate cached by
the clock framework, but won't cause any adverse effect to USB
operation.

Signed-off-by: Richard Watts <rrw@kynesim.co.uk>
[Upported from v3.2 to v4.9]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Adam Ford <aford173@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-06 11:16:09 +01:00
..
apll.c clk: Convert __clk_get_name(hw->clk) to clk_hw_get_name(hw) 2015-08-24 16:49:12 -07:00
autoidle.c clk: ti: Convert to clk_hw based provider APIs 2015-08-24 16:48:58 -07:00
clk-2xxx.c Merge branch 'cleanup-clk-h-includes' into clk-next 2015-07-28 11:59:09 -07:00
clk-3xxx-legacy.c clk: ti: Include clk.h 2015-07-20 11:11:28 -07:00
clk-3xxx.c clk: ti: omap36xx: Work around sprz319 advisory 2.1 2017-01-06 11:16:09 +01:00
clk-7xx.c clk: ti: clk-7xx: Remove hardwired ABE clock configuration 2015-10-02 09:24:28 +03:00
clk-33xx.c Merge branch 'cleanup-clk-h-includes' into clk-next 2015-07-28 11:59:09 -07:00
clk-43xx.c ARM: DT updates for v4.3 2015-09-01 13:09:20 -07:00
clk-44xx.c clk: ti: move some public definitions to private header 2015-06-02 12:31:45 +03:00
clk-54xx.c clk: ti: move some public definitions to private header 2015-06-02 12:31:45 +03:00
clk-814x.c clk: ti: fix for definition movement 2015-08-13 13:03:40 +02:00
clk-816x.c clk: ti816x: Add missing dmtimer clkdev entries 2015-11-24 11:30:27 +02:00
clk-dra7-atl.c clk: ti: Include clk.h 2015-07-20 11:11:28 -07:00
clk.c clk: Convert __clk_get_flags() to clk_hw_get_flags() 2015-08-24 16:48:44 -07:00
clkt_dflt.c clk: ti: dflt: fix enable_reg validity check 2015-10-02 09:24:28 +03:00
clkt_dpll.c clk: ti: clkt_dpll: fix wrong do_div() usage 2015-11-24 11:30:27 +02:00
clkt_iclk.c clk: ti: omap2430: move clock support code under clock driver 2015-06-02 12:31:29 +03:00
clock.h clk: ti: omap36xx: Work around sprz319 advisory 2.1 2017-01-06 11:16:09 +01:00
clockdomain.c clk: Convert __clk_get_name(hw->clk) to clk_hw_get_name(hw) 2015-08-24 16:49:12 -07:00
composite.c clk: ti: make use of of_clk_parent_fill helper function 2015-07-28 11:59:07 -07:00
divider.c clk: ti: drop locking code from mux/divider drivers 2015-11-24 11:30:27 +02:00
dpll.c clk: ti: omap36xx: Work around sprz319 advisory 2.1 2017-01-06 11:16:09 +01:00
dpll3xxx.c clk: ti: omap36xx: Work around sprz319 advisory 2.1 2017-01-06 11:16:09 +01:00
dpll44xx.c clk: ti: Convert to clk_hw based provider APIs 2015-08-24 16:48:58 -07:00
fapll.c clk: ti: fapll: fix wrong do_div() usage 2015-11-24 11:30:27 +02:00
fixed-factor.c clk: ti: autoidle: move generic autoidle handling code to clock driver 2015-06-02 12:31:13 +03:00
gate.c clk: ti: Convert to clk_hw based provider APIs 2015-08-24 16:48:58 -07:00
interface.c clk: Convert __clk_get_flags() to clk_hw_get_flags() 2015-08-24 16:48:44 -07:00
Makefile ARM: SoC platform updates for v4.3 2015-09-01 12:18:40 -07:00
mux.c clk: ti: drop locking code from mux/divider drivers 2015-11-24 11:30:27 +02:00