]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
clk: hisilicon: fix lock assignment
authorLeo Yan <leo.yan@linaro.org>
Sat, 21 Jan 2017 02:26:31 +0000 (10:26 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 27 Jan 2017 00:18:34 +0000 (16:18 -0800)
In clock driver initialize phase the spinlock is missed to assignment
to struct clkgate_separated, finally there have no locking to protect
exclusive accessing for clock registers.

This bug introduces the console has no output after enable coresight
driver on 96boards Hikey; this is because console using UART3, which
has shared the same register with coresight clock enabling bit. After
applied this patch it can assign lock properly to protect exclusive
accessing, and console can work well after enabled coresight modules.

Fixes: 0aa0c95f743a ("clk: hisilicon: add common clock support")
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/hisilicon/clkgate-separated.c

index a47812f56a17bb97d5a98521b67f1ace784ad9a4..7908bc3c9ec73c0bbc498197d774bef5075797cf 100644 (file)
@@ -120,6 +120,7 @@ struct clk *hisi_register_clkgate_sep(struct device *dev, const char *name,
        sclk->bit_idx = bit_idx;
        sclk->flags = clk_gate_flags;
        sclk->hw.init = &init;
+       sclk->lock = lock;
 
        clk = clk_register(dev, &sclk->hw);
        if (IS_ERR(clk))