WSL2-Linux-Kernel/drivers/clk
Tero Kristo f54d2cd3c1 clk: keystone: sci-clk: Fix sci_clk_get
Currently a bug in the sci_clk_get implementation causes it to always
return a clock belonging to the last device in the static list of clock
data. This is due to a bug in the init code that causes the array
used by sci_clk_get to only be populated with the clocks for the last
device, as each device overwrites the entire array with its own clocks.

Fix this by calculating the actual number of clocks for the SoC, and
allocating the whole array in one go. Also, we don't need the handle
to the init data array anymore after doing this, instead we can
just compare the dev_id / clk_id against the registered clocks and
use binary search for speed.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Dave Gerlach <d-gerlach@ti.com>
Fixes: b745c0794e ("clk: keystone: Add sci-clk driver support")
Cc: Nishanth Menon <nm@ti.com>
Tested-by: Franklin Cooper <fcooper@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-02 18:37:26 -07:00
..
at91 clk: at91: Add sama5d2 suspend/resume 2017-06-29 18:47:35 -07:00
axis
axs10x
bcm clk: iproc: Remove __init marking on iproc_pll_clk_setup() 2017-06-21 09:12:57 -07:00
berlin
h8300
hisilicon clk: hisilicon: add usb2 clocks for hi3798cv200 SoC 2017-06-21 10:46:45 -07:00
imgtec clk: boston: Add a driver for MIPS Boston board clocks 2017-07-11 14:13:06 +02:00
imx clk: imx7d: create clocks behind rawnand clock gate 2017-06-19 19:02:41 -07:00
ingenic
keystone clk: keystone: sci-clk: Fix sci_clk_get 2017-08-02 18:37:26 -07:00
loongson1
mediatek clk: mediatek: export cpu multiplexer clock for MT8173 SoCs 2017-06-19 19:02:44 -07:00
meson clk: meson: mpll: fix mpll0 fractional part ignored 2017-08-01 14:18:31 +02:00
microchip
mmp
mvebu clk: mvebu: cp110: Minor cleanups 2017-06-19 17:14:11 -07:00
mxs
nxp
pistachio
pxa
qcom clk: gcc-msm8916: add support to 9.6MHz codec clk 2017-06-19 17:43:49 -07:00
renesas clk: renesas: cpg-mssr: Use of_device_get_match_data() helper 2017-06-19 19:02:43 -07:00
rockchip clk: rockchip: mark some special clk as critical on rk3368 2017-06-02 15:57:32 +02:00
samsung clk: samsung: exynos5420: The EPLL rate table corrections 2017-07-31 13:16:03 -07:00
sirf
socfpga clk: socfpga: Fix the smplsel on Arria10 and Stratix10 2017-06-19 17:01:55 -07:00
spear
st
sunxi
sunxi-ng clk: sunxi-ng: sun5i: Add clk_set_rate_parent to the CPU clock 2017-07-24 11:37:04 +02:00
tegra
ti clk: ti: omap4: add clkctrl clock data 2017-06-15 10:48:08 +03:00
uniphier clk: uniphier: provide NAND controller clock rate 2017-06-21 10:47:27 -07:00
ux500
versatile clk: versatile: delete old RealView clock implementation 2017-06-02 16:27:17 -07:00
x86 clk: x86: Do not gate clocks enabled by the firmware 2017-07-18 16:23:13 -07:00
zte clk: zx296718: export I2S mux clocks 2017-06-19 19:02:42 -07:00
zynq
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-07-15 10:59:54 -07:00
Makefile Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-07-15 10:59:54 -07:00
clk-asm9260.c
clk-axi-clkgen.c
clk-axm5516.c
clk-bulk.c clk: add clk_bulk_get accessories 2017-06-02 15:37:45 -07:00
clk-cdce706.c
clk-cdce925.c
clk-clps711x.c
clk-composite.c
clk-conf.c clk: Fix __set_clk_rates error print-string 2017-06-01 02:13:44 -07:00
clk-cs2000-cp.c
clk-devres.c clk: add managed version of clk_bulk_get 2017-06-02 15:37:49 -07:00
clk-divider.c clk: divider: Make divider_round_rate take the parent clock 2017-06-07 15:32:12 +02:00
clk-efm32gg.c
clk-fixed-factor.c
clk-fixed-rate.c
clk-fractional-divider.c
clk-gate.c
clk-gemini.c clk: gemini: Fix reset regression 2017-07-17 11:51:10 -07:00
clk-gpio.c
clk-hi655x.c
clk-highbank.c
clk-max77686.c
clk-mb86s7x.c
clk-moxart.c
clk-multiplier.c
clk-mux.c
clk-nomadik.c
clk-nspire.c
clk-oxnas.c
clk-palmas.c clk: palmas: undo preparation of a clock source. 2017-06-02 10:51:34 -07:00
clk-pwm.c
clk-qoriq.c clk: qoriq: Separate root input clock for core PLLs on ls1012a 2017-06-01 01:24:13 -07:00
clk-rk808.c
clk-s2mps11.c
clk-scpi.c clk: scpi: error when clock fails to register 2017-06-29 18:47:35 -07:00
clk-si514.c
clk-si570.c
clk-si5351.c
clk-si5351.h
clk-stm32f4.c
clk-tango4.c
clk-twl6040.c
clk-u300.c
clk-versaclock5.c
clk-vt8500.c
clk-wm831x.c
clk-xgene.c
clk.c
clk.h
clkdev.c