* [PATCH v2] clk: hisilicon: fix lock assignment
@ 2017-01-21 2:26 Leo Yan
2017-01-27 0:18 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Leo Yan @ 2017-01-21 2:26 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd, Leo Yan, linux-clk, linux-kernel,
Guodong Xu, Haojian Zhuang, John Stultz
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>
---
drivers/clk/hisilicon/clkgate-separated.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/hisilicon/clkgate-separated.c b/drivers/clk/hisilicon/clkgate-separated.c
index a47812f..7908bc3 100644
--- a/drivers/clk/hisilicon/clkgate-separated.c
+++ b/drivers/clk/hisilicon/clkgate-separated.c
@@ -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))
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] clk: hisilicon: fix lock assignment
2017-01-21 2:26 [PATCH v2] clk: hisilicon: fix lock assignment Leo Yan
@ 2017-01-27 0:18 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2017-01-27 0:18 UTC (permalink / raw)
To: Leo Yan
Cc: Michael Turquette, linux-clk, linux-kernel, Guodong Xu,
Haojian Zhuang, John Stultz
On 01/21, Leo Yan wrote:
> 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>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-27 0:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-21 2:26 [PATCH v2] clk: hisilicon: fix lock assignment Leo Yan
2017-01-27 0:18 ` Stephen Boyd
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.